diff --git a/.rive_head b/.rive_head index cf0bfb04..5153454a 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -b2894c99d818c5155d90425e71327de847a833ae +507af325610d089c8bdc2e6f8a76f80f1f8bd99d diff --git a/tests/premake5.lua b/tests/premake5.lua index 777f84b8..ac5e9ff2 100644 --- a/tests/premake5.lua +++ b/tests/premake5.lua @@ -47,25 +47,6 @@ do files({ 'bench/*.cpp' }) end -rive_tools_project('tests', _OPTIONS['os'] == 'ios' and 'StaticLib' or 'ConsoleApp') -do - exceptionhandling('On') - - defines({ - 'TESTING', - 'ENABLE_QUERY_FLAT_VERTICES', - }) - - externalincludedirs({ - '../include', -- For catch.hpp - }) - - files({ - 'unit_tests/runtime/main_test.cpp', -- main() function for catch.hpp - 'unit_tests/renderer/*.cpp', - }) -end - rive_tools_project('gms', 'RiveTool') do externalincludedirs({ diff --git a/tests/rive_tools_project.lua b/tests/rive_tools_project.lua index d5ef850f..266579ed 100644 --- a/tests/rive_tools_project.lua +++ b/tests/rive_tools_project.lua @@ -39,6 +39,7 @@ function rive_tools_project(name, project_kind) RIVE_PLS_DIR .. '/src', RIVE_RUNTIME_DIR .. '/include', RIVE_RUNTIME_DIR .. '/cg_renderer/include', + 'unit_tests', }) includedirs({ @@ -234,7 +235,7 @@ rive_tools_project('tools_common', 'StaticLib') do files({ 'common/*.cpp', - 'assets/*.cpp', + 'unit_tests/assets/*.cpp', RIVE_PLS_DIR .. '/path_fiddle/fiddle_context_gl.cpp', RIVE_PLS_DIR .. '/path_fiddle/fiddle_context_d3d.cpp', RIVE_PLS_DIR .. '/path_fiddle/fiddle_context_vulkan.cpp', diff --git a/tests/run_on_android.sh b/tests/run_on_android.sh index b385606d..11d70f8e 100755 --- a/tests/run_on_android.sh +++ b/tests/run_on_android.sh @@ -5,4 +5,4 @@ BINARY_NAME="$(basename $BINARY_PATH)" shift ./push_console_app_to_android.sh $BINARY_PATH -adb shell "cd /data/local/tmp; export LD_LIBRARY_PATH=/data/local/tmp; ./$BINARY_NAME $@" +adb shell "cd /data/local/tmp; ./$BINARY_NAME $@" diff --git a/tests/assets/1.webp b/tests/unit_tests/assets/1.webp similarity index 100% rename from tests/assets/1.webp rename to tests/unit_tests/assets/1.webp diff --git a/tests/assets/IBMPlexSansArabic-Regular.ttf b/tests/unit_tests/assets/IBMPlexSansArabic-Regular.ttf similarity index 100% rename from tests/assets/IBMPlexSansArabic-Regular.ttf rename to tests/unit_tests/assets/IBMPlexSansArabic-Regular.ttf diff --git a/tests/assets/LibreBodoni-Italic-VariableFont_wght.ttf b/tests/unit_tests/assets/LibreBodoni-Italic-VariableFont_wght.ttf similarity index 100% rename from tests/assets/LibreBodoni-Italic-VariableFont_wght.ttf rename to tests/unit_tests/assets/LibreBodoni-Italic-VariableFont_wght.ttf diff --git a/tests/assets/Montserrat.ttf b/tests/unit_tests/assets/Montserrat.ttf similarity index 100% rename from tests/assets/Montserrat.ttf rename to tests/unit_tests/assets/Montserrat.ttf diff --git a/tests/assets/NotoSansArabic-VariableFont_wdth,wght.ttf b/tests/unit_tests/assets/NotoSansArabic-VariableFont_wdth,wght.ttf similarity index 100% rename from tests/assets/NotoSansArabic-VariableFont_wdth,wght.ttf rename to tests/unit_tests/assets/NotoSansArabic-VariableFont_wdth,wght.ttf diff --git a/tests/assets/RobotoFlex.ttf b/tests/unit_tests/assets/RobotoFlex.ttf similarity index 100% rename from tests/assets/RobotoFlex.ttf rename to tests/unit_tests/assets/RobotoFlex.ttf diff --git a/tests/assets/align_target.riv b/tests/unit_tests/assets/align_target.riv similarity index 100% rename from tests/assets/align_target.riv rename to tests/unit_tests/assets/align_target.riv diff --git a/tests/assets/animation_reset_cases.riv b/tests/unit_tests/assets/animation_reset_cases.riv similarity index 100% rename from tests/assets/animation_reset_cases.riv rename to tests/unit_tests/assets/animation_reset_cases.riv diff --git a/tests/assets/artboardclipping.riv b/tests/unit_tests/assets/artboardclipping.riv similarity index 100% rename from tests/assets/artboardclipping.riv rename to tests/unit_tests/assets/artboardclipping.riv diff --git a/tests/assets/audio/song.mp3 b/tests/unit_tests/assets/audio/song.mp3 similarity index 100% rename from tests/assets/audio/song.mp3 rename to tests/unit_tests/assets/audio/song.mp3 diff --git a/tests/assets/audio/what.wav b/tests/unit_tests/assets/audio/what.wav similarity index 100% rename from tests/assets/audio/what.wav rename to tests/unit_tests/assets/audio/what.wav diff --git a/tests/assets/background_measure.riv b/tests/unit_tests/assets/background_measure.riv similarity index 100% rename from tests/assets/background_measure.riv rename to tests/unit_tests/assets/background_measure.riv diff --git a/tests/assets/bad.jpg b/tests/unit_tests/assets/bad.jpg similarity index 100% rename from tests/assets/bad.jpg rename to tests/unit_tests/assets/bad.jpg diff --git a/tests/assets/bad.png b/tests/unit_tests/assets/bad.png similarity index 100% rename from tests/assets/bad.png rename to tests/unit_tests/assets/bad.png diff --git a/tests/assets/bad_skin.riv b/tests/unit_tests/assets/bad_skin.riv similarity index 100% rename from tests/assets/bad_skin.riv rename to tests/unit_tests/assets/bad_skin.riv diff --git a/tests/assets/ball_test.riv b/tests/unit_tests/assets/ball_test.riv similarity index 100% rename from tests/assets/ball_test.riv rename to tests/unit_tests/assets/ball_test.riv diff --git a/tests/assets/batdude.png b/tests/unit_tests/assets/batdude.png similarity index 100% rename from tests/assets/batdude.png rename to tests/unit_tests/assets/batdude.png diff --git a/tests/assets/batdude.png.cpp b/tests/unit_tests/assets/batdude.png.cpp similarity index 99% rename from tests/assets/batdude.png.cpp rename to tests/unit_tests/assets/batdude.png.cpp index a64547e7..f6eaf453 100644 --- a/tests/assets/batdude.png.cpp +++ b/tests/unit_tests/assets/batdude.png.cpp @@ -1,4 +1,4 @@ -#include "assets/batdude.png.hpp" +#include "batdude.png.hpp" namespace assets { diff --git a/tests/assets/batdude.png.hpp b/tests/unit_tests/assets/batdude.png.hpp similarity index 100% rename from tests/assets/batdude.png.hpp rename to tests/unit_tests/assets/batdude.png.hpp diff --git a/tests/assets/blend_test.riv b/tests/unit_tests/assets/blend_test.riv similarity index 100% rename from tests/assets/blend_test.riv rename to tests/unit_tests/assets/blend_test.riv diff --git a/tests/assets/bullet_man.riv b/tests/unit_tests/assets/bullet_man.riv similarity index 100% rename from tests/assets/bullet_man.riv rename to tests/unit_tests/assets/bullet_man.riv diff --git a/tests/assets/circle_clips.riv b/tests/unit_tests/assets/circle_clips.riv similarity index 100% rename from tests/assets/circle_clips.riv rename to tests/unit_tests/assets/circle_clips.riv diff --git a/tests/assets/click_event.riv b/tests/unit_tests/assets/click_event.riv similarity index 100% rename from tests/assets/click_event.riv rename to tests/unit_tests/assets/click_event.riv diff --git a/tests/assets/clip_tests.riv b/tests/unit_tests/assets/clip_tests.riv similarity index 100% rename from tests/assets/clip_tests.riv rename to tests/unit_tests/assets/clip_tests.riv diff --git a/tests/assets/complex_ik_dependency.riv b/tests/unit_tests/assets/complex_ik_dependency.riv similarity index 100% rename from tests/assets/complex_ik_dependency.riv rename to tests/unit_tests/assets/complex_ik_dependency.riv diff --git a/tests/assets/cubic_value_test.riv b/tests/unit_tests/assets/cubic_value_test.riv similarity index 100% rename from tests/assets/cubic_value_test.riv rename to tests/unit_tests/assets/cubic_value_test.riv diff --git a/tests/assets/death_knight.riv b/tests/unit_tests/assets/death_knight.riv similarity index 100% rename from tests/assets/death_knight.riv rename to tests/unit_tests/assets/death_knight.riv diff --git a/tests/assets/dependency_test.riv b/tests/unit_tests/assets/dependency_test.riv similarity index 100% rename from tests/assets/dependency_test.riv rename to tests/unit_tests/assets/dependency_test.riv diff --git a/tests/assets/distance_constraint.riv b/tests/unit_tests/assets/distance_constraint.riv similarity index 100% rename from tests/assets/distance_constraint.riv rename to tests/unit_tests/assets/distance_constraint.riv diff --git a/tests/assets/double_line.riv b/tests/unit_tests/assets/double_line.riv similarity index 100% rename from tests/assets/double_line.riv rename to tests/unit_tests/assets/double_line.riv diff --git a/tests/assets/draw_rule_cycle.riv b/tests/unit_tests/assets/draw_rule_cycle.riv similarity index 100% rename from tests/assets/draw_rule_cycle.riv rename to tests/unit_tests/assets/draw_rule_cycle.riv diff --git a/tests/assets/ellipsis.riv b/tests/unit_tests/assets/ellipsis.riv similarity index 100% rename from tests/assets/ellipsis.riv rename to tests/unit_tests/assets/ellipsis.riv diff --git a/tests/assets/entry.riv b/tests/unit_tests/assets/entry.riv similarity index 100% rename from tests/assets/entry.riv rename to tests/unit_tests/assets/entry.riv diff --git a/tests/assets/event_on_listener.riv b/tests/unit_tests/assets/event_on_listener.riv similarity index 100% rename from tests/assets/event_on_listener.riv rename to tests/unit_tests/assets/event_on_listener.riv diff --git a/tests/assets/events_on_states.riv b/tests/unit_tests/assets/events_on_states.riv similarity index 100% rename from tests/assets/events_on_states.riv rename to tests/unit_tests/assets/events_on_states.riv diff --git a/tests/assets/fix_rectangle.riv b/tests/unit_tests/assets/fix_rectangle.riv similarity index 100% rename from tests/assets/fix_rectangle.riv rename to tests/unit_tests/assets/fix_rectangle.riv diff --git a/tests/assets/follow_path.riv b/tests/unit_tests/assets/follow_path.riv similarity index 100% rename from tests/assets/follow_path.riv rename to tests/unit_tests/assets/follow_path.riv diff --git a/tests/assets/follow_path_path_0_opacity.riv b/tests/unit_tests/assets/follow_path_path_0_opacity.riv similarity index 100% rename from tests/assets/follow_path_path_0_opacity.riv rename to tests/unit_tests/assets/follow_path_path_0_opacity.riv diff --git a/tests/assets/follow_path_with_0_opacity.riv b/tests/unit_tests/assets/follow_path_with_0_opacity.riv similarity index 100% rename from tests/assets/follow_path_with_0_opacity.riv rename to tests/unit_tests/assets/follow_path_with_0_opacity.riv diff --git a/tests/assets/hello_world.riv b/tests/unit_tests/assets/hello_world.riv similarity index 100% rename from tests/assets/hello_world.riv rename to tests/unit_tests/assets/hello_world.riv diff --git a/tests/assets/hit_test_solos.riv b/tests/unit_tests/assets/hit_test_solos.riv similarity index 100% rename from tests/assets/hit_test_solos.riv rename to tests/unit_tests/assets/hit_test_solos.riv diff --git a/tests/assets/hosted_font_file.riv b/tests/unit_tests/assets/hosted_font_file.riv similarity index 100% rename from tests/assets/hosted_font_file.riv rename to tests/unit_tests/assets/hosted_font_file.riv diff --git a/tests/assets/hosted_image_file.riv b/tests/unit_tests/assets/hosted_image_file.riv similarity index 100% rename from tests/assets/hosted_image_file.riv rename to tests/unit_tests/assets/hosted_image_file.riv diff --git a/tests/assets/in_band_asset.riv b/tests/unit_tests/assets/in_band_asset.riv similarity index 100% rename from tests/assets/in_band_asset.riv rename to tests/unit_tests/assets/in_band_asset.riv diff --git a/tests/assets/jellyfish_test.riv b/tests/unit_tests/assets/jellyfish_test.riv similarity index 100% rename from tests/assets/jellyfish_test.riv rename to tests/unit_tests/assets/jellyfish_test.riv diff --git a/tests/assets/joystick_flag_test.riv b/tests/unit_tests/assets/joystick_flag_test.riv similarity index 100% rename from tests/assets/joystick_flag_test.riv rename to tests/unit_tests/assets/joystick_flag_test.riv diff --git a/tests/assets/juice.riv b/tests/unit_tests/assets/juice.riv similarity index 100% rename from tests/assets/juice.riv rename to tests/unit_tests/assets/juice.riv diff --git a/tests/assets/layout/layout_center.riv b/tests/unit_tests/assets/layout/layout_center.riv similarity index 100% rename from tests/assets/layout/layout_center.riv rename to tests/unit_tests/assets/layout/layout_center.riv diff --git a/tests/assets/layout/layout_horizontal.riv b/tests/unit_tests/assets/layout/layout_horizontal.riv similarity index 100% rename from tests/assets/layout/layout_horizontal.riv rename to tests/unit_tests/assets/layout/layout_horizontal.riv diff --git a/tests/assets/layout/layout_horizontal_gaps.riv b/tests/unit_tests/assets/layout/layout_horizontal_gaps.riv similarity index 100% rename from tests/assets/layout/layout_horizontal_gaps.riv rename to tests/unit_tests/assets/layout/layout_horizontal_gaps.riv diff --git a/tests/assets/layout/layout_horizontal_wrap.riv b/tests/unit_tests/assets/layout/layout_horizontal_wrap.riv similarity index 100% rename from tests/assets/layout/layout_horizontal_wrap.riv rename to tests/unit_tests/assets/layout/layout_horizontal_wrap.riv diff --git a/tests/assets/layout/layout_vertical.riv b/tests/unit_tests/assets/layout/layout_vertical.riv similarity index 100% rename from tests/assets/layout/layout_vertical.riv rename to tests/unit_tests/assets/layout/layout_vertical.riv diff --git a/tests/assets/layout/measure_tests.riv b/tests/unit_tests/assets/layout/measure_tests.riv similarity index 100% rename from tests/assets/layout/measure_tests.riv rename to tests/unit_tests/assets/layout/measure_tests.riv diff --git a/tests/assets/light_switch.riv b/tests/unit_tests/assets/light_switch.riv similarity index 100% rename from tests/assets/light_switch.riv rename to tests/unit_tests/assets/light_switch.riv diff --git a/tests/assets/long_name.riv b/tests/unit_tests/assets/long_name.riv similarity index 100% rename from tests/assets/long_name.riv rename to tests/unit_tests/assets/long_name.riv diff --git a/tests/assets/looping_timeline_events.riv b/tests/unit_tests/assets/looping_timeline_events.riv similarity index 100% rename from tests/assets/looping_timeline_events.riv rename to tests/unit_tests/assets/looping_timeline_events.riv diff --git a/tests/assets/modifier_test.riv b/tests/unit_tests/assets/modifier_test.riv similarity index 100% rename from tests/assets/modifier_test.riv rename to tests/unit_tests/assets/modifier_test.riv diff --git a/tests/assets/modifier_to_run.riv b/tests/unit_tests/assets/modifier_to_run.riv similarity index 100% rename from tests/assets/modifier_to_run.riv rename to tests/unit_tests/assets/modifier_to_run.riv diff --git a/tests/assets/montserrat.ttf.cpp b/tests/unit_tests/assets/montserrat.ttf.cpp similarity index 99% rename from tests/assets/montserrat.ttf.cpp rename to tests/unit_tests/assets/montserrat.ttf.cpp index a2a3ccb9..a7c39414 100644 --- a/tests/assets/montserrat.ttf.cpp +++ b/tests/unit_tests/assets/montserrat.ttf.cpp @@ -1,4 +1,4 @@ -#include "assets/montserrat.ttf.hpp" +#include "montserrat.ttf.hpp" namespace assets { diff --git a/tests/assets/montserrat.ttf.hpp b/tests/unit_tests/assets/montserrat.ttf.hpp similarity index 100% rename from tests/assets/montserrat.ttf.hpp rename to tests/unit_tests/assets/montserrat.ttf.hpp diff --git a/tests/assets/multiple_state_machines.riv b/tests/unit_tests/assets/multiple_state_machines.riv similarity index 100% rename from tests/assets/multiple_state_machines.riv rename to tests/unit_tests/assets/multiple_state_machines.riv diff --git a/tests/assets/nested_artboard_opacity.riv b/tests/unit_tests/assets/nested_artboard_opacity.riv similarity index 100% rename from tests/assets/nested_artboard_opacity.riv rename to tests/unit_tests/assets/nested_artboard_opacity.riv diff --git a/tests/assets/nested_event_test.riv b/tests/unit_tests/assets/nested_event_test.riv similarity index 100% rename from tests/assets/nested_event_test.riv rename to tests/unit_tests/assets/nested_event_test.riv diff --git a/tests/assets/nested_solo.riv b/tests/unit_tests/assets/nested_solo.riv similarity index 100% rename from tests/assets/nested_solo.riv rename to tests/unit_tests/assets/nested_solo.riv diff --git a/tests/assets/new_text.riv b/tests/unit_tests/assets/new_text.riv similarity index 100% rename from tests/assets/new_text.riv rename to tests/unit_tests/assets/new_text.riv diff --git a/tests/assets/nomoon.png b/tests/unit_tests/assets/nomoon.png similarity index 100% rename from tests/assets/nomoon.png rename to tests/unit_tests/assets/nomoon.png diff --git a/tests/assets/nomoon.png.cpp b/tests/unit_tests/assets/nomoon.png.cpp similarity index 100% rename from tests/assets/nomoon.png.cpp rename to tests/unit_tests/assets/nomoon.png.cpp diff --git a/tests/assets/nomoon.png.hpp b/tests/unit_tests/assets/nomoon.png.hpp similarity index 100% rename from tests/assets/nomoon.png.hpp rename to tests/unit_tests/assets/nomoon.png.hpp diff --git a/tests/assets/off_road_car.riv b/tests/unit_tests/assets/off_road_car.riv similarity index 100% rename from tests/assets/off_road_car.riv rename to tests/unit_tests/assets/off_road_car.riv diff --git a/tests/assets/oneshotblend.riv b/tests/unit_tests/assets/oneshotblend.riv similarity index 100% rename from tests/assets/oneshotblend.riv rename to tests/unit_tests/assets/oneshotblend.riv diff --git a/tests/assets/opaque_hit_test.riv b/tests/unit_tests/assets/opaque_hit_test.riv similarity index 100% rename from tests/assets/opaque_hit_test.riv rename to tests/unit_tests/assets/opaque_hit_test.riv diff --git a/tests/assets/open_source.jpg b/tests/unit_tests/assets/open_source.jpg similarity index 100% rename from tests/assets/open_source.jpg rename to tests/unit_tests/assets/open_source.jpg diff --git a/tests/assets/out_of_band/eve-317.png b/tests/unit_tests/assets/out_of_band/eve-317.png similarity index 100% rename from tests/assets/out_of_band/eve-317.png rename to tests/unit_tests/assets/out_of_band/eve-317.png diff --git a/tests/assets/out_of_band/walle-370.png b/tests/unit_tests/assets/out_of_band/walle-370.png similarity index 100% rename from tests/assets/out_of_band/walle-370.png rename to tests/unit_tests/assets/out_of_band/walle-370.png diff --git a/tests/assets/out_of_band/walle.riv b/tests/unit_tests/assets/out_of_band/walle.riv similarity index 100% rename from tests/assets/out_of_band/walle.riv rename to tests/unit_tests/assets/out_of_band/walle.riv diff --git a/tests/assets/paper.riv.cpp b/tests/unit_tests/assets/paper.riv.cpp similarity index 99% rename from tests/assets/paper.riv.cpp rename to tests/unit_tests/assets/paper.riv.cpp index d6877e02..c6d230a3 100644 --- a/tests/assets/paper.riv.cpp +++ b/tests/unit_tests/assets/paper.riv.cpp @@ -1,4 +1,4 @@ -#include "assets/paper.riv.hpp" +#include "paper.riv.hpp" namespace assets { diff --git a/tests/assets/paper.riv.hpp b/tests/unit_tests/assets/paper.riv.hpp similarity index 100% rename from tests/assets/paper.riv.hpp rename to tests/unit_tests/assets/paper.riv.hpp diff --git a/tests/assets/placeholder.png b/tests/unit_tests/assets/placeholder.png similarity index 100% rename from tests/assets/placeholder.png rename to tests/unit_tests/assets/placeholder.png diff --git a/tests/assets/pointer_events.riv b/tests/unit_tests/assets/pointer_events.riv similarity index 100% rename from tests/assets/pointer_events.riv rename to tests/unit_tests/assets/pointer_events.riv diff --git a/tests/assets/pointer_events_nested_artboards_in_solos.riv b/tests/unit_tests/assets/pointer_events_nested_artboards_in_solos.riv similarity index 100% rename from tests/assets/pointer_events_nested_artboards_in_solos.riv rename to tests/unit_tests/assets/pointer_events_nested_artboards_in_solos.riv diff --git a/tests/assets/quantize_test.riv b/tests/unit_tests/assets/quantize_test.riv similarity index 100% rename from tests/assets/quantize_test.riv rename to tests/unit_tests/assets/quantize_test.riv diff --git a/tests/assets/roboto_flex.ttf.cpp b/tests/unit_tests/assets/roboto_flex.ttf.cpp similarity index 99% rename from tests/assets/roboto_flex.ttf.cpp rename to tests/unit_tests/assets/roboto_flex.ttf.cpp index 0bbed1a2..0311b72e 100644 --- a/tests/assets/roboto_flex.ttf.cpp +++ b/tests/unit_tests/assets/roboto_flex.ttf.cpp @@ -1,4 +1,4 @@ -#include "assets/roboto_flex.ttf.hpp" +#include "roboto_flex.ttf.hpp" namespace assets { diff --git a/tests/assets/roboto_flex.ttf.hpp b/tests/unit_tests/assets/roboto_flex.ttf.hpp similarity index 100% rename from tests/assets/roboto_flex.ttf.hpp rename to tests/unit_tests/assets/roboto_flex.ttf.hpp diff --git a/tests/assets/rocket.riv b/tests/unit_tests/assets/rocket.riv similarity index 100% rename from tests/assets/rocket.riv rename to tests/unit_tests/assets/rocket.riv diff --git a/tests/assets/rotation_constraint.riv b/tests/unit_tests/assets/rotation_constraint.riv similarity index 100% rename from tests/assets/rotation_constraint.riv rename to tests/unit_tests/assets/rotation_constraint.riv diff --git a/tests/assets/runtime_nested_inputs.riv b/tests/unit_tests/assets/runtime_nested_inputs.riv similarity index 100% rename from tests/assets/runtime_nested_inputs.riv rename to tests/unit_tests/assets/runtime_nested_inputs.riv diff --git a/tests/assets/runtime_nested_text_runs.riv b/tests/unit_tests/assets/runtime_nested_text_runs.riv similarity index 100% rename from tests/assets/runtime_nested_text_runs.riv rename to tests/unit_tests/assets/runtime_nested_text_runs.riv diff --git a/tests/assets/scale_constraint.riv b/tests/unit_tests/assets/scale_constraint.riv similarity index 100% rename from tests/assets/scale_constraint.riv rename to tests/unit_tests/assets/scale_constraint.riv diff --git a/tests/assets/shapetest.riv b/tests/unit_tests/assets/shapetest.riv similarity index 100% rename from tests/assets/shapetest.riv rename to tests/unit_tests/assets/shapetest.riv diff --git a/tests/assets/solar-system.riv b/tests/unit_tests/assets/solar-system.riv similarity index 100% rename from tests/assets/solar-system.riv rename to tests/unit_tests/assets/solar-system.riv diff --git a/tests/assets/solo_test.riv b/tests/unit_tests/assets/solo_test.riv similarity index 100% rename from tests/assets/solo_test.riv rename to tests/unit_tests/assets/solo_test.riv diff --git a/tests/assets/solos_collapse_tests.riv b/tests/unit_tests/assets/solos_collapse_tests.riv similarity index 100% rename from tests/assets/solos_collapse_tests.riv rename to tests/unit_tests/assets/solos_collapse_tests.riv diff --git a/tests/assets/solos_with_nested_artboards.riv b/tests/unit_tests/assets/solos_with_nested_artboards.riv similarity index 100% rename from tests/assets/solos_with_nested_artboards.riv rename to tests/unit_tests/assets/solos_with_nested_artboards.riv diff --git a/tests/assets/sound.riv b/tests/unit_tests/assets/sound.riv similarity index 100% rename from tests/assets/sound.riv rename to tests/unit_tests/assets/sound.riv diff --git a/tests/assets/sound2.riv b/tests/unit_tests/assets/sound2.riv similarity index 100% rename from tests/assets/sound2.riv rename to tests/unit_tests/assets/sound2.riv diff --git a/tests/assets/state_machine_transition.riv b/tests/unit_tests/assets/state_machine_transition.riv similarity index 100% rename from tests/assets/state_machine_transition.riv rename to tests/unit_tests/assets/state_machine_transition.riv diff --git a/tests/assets/stroke_name_test.riv b/tests/unit_tests/assets/stroke_name_test.riv similarity index 100% rename from tests/assets/stroke_name_test.riv rename to tests/unit_tests/assets/stroke_name_test.riv diff --git a/tests/assets/tape.riv b/tests/unit_tests/assets/tape.riv similarity index 100% rename from tests/assets/tape.riv rename to tests/unit_tests/assets/tape.riv diff --git a/tests/assets/test_elastic.riv b/tests/unit_tests/assets/test_elastic.riv similarity index 100% rename from tests/assets/test_elastic.riv rename to tests/unit_tests/assets/test_elastic.riv diff --git a/tests/assets/test_modifier_run.riv b/tests/unit_tests/assets/test_modifier_run.riv similarity index 100% rename from tests/assets/test_modifier_run.riv rename to tests/unit_tests/assets/test_modifier_run.riv diff --git a/tests/assets/timeline_event_test.riv b/tests/unit_tests/assets/timeline_event_test.riv similarity index 100% rename from tests/assets/timeline_event_test.riv rename to tests/unit_tests/assets/timeline_event_test.riv diff --git a/tests/assets/transform_constraint.riv b/tests/unit_tests/assets/transform_constraint.riv similarity index 100% rename from tests/assets/transform_constraint.riv rename to tests/unit_tests/assets/transform_constraint.riv diff --git a/tests/assets/translation_constraint.riv b/tests/unit_tests/assets/translation_constraint.riv similarity index 100% rename from tests/assets/translation_constraint.riv rename to tests/unit_tests/assets/translation_constraint.riv diff --git a/tests/assets/trim.riv b/tests/unit_tests/assets/trim.riv similarity index 100% rename from tests/assets/trim.riv rename to tests/unit_tests/assets/trim.riv diff --git a/tests/assets/trim_path_linear.riv b/tests/unit_tests/assets/trim_path_linear.riv similarity index 100% rename from tests/assets/trim_path_linear.riv rename to tests/unit_tests/assets/trim_path_linear.riv diff --git a/tests/assets/two_artboards.riv b/tests/unit_tests/assets/two_artboards.riv similarity index 100% rename from tests/assets/two_artboards.riv rename to tests/unit_tests/assets/two_artboards.riv diff --git a/tests/assets/two_bone_ik.riv b/tests/unit_tests/assets/two_bone_ik.riv similarity index 100% rename from tests/assets/two_bone_ik.riv rename to tests/unit_tests/assets/two_bone_ik.riv diff --git a/tests/assets/walle.riv b/tests/unit_tests/assets/walle.riv similarity index 100% rename from tests/assets/walle.riv rename to tests/unit_tests/assets/walle.riv diff --git a/tests/assets/zombie_skins.riv b/tests/unit_tests/assets/zombie_skins.riv similarity index 100% rename from tests/assets/zombie_skins.riv rename to tests/unit_tests/assets/zombie_skins.riv diff --git a/tests/unit_tests/runtime/audio_test.cpp b/tests/unit_tests/runtime/audio_test.cpp index 183438bf..5b938235 100644 --- a/tests/unit_tests/runtime/audio_test.cpp +++ b/tests/unit_tests/runtime/audio_test.cpp @@ -35,7 +35,7 @@ TEST_CASE("audio source can be opened", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); REQUIRE(engine != nullptr); - auto file = loadFile("../assets/audio/what.wav"); + auto file = loadFile("assets/audio/what.wav"); auto span = Span(file); rcp audioSource = rcp(new AudioSource(span)); REQUIRE(audioSource->channels() == 2); @@ -78,7 +78,7 @@ TEST_CASE("audio source can be opened", "[audio]") TEST_CASE("file with audio loads correctly", "[text]") { - auto file = ReadRiveFile("../assets/sound.riv"); + auto file = ReadRiveFile("assets/sound.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); @@ -109,7 +109,7 @@ TEST_CASE("audio sound can outlive engine", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); REQUIRE(engine != nullptr); - auto file = loadFile("../assets/audio/what.wav"); + auto file = loadFile("assets/audio/what.wav"); auto span = Span(file); rcp audioSource = rcp(new AudioSource(span)); REQUIRE(audioSource->channels() == 2); @@ -128,7 +128,7 @@ TEST_CASE("many audio sounds can outlive engine", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); REQUIRE(engine != nullptr); - auto file = loadFile("../assets/audio/what.wav"); + auto file = loadFile("assets/audio/what.wav"); auto span = Span(file); rcp audioSource = rcp(new AudioSource(span)); REQUIRE(audioSource->channels() == 2); @@ -151,7 +151,7 @@ TEST_CASE("audio sounds from different artboards stop accordingly", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); - auto file = ReadRiveFile("../assets/sound.riv"); + auto file = ReadRiveFile("assets/sound.riv"); auto artboard = file->artboardDefault(); artboard->audioEngine(engine); auto artboard2 = file->artboardDefault(); @@ -189,7 +189,7 @@ TEST_CASE("Artboard has audio", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); - auto file = ReadRiveFile("../assets/sound2.riv"); + auto file = ReadRiveFile("assets/sound2.riv"); auto artboard = file->artboardNamed("child"); artboard->audioEngine(engine); @@ -204,7 +204,7 @@ TEST_CASE("Artboard has audio in nested artboard", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); - auto file = ReadRiveFile("../assets/sound2.riv"); + auto file = ReadRiveFile("assets/sound2.riv"); auto artboard = file->artboardNamed("grand-parent"); artboard->audioEngine(engine); @@ -219,7 +219,7 @@ TEST_CASE("Artboard does not have audio", "[audio]") { rcp engine = AudioEngine::Make(2, 44100); - auto file = ReadRiveFile("../assets/sound2.riv"); + auto file = ReadRiveFile("assets/sound2.riv"); auto artboard = file->artboardNamed("no-audio"); artboard->audioEngine(engine); diff --git a/tests/unit_tests/runtime/bound_bones_test.cpp b/tests/unit_tests/runtime/bound_bones_test.cpp index 88c8f74c..90ae8582 100644 --- a/tests/unit_tests/runtime/bound_bones_test.cpp +++ b/tests/unit_tests/runtime/bound_bones_test.cpp @@ -14,7 +14,7 @@ TEST_CASE("bound bones load correctly", "[bones]") { - auto file = ReadRiveFile("../assets/off_road_car.riv"); + auto file = ReadRiveFile("assets/off_road_car.riv"); auto node = file->artboard()->find("transmission_front_testing"); REQUIRE(node != nullptr); diff --git a/tests/unit_tests/runtime/bounds_test.cpp b/tests/unit_tests/runtime/bounds_test.cpp index c5ee091a..cd7a7108 100644 --- a/tests/unit_tests/runtime/bounds_test.cpp +++ b/tests/unit_tests/runtime/bounds_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("compute bounds of background shape", "[bounds]") { - auto file = ReadRiveFile("../assets/background_measure.riv"); + auto file = ReadRiveFile("assets/background_measure.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/cdn_asset_test.cpp b/tests/unit_tests/runtime/cdn_asset_test.cpp index c92ae0f7..240c9dcc 100644 --- a/tests/unit_tests/runtime/cdn_asset_test.cpp +++ b/tests/unit_tests/runtime/cdn_asset_test.cpp @@ -17,7 +17,7 @@ TEST_CASE("Image assets with cdn information loads correctly", "[cdn]") { - auto file = ReadRiveFile("../assets/hosted_image_file.riv"); + auto file = ReadRiveFile("assets/hosted_image_file.riv"); auto assets = file->assets(); REQUIRE(assets.size() == 1); @@ -36,7 +36,7 @@ TEST_CASE("Image assets with cdn information loads correctly", "[cdn]") TEST_CASE("Font assets with cdn information loads correctly", "[cdn]") { - auto file = ReadRiveFile("../assets/hosted_font_file.riv"); + auto file = ReadRiveFile("assets/hosted_font_file.riv"); auto assets = file->assets(); REQUIRE(assets.size() == 1); diff --git a/tests/unit_tests/runtime/clip_test.cpp b/tests/unit_tests/runtime/clip_test.cpp index 8fed3186..18d04b8b 100644 --- a/tests/unit_tests/runtime/clip_test.cpp +++ b/tests/unit_tests/runtime/clip_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("clipping loads correctly", "[clipping]") { - auto file = ReadRiveFile("../assets/circle_clips.riv"); + auto file = ReadRiveFile("assets/circle_clips.riv"); auto node = file->artboard()->find("TopEllipse"); REQUIRE(node != nullptr); @@ -56,7 +56,7 @@ class ClippingFactory : public rive::NoOpFactory TEST_CASE("artboard is clipped correctly", "[clipping]") { ClippingFactory factory; - auto file = ReadRiveFile("../assets/artboardclipping.riv", &factory); + auto file = ReadRiveFile("assets/artboardclipping.riv", &factory); auto artboard = file->artboard("Center"); REQUIRE(artboard != nullptr); @@ -91,7 +91,7 @@ TEST_CASE("artboard is clipped correctly", "[clipping]") TEST_CASE("Shape does not have any clipping paths visible", "[clipping]") { ClippingFactory factory; - auto file = ReadRiveFile("../assets/clip_tests.riv", &factory); + auto file = ReadRiveFile("assets/clip_tests.riv", &factory); auto artboard = file->artboard("Empty-Shape"); REQUIRE(artboard != nullptr); @@ -113,7 +113,7 @@ TEST_CASE("Shape does not have any clipping paths visible", "[clipping]") TEST_CASE("Shape has at least a clipping path visible", "[clipping]") { ClippingFactory factory; - auto file = ReadRiveFile("../assets/clip_tests.riv", &factory); + auto file = ReadRiveFile("assets/clip_tests.riv", &factory); auto artboard = file->artboard("Hidden-Path-Visible-Path"); REQUIRE(artboard != nullptr); @@ -135,7 +135,7 @@ TEST_CASE("Shape has at least a clipping path visible", "[clipping]") TEST_CASE("Shape returns an empty clip when one clipping shape is empty", "[clipping]") { ClippingFactory factory; - auto file = ReadRiveFile("../assets/clip_tests.riv", &factory); + auto file = ReadRiveFile("assets/clip_tests.riv", &factory); auto artboard = file->artboard("One-Clipping-Shape-Visible-One-Hidden"); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/contour_measure_test.cpp b/tests/unit_tests/runtime/contour_measure_test.cpp index cd46f4e9..7788b25d 100644 --- a/tests/unit_tests/runtime/contour_measure_test.cpp +++ b/tests/unit_tests/runtime/contour_measure_test.cpp @@ -145,7 +145,7 @@ TEST_CASE("contour-oval", "[contourmeasure]") TEST_CASE("bad contour", "[contourmeasure]") { - auto file = ReadRiveFile("../assets/zombie_skins.riv"); + auto file = ReadRiveFile("assets/zombie_skins.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/cubic_value_test.cpp b/tests/unit_tests/runtime/cubic_value_test.cpp index 90495038..3cc33a39 100644 --- a/tests/unit_tests/runtime/cubic_value_test.cpp +++ b/tests/unit_tests/runtime/cubic_value_test.cpp @@ -7,7 +7,7 @@ TEST_CASE("test cubic value load and interpolate properly", "[file]") { - auto file = ReadRiveFile("../assets/cubic_value_test.riv"); + auto file = ReadRiveFile("assets/cubic_value_test.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/default_state_machine_test.cpp b/tests/unit_tests/runtime/default_state_machine_test.cpp index d393c6d3..c34d8bfb 100644 --- a/tests/unit_tests/runtime/default_state_machine_test.cpp +++ b/tests/unit_tests/runtime/default_state_machine_test.cpp @@ -12,7 +12,7 @@ TEST_CASE("default state machine is detected at load", "[file]") { - auto file = ReadRiveFile("../assets/entry.riv"); + auto file = ReadRiveFile("assets/entry.riv"); auto abi = file->artboardAt(0); auto index = abi->defaultStateMachineIndex(); diff --git a/tests/unit_tests/runtime/distance_constraint_test.cpp b/tests/unit_tests/runtime/distance_constraint_test.cpp index ca2269ec..c335c997 100644 --- a/tests/unit_tests/runtime/distance_constraint_test.cpp +++ b/tests/unit_tests/runtime/distance_constraint_test.cpp @@ -9,7 +9,7 @@ TEST_CASE("distance constraints moves items as expected", "[file]") { - auto file = ReadRiveFile("../assets/distance_constraint.riv"); + auto file = ReadRiveFile("assets/distance_constraint.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/draw_order_test.cpp b/tests/unit_tests/runtime/draw_order_test.cpp index 678d1ed0..858abdde 100644 --- a/tests/unit_tests/runtime/draw_order_test.cpp +++ b/tests/unit_tests/runtime/draw_order_test.cpp @@ -11,7 +11,7 @@ TEST_CASE("draw rules load and sort correctly", "[draw rules]") { - auto file = ReadRiveFile("../assets/draw_rule_cycle.riv"); + auto file = ReadRiveFile("assets/draw_rule_cycle.riv"); // auto file = reader.file(); std::unique_ptr artboard = file->artboardDefault(); diff --git a/tests/unit_tests/runtime/elastic_easing_test.cpp b/tests/unit_tests/runtime/elastic_easing_test.cpp index bb517253..ac3808c5 100644 --- a/tests/unit_tests/runtime/elastic_easing_test.cpp +++ b/tests/unit_tests/runtime/elastic_easing_test.cpp @@ -8,7 +8,7 @@ TEST_CASE("test elastic easing loads properly", "[file]") { - auto file = ReadRiveFile("../assets/test_elastic.riv"); + auto file = ReadRiveFile("assets/test_elastic.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/file_test.cpp b/tests/unit_tests/runtime/file_test.cpp index c1089015..2d24b432 100644 --- a/tests/unit_tests/runtime/file_test.cpp +++ b/tests/unit_tests/runtime/file_test.cpp @@ -31,7 +31,7 @@ TEST_CASE("transform order is as expected", "[transform]") TEST_CASE("file can be read", "[file]") { - auto file = ReadRiveFile("../assets/two_artboards.riv"); + auto file = ReadRiveFile("assets/two_artboards.riv"); // Default artboard should be named Two. REQUIRE(file->artboard()->name() == "Two"); @@ -42,7 +42,7 @@ TEST_CASE("file can be read", "[file]") TEST_CASE("file with bad blend mode fails to load", "[file]") { - std::vector bytes = ReadFile("../assets/solar-system.riv"); + std::vector bytes = ReadFile("assets/solar-system.riv"); rive::ImportResult result; auto file = rive::File::import(bytes, &gNoOpFactory, &result, nullptr); @@ -51,7 +51,7 @@ TEST_CASE("file with bad blend mode fails to load", "[file]") TEST_CASE("file with animation can be read", "[file]") { - auto file = ReadRiveFile("../assets/juice.riv"); + auto file = ReadRiveFile("assets/juice.riv"); auto artboard = file->artboard(); REQUIRE(artboard->name() == "New Artboard"); @@ -76,7 +76,7 @@ TEST_CASE("file with animation can be read", "[file]") TEST_CASE("artboards can be counted and accessed via index or name", "[file]") { - auto file = ReadRiveFile("../assets/dependency_test.riv"); + auto file = ReadRiveFile("assets/dependency_test.riv"); // The artboards caqn be counted REQUIRE(file->artboardCount() == 1); @@ -108,7 +108,7 @@ TEST_CASE("dependencies are as expected", "[file]") // │ ┌──────────────┐ // └▶│Rectangle Path│ // └──────────────┘ - auto file = ReadRiveFile("../assets/dependency_test.riv"); + auto file = ReadRiveFile("assets/dependency_test.riv"); auto artboard = file->artboard(); REQUIRE(artboard->name() == "Blue"); @@ -148,7 +148,7 @@ TEST_CASE("dependencies are as expected", "[file]") TEST_CASE("long name in object is parsed correctly", "[file]") { - auto file = ReadRiveFile("../assets/long_name.riv"); + auto file = ReadRiveFile("assets/long_name.riv"); auto artboard = file->artboard(); // Expect all object in file to be loaded, in this case 7 @@ -157,7 +157,7 @@ TEST_CASE("long name in object is parsed correctly", "[file]") TEST_CASE("file with in-band images can have the stripped", "[file]") { - FILE* fp = fopen("../assets/jellyfish_test.riv", "rb"); + FILE* fp = fopen("assets/jellyfish_test.riv", "rb"); REQUIRE(fp != nullptr); fseek(fp, 0, SEEK_END); @@ -197,7 +197,7 @@ TEST_CASE("file with in-band images can have the stripped", "[file]") TEST_CASE("file a bad skin (no parent skinnable) doesn't crash", "[file]") { - FILE* fp = fopen("../assets/bad_skin.riv", "rb"); + FILE* fp = fopen("assets/bad_skin.riv", "rb"); REQUIRE(fp != nullptr); fseek(fp, 0, SEEK_END); diff --git a/tests/unit_tests/runtime/follow_path_constraint_test.cpp b/tests/unit_tests/runtime/follow_path_constraint_test.cpp index 42ff0d14..df50a969 100644 --- a/tests/unit_tests/runtime/follow_path_constraint_test.cpp +++ b/tests/unit_tests/runtime/follow_path_constraint_test.cpp @@ -9,7 +9,7 @@ TEST_CASE("follow path constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/follow_path.riv"); + auto file = ReadRiveFile("assets/follow_path.riv"); auto artboard = file->artboard(); @@ -29,7 +29,7 @@ TEST_CASE("follow path constraint updates world transform", "[file]") TEST_CASE("follow path with 0 opacity constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/follow_path_with_0_opacity.riv"); + auto file = ReadRiveFile("assets/follow_path_with_0_opacity.riv"); auto artboard = file->artboard(); @@ -49,7 +49,7 @@ TEST_CASE("follow path with 0 opacity constraint updates world transform", "[fil TEST_CASE("follow path constraint with path at 0 opacity updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/follow_path_path_0_opacity.riv"); + auto file = ReadRiveFile("assets/follow_path_path_0_opacity.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/font_test.cpp b/tests/unit_tests/runtime/font_test.cpp index b578a7b6..c144abc2 100644 --- a/tests/unit_tests/runtime/font_test.cpp +++ b/tests/unit_tests/runtime/font_test.cpp @@ -55,9 +55,9 @@ static rive::rcp pickFallbackFont(rive::Span mi TEST_CASE("fallback glyphs are found", "[text]") { REQUIRE(fallbackFonts.empty()); - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); - auto fallbackFont = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto fallbackFont = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(fallbackFont != nullptr); fallbackFonts.push_back(fallbackFont); @@ -78,7 +78,7 @@ TEST_CASE("fallback glyphs are found", "[text]") TEST_CASE("variable axis values can be read", "[text]") { REQUIRE(fallbackFonts.empty()); - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); auto count = font->getAxisCount(); @@ -132,7 +132,7 @@ static bool hasTag(std::vector featureStrings, std::string tag) TEST_CASE("font features load as expected", "[text]") { REQUIRE(fallbackFonts.empty()); - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); rive::SimpleArray features = font->features(); diff --git a/tests/unit_tests/runtime/hittest_test.cpp b/tests/unit_tests/runtime/hittest_test.cpp index 907886f3..e6e23832 100644 --- a/tests/unit_tests/runtime/hittest_test.cpp +++ b/tests/unit_tests/runtime/hittest_test.cpp @@ -74,7 +74,7 @@ TEST_CASE("hit test on opaque target", "[hittest]") // "green-activate" sets "toGreen" to true // There is also a "gray-activate" above the other 2 that is not opaque so events should // traverse through the other targets - auto file = ReadRiveFile("../assets/opaque_hit_test.riv"); + auto file = ReadRiveFile("assets/opaque_hit_test.riv"); auto artboard = file->artboard("main"); auto artboardInstance = artboard->instance(); @@ -125,7 +125,7 @@ TEST_CASE("hit test on opaque nested artboard", "[hittest]") // this rect has a listener that toggles "second-gray-toggle" // and a nested artboard at [0, 0, 150, 150] // the nested artboard and the rect have opaque targets - auto file = ReadRiveFile("../assets/opaque_hit_test.riv"); + auto file = ReadRiveFile("assets/opaque_hit_test.riv"); auto artboard = file->artboard("second"); auto artboardInstance = artboard->instance(); @@ -189,7 +189,7 @@ TEST_CASE("hit test on opaque nested artboard", "[hittest]") TEST_CASE("early out on listeners", "[hittest]") { - auto file = ReadRiveFile("../assets/pointer_events.riv"); + auto file = ReadRiveFile("assets/pointer_events.riv"); auto artboard = file->artboard("art-1"); auto artboardInstance = artboard->instance(); @@ -256,7 +256,7 @@ TEST_CASE("click event", "[hittest]") // they overlap between coordinates [100,100]-[200, 200] // they are inside a group that has a listener attached to it // that listener should fire an event on "Click" - auto file = ReadRiveFile("../assets/click_event.riv"); + auto file = ReadRiveFile("assets/click_event.riv"); auto artboard = file->artboard("art-1"); auto artboardInstance = artboard->instance(); @@ -315,7 +315,7 @@ TEST_CASE("multiple shapes with mouse movement behavior", "[hittest]") // they are inside a group that has a Pointer enter and a Pointer out // listeners that toggle between two states (red and green) // starting at "red" - auto file = ReadRiveFile("../assets/click_event.riv"); + auto file = ReadRiveFile("assets/click_event.riv"); auto artboard = file->artboard("art-2"); auto artboardInstance = artboard->instance(); diff --git a/tests/unit_tests/runtime/ik_constraint_test.cpp b/tests/unit_tests/runtime/ik_constraint_test.cpp index 348a5afb..26f1f4c1 100644 --- a/tests/unit_tests/runtime/ik_constraint_test.cpp +++ b/tests/unit_tests/runtime/ik_constraint_test.cpp @@ -11,7 +11,7 @@ TEST_CASE("ik with skinned bones orders correctly", "[file]") { - auto file = ReadRiveFile("../assets/complex_ik_dependency.riv"); + auto file = ReadRiveFile("assets/complex_ik_dependency.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/ik_test.cpp b/tests/unit_tests/runtime/ik_test.cpp index 37bb5de4..5392f5f5 100644 --- a/tests/unit_tests/runtime/ik_test.cpp +++ b/tests/unit_tests/runtime/ik_test.cpp @@ -8,7 +8,7 @@ TEST_CASE("two bone ik places bones correctly", "[file]") { - auto file = ReadRiveFile("../assets/two_bone_ik.riv"); + auto file = ReadRiveFile("assets/two_bone_ik.riv"); auto artboard = file->artboard(); REQUIRE(artboard->find("circle a") != nullptr); @@ -81,7 +81,7 @@ TEST_CASE("two bone ik places bones correctly", "[file]") TEST_CASE("ik keeps working after a lot of iterations", "[file]") { - auto file = ReadRiveFile("../assets/two_bone_ik.riv"); + auto file = ReadRiveFile("assets/two_bone_ik.riv"); auto artboard = file->artboard(); REQUIRE(artboard->find("circle a") != nullptr); diff --git a/tests/unit_tests/runtime/image_asset_test.cpp b/tests/unit_tests/runtime/image_asset_test.cpp index 9a633b7d..3357083c 100644 --- a/tests/unit_tests/runtime/image_asset_test.cpp +++ b/tests/unit_tests/runtime/image_asset_test.cpp @@ -13,7 +13,7 @@ TEST_CASE("image assets loads correctly", "[assets]") { - auto file = ReadRiveFile("../assets/walle.riv"); + auto file = ReadRiveFile("assets/walle.riv"); auto node = file->artboard()->find("walle"); REQUIRE(node != nullptr); @@ -46,7 +46,7 @@ TEST_CASE("out of band image assets loads correctly", "[assets]") { rive::NoOpFactory gEmptyFactory; - std::string filename = "../assets/out_of_band/walle.riv"; + std::string filename = "assets/out_of_band/walle.riv"; rive::RelativeLocalAssetLoader loader(filename); auto file = ReadRiveFile(filename.c_str(), &gEmptyFactory, &loader); diff --git a/tests/unit_tests/runtime/image_decoders_test.cpp b/tests/unit_tests/runtime/image_decoders_test.cpp index 36acbce3..633568a0 100644 --- a/tests/unit_tests/runtime/image_decoders_test.cpp +++ b/tests/unit_tests/runtime/image_decoders_test.cpp @@ -4,7 +4,7 @@ TEST_CASE("png file decodes correctly", "[image-decoder]") { - auto file = ReadFile("../assets/placeholder.png"); + auto file = ReadFile("assets/placeholder.png"); REQUIRE(file.size() == 1096); auto bitmap = Bitmap::decode(file.data(), file.size()); @@ -17,7 +17,7 @@ TEST_CASE("png file decodes correctly", "[image-decoder]") TEST_CASE("jpeg file decodes correctly", "[image-decoder]") { - auto file = ReadFile("../assets/open_source.jpg"); + auto file = ReadFile("assets/open_source.jpg"); REQUIRE(file.size() == 8880); auto bitmap = Bitmap::decode(file.data(), file.size()); @@ -33,7 +33,7 @@ TEST_CASE("jpeg file decodes correctly", "[image-decoder]") // calls IIOReadPlugin::createInfoPtr which leaks TEST_CASE("bad jpeg file doesn't cause an overflow", "[image-decoder]") { - auto file = ReadFile("../assets/bad.jpg"); + auto file = ReadFile("assets/bad.jpg"); REQUIRE(file.size() == 88731); auto bitmap = Bitmap::decode(file.data(), file.size()); @@ -47,7 +47,7 @@ TEST_CASE("bad jpeg file doesn't cause an overflow", "[image-decoder]") TEST_CASE("bad png file doesn't cause an overflow", "[image-decoder]") { - auto file = ReadFile("../assets/bad.png"); + auto file = ReadFile("assets/bad.png"); REQUIRE(file.size() == 534283); auto bitmap = Bitmap::decode(file.data(), file.size()); @@ -67,7 +67,7 @@ TEST_CASE("bad png file doesn't cause an overflow", "[image-decoder]") TEST_CASE("webp file decodes correctly", "[image-decoder]") { - auto file = ReadFile("../assets/1.webp"); + auto file = ReadFile("assets/1.webp"); REQUIRE(file.size() == 30320); auto bitmap = Bitmap::decode(file.data(), file.size()); diff --git a/tests/unit_tests/runtime/image_mesh_test.cpp b/tests/unit_tests/runtime/image_mesh_test.cpp index 9b999c5a..76c70e51 100644 --- a/tests/unit_tests/runtime/image_mesh_test.cpp +++ b/tests/unit_tests/runtime/image_mesh_test.cpp @@ -13,7 +13,7 @@ TEST_CASE("image with mesh loads correctly", "[mesh]") { - auto file = ReadRiveFile("../assets/tape.riv"); + auto file = ReadRiveFile("assets/tape.riv"); auto node = file->artboard()->find("Tape body.png"); REQUIRE(node != nullptr); @@ -28,7 +28,7 @@ TEST_CASE("image with mesh loads correctly", "[mesh]") TEST_CASE("duplicating a mesh shares the indices", "[mesh]") { - auto file = ReadRiveFile("../assets/tape.riv"); + auto file = ReadRiveFile("assets/tape.riv"); auto instance1 = file->artboardDefault(); auto instance2 = file->artboardDefault(); diff --git a/tests/unit_tests/runtime/in_band_asset_load_test.cpp b/tests/unit_tests/runtime/in_band_asset_load_test.cpp index bd425ff0..f547b543 100644 --- a/tests/unit_tests/runtime/in_band_asset_load_test.cpp +++ b/tests/unit_tests/runtime/in_band_asset_load_test.cpp @@ -48,7 +48,7 @@ public: TEST_CASE("Load asset with in-band image", "[asset]") { - auto file = ReadRiveFile("../assets/in_band_asset.riv"); + auto file = ReadRiveFile("assets/in_band_asset.riv"); auto assets = file->assets(); REQUIRE(assets.size() == 1); @@ -75,7 +75,7 @@ TEST_CASE("Load asset with in-band image, passing responsibility to loader", "[a // our Loader has not attempted to load any asset. REQUIRE(loader.attemptedAsset == nullptr); - auto file = ReadRiveFile("../assets/in_band_asset.riv", nullptr, &loader); + auto file = ReadRiveFile("assets/in_band_asset.riv", nullptr, &loader); auto assets = file->assets(); REQUIRE(assets.size() == 1); @@ -108,7 +108,7 @@ TEST_CASE("Load asset with in-band image, passing responsibility to loader", "[a TEST_CASE("Load asset with in-band image, rejecting the loading responsiblity as loader", "[asset]") { auto loader = RejectAssetLoader(); - auto file = ReadRiveFile("../assets/in_band_asset.riv", nullptr, &loader); + auto file = ReadRiveFile("assets/in_band_asset.riv", nullptr, &loader); auto assets = file->assets(); auto firstAsset = assets[0]; REQUIRE(firstAsset->is()); diff --git a/tests/unit_tests/runtime/instancing_test.cpp b/tests/unit_tests/runtime/instancing_test.cpp index 4e7ea060..d2707eb0 100644 --- a/tests/unit_tests/runtime/instancing_test.cpp +++ b/tests/unit_tests/runtime/instancing_test.cpp @@ -11,7 +11,7 @@ TEST_CASE("cloning an ellipse works", "[instancing]") { - auto file = ReadRiveFile("../assets/circle_clips.riv"); + auto file = ReadRiveFile("assets/circle_clips.riv"); auto node = file->artboard()->find("TopEllipse"); REQUIRE(node != nullptr); @@ -25,7 +25,7 @@ TEST_CASE("cloning an ellipse works", "[instancing]") TEST_CASE("instancing artboard clones clipped properties", "[instancing]") { - auto file = ReadRiveFile("../assets/circle_clips.riv"); + auto file = ReadRiveFile("assets/circle_clips.riv"); REQUIRE(!file->artboard()->isInstance()); @@ -50,7 +50,7 @@ TEST_CASE("instancing artboard clones clipped properties", "[instancing]") TEST_CASE("instancing artboard doesn't clone animations", "[instancing]") { - auto file = ReadRiveFile("../assets/juice.riv"); + auto file = ReadRiveFile("assets/juice.riv"); auto artboard = file->artboardDefault(); diff --git a/tests/unit_tests/runtime/joystick_flags_test.cpp b/tests/unit_tests/runtime/joystick_flags_test.cpp index afdb4aaf..d844484c 100644 --- a/tests/unit_tests/runtime/joystick_flags_test.cpp +++ b/tests/unit_tests/runtime/joystick_flags_test.cpp @@ -5,7 +5,7 @@ TEST_CASE("joystick flags load as expected", "[file]") { - auto file = ReadRiveFile("../assets/joystick_flag_test.riv"); + auto file = ReadRiveFile("assets/joystick_flag_test.riv"); auto artboard = file->artboard(); auto invertX = artboard->find("Invert X Joystick"); diff --git a/tests/unit_tests/runtime/layout_test.cpp b/tests/unit_tests/runtime/layout_test.cpp index 50540750..c4493720 100644 --- a/tests/unit_tests/runtime/layout_test.cpp +++ b/tests/unit_tests/runtime/layout_test.cpp @@ -9,7 +9,7 @@ TEST_CASE("LayoutComponent FlexDirection row", "[layout]") { - auto file = ReadRiveFile("../assets/layout/layout_horizontal.riv"); + auto file = ReadRiveFile("assets/layout/layout_horizontal.riv"); auto artboard = file->artboard(); @@ -37,7 +37,7 @@ TEST_CASE("LayoutComponent FlexDirection row", "[layout]") TEST_CASE("LayoutComponent FlexDirection column", "[layout]") { - auto file = ReadRiveFile("../assets/layout/layout_vertical.riv"); + auto file = ReadRiveFile("assets/layout/layout_vertical.riv"); auto artboard = file->artboard(); @@ -65,7 +65,7 @@ TEST_CASE("LayoutComponent FlexDirection column", "[layout]") TEST_CASE("LayoutComponent FlexDirection row with gap", "[layout]") { - auto file = ReadRiveFile("../assets/layout/layout_horizontal_gaps.riv"); + auto file = ReadRiveFile("assets/layout/layout_horizontal_gaps.riv"); auto artboard = file->artboard(); @@ -93,7 +93,7 @@ TEST_CASE("LayoutComponent FlexDirection row with gap", "[layout]") TEST_CASE("LayoutComponent FlexDirection row with wrap", "[layout]") { - auto file = ReadRiveFile("../assets/layout/layout_horizontal_wrap.riv"); + auto file = ReadRiveFile("assets/layout/layout_horizontal_wrap.riv"); auto artboard = file->artboard(); @@ -109,7 +109,7 @@ TEST_CASE("LayoutComponent FlexDirection row with wrap", "[layout]") TEST_CASE("LayoutComponent Center using alignItems and justifyContent", "[layout]") { - auto file = ReadRiveFile("../assets/layout/layout_center.riv"); + auto file = ReadRiveFile("assets/layout/layout_center.riv"); auto artboard = file->artboard(); @@ -125,7 +125,7 @@ TEST_CASE("LayoutComponent Center using alignItems and justifyContent", "[layout TEST_CASE("LayoutComponent with intrinsic size gets measured correctly", "[layout]") { - auto file = ReadRiveFile("../assets/layout/measure_tests.riv"); + auto file = ReadRiveFile("assets/layout/measure_tests.riv"); auto artboard = file->artboard("hi"); diff --git a/tests/unit_tests/runtime/line_break_test.cpp b/tests/unit_tests/runtime/line_break_test.cpp index d3dbd081..f01be94c 100644 --- a/tests/unit_tests/runtime/line_break_test.cpp +++ b/tests/unit_tests/runtime/line_break_test.cpp @@ -27,7 +27,7 @@ static rive::TextRun append(std::vector* unichars, static rcp loadFont(const char* filename) { - FILE* fp = fopen("../assets/RobotoFlex.ttf", "rb"); + FILE* fp = fopen("assets/RobotoFlex.ttf", "rb"); REQUIRE(fp != nullptr); fseek(fp, 0, SEEK_END); @@ -42,7 +42,7 @@ static rcp loadFont(const char* filename) TEST_CASE("line breaker separates words", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -66,7 +66,7 @@ TEST_CASE("line breaker separates words", "[line break]") TEST_CASE("line breaker handles multiple runs", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); std::vector truns; @@ -99,7 +99,7 @@ TEST_CASE("line breaker handles multiple runs", "[line break]") TEST_CASE("line breaker handles returns", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); std::vector truns; @@ -133,7 +133,7 @@ TEST_CASE("line breaker handles returns", "[line break]") TEST_CASE("line breaker builds lines", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -180,7 +180,7 @@ TEST_CASE("line breaker builds lines", "[line break]") TEST_CASE("line breaker deals with extremes", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -236,7 +236,7 @@ TEST_CASE("line breaker deals with extremes", "[line break]") TEST_CASE("line breaker breaks return characters", "[line break]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -257,7 +257,7 @@ TEST_CASE("line breaker breaks return characters", "[line break]") TEST_CASE("shaper separates paragraphs", "[shaper]") { - auto font = loadFont("../assets/RobotoFlex.ttf"); + auto font = loadFont("assets/RobotoFlex.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -291,7 +291,7 @@ TEST_CASE("shaper separates paragraphs", "[shaper]") TEST_CASE("shaper handles RTL", "[shaper]") { - auto font = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto font = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(font != nullptr); // one two⏎ three @@ -323,7 +323,7 @@ TEST_CASE("shaper handles RTL", "[shaper]") TEST_CASE("shaper handles empty space", "[shaper]") { - auto font = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto font = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(font != nullptr); std::vector truns; @@ -342,7 +342,7 @@ TEST_CASE("shaper handles empty space", "[shaper]") TEST_CASE("line breaker deals with empty paragraphs", "[line break]") { - auto font = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto font = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(font != nullptr); std::vector truns; @@ -376,7 +376,7 @@ TEST_CASE("line breaker deals with empty paragraphs", "[line break]") TEST_CASE("line breaker deals with space only lines", "[line break]") { - auto font = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto font = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(font != nullptr); std::vector truns; @@ -397,7 +397,7 @@ TEST_CASE("line breaker deals with space only lines", "[line break]") TEST_CASE("line breaker deals with empty lines", "[line break]") { - auto font = loadFont("../assets/IBMPlexSansArabic-Regular.ttf"); + auto font = loadFont("assets/IBMPlexSansArabic-Regular.ttf"); REQUIRE(font != nullptr); std::vector truns; diff --git a/tests/unit_tests/runtime/linear_animation_test.cpp b/tests/unit_tests/runtime/linear_animation_test.cpp index f1bb6b47..8ffb3f8f 100644 --- a/tests/unit_tests/runtime/linear_animation_test.cpp +++ b/tests/unit_tests/runtime/linear_animation_test.cpp @@ -59,7 +59,7 @@ TEST_CASE("LinearAnimation with negative speed have reversed start and end secon TEST_CASE("quantize goes to whole frames", "[animation]") { - auto file = ReadRiveFile("../assets/quantize_test.riv"); + auto file = ReadRiveFile("assets/quantize_test.riv"); auto artboard = file->artboard(); auto animation = artboard->animation(0); REQUIRE(animation->quantize()); @@ -127,7 +127,7 @@ public: TEST_CASE("Looping timeline events load correctly and report", "[events]") { - auto file = ReadRiveFile("../assets/looping_timeline_events.riv"); + auto file = ReadRiveFile("assets/looping_timeline_events.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/listener_align_target_test.cpp b/tests/unit_tests/runtime/listener_align_target_test.cpp index 8be9bec5..b0d6afa2 100644 --- a/tests/unit_tests/runtime/listener_align_target_test.cpp +++ b/tests/unit_tests/runtime/listener_align_target_test.cpp @@ -19,7 +19,7 @@ TEST_CASE("align target with preserve offset off test", "[listener_align]") { // The circle starts at coords 100, 100 // Once the pointer move has acted, the new coords should be 100, 51 - auto file = ReadRiveFile("../assets/align_target.riv"); + auto file = ReadRiveFile("assets/align_target.riv"); auto artboard = file->artboard("preserve-inactive"); auto artboardInstance = artboard->instance(); @@ -52,7 +52,7 @@ TEST_CASE("align target preserve offset test", "[listener_align]") { // The circle starts at coords 100, 100 // Once the pointer move has acted, the new coords should be 100, 101 - auto file = ReadRiveFile("../assets/align_target.riv"); + auto file = ReadRiveFile("assets/align_target.riv"); auto artboard = file->artboard("preserve-active"); auto artboardInstance = artboard->instance(); diff --git a/tests/unit_tests/runtime/nested_artboard.cpp b/tests/unit_tests/runtime/nested_artboard.cpp index 83ae8f77..468e2cf7 100644 --- a/tests/unit_tests/runtime/nested_artboard.cpp +++ b/tests/unit_tests/runtime/nested_artboard.cpp @@ -13,7 +13,7 @@ TEST_CASE("collapsed nested artboards do not advance", "[solo]") { - auto file = ReadRiveFile("../assets/solos_with_nested_artboards.riv"); + auto file = ReadRiveFile("assets/solos_with_nested_artboards.riv"); auto artboard = file->artboard("main-artboard")->instance(); artboard->advance(0.0f); @@ -42,7 +42,7 @@ TEST_CASE("collapsed nested artboards do not advance", "[solo]") TEST_CASE("nested artboards with looping animations will keep main advanceAndApply advancing", "[nested]") { - auto file = ReadRiveFile("../assets/ball_test.riv"); + auto file = ReadRiveFile("assets/ball_test.riv"); auto artboard = file->artboard("Artboard")->instance(); artboard->advance(0.0f); auto stateMachine = artboard->stateMachineAt(0); @@ -54,7 +54,7 @@ TEST_CASE("nested artboards with one shot animations will not main advanceAndApp "[nested]") { - auto file = ReadRiveFile("../assets/ball_test.riv"); + auto file = ReadRiveFile("assets/ball_test.riv"); auto artboard = file->artboard("Artboard 2")->instance(); artboard->advance(0.0f); auto stateMachine = artboard->stateMachineAt(0); diff --git a/tests/unit_tests/runtime/nested_artboard_opacity_test.cpp b/tests/unit_tests/runtime/nested_artboard_opacity_test.cpp index e1789555..d8b4bd24 100644 --- a/tests/unit_tests/runtime/nested_artboard_opacity_test.cpp +++ b/tests/unit_tests/runtime/nested_artboard_opacity_test.cpp @@ -6,7 +6,7 @@ TEST_CASE("Nested artboard background renders with opacity", "[file]") { - auto file = ReadRiveFile("../assets/nested_artboard_opacity.riv"); + auto file = ReadRiveFile("assets/nested_artboard_opacity.riv"); auto mainArtboard = file->artboard()->instance(); REQUIRE(mainArtboard->find("Parent Artboard") != nullptr); diff --git a/tests/unit_tests/runtime/nested_input_test.cpp b/tests/unit_tests/runtime/nested_input_test.cpp index c9cba379..bd0c3b0a 100644 --- a/tests/unit_tests/runtime/nested_input_test.cpp +++ b/tests/unit_tests/runtime/nested_input_test.cpp @@ -13,7 +13,7 @@ TEST_CASE("validate nested boolean get/set", "[nestedInput]") { - auto file = ReadRiveFile("../assets/runtime_nested_inputs.riv"); + auto file = ReadRiveFile("assets/runtime_nested_inputs.riv"); auto artboard = file->artboard("MainArtboard")->instance(); REQUIRE(artboard != nullptr); @@ -47,7 +47,7 @@ TEST_CASE("validate nested boolean get/set", "[nestedInput]") TEST_CASE("validate nested number get/set", "[nestedInput]") { - auto file = ReadRiveFile("../assets/runtime_nested_inputs.riv"); + auto file = ReadRiveFile("assets/runtime_nested_inputs.riv"); auto artboard = file->artboard("MainArtboard")->instance(); REQUIRE(artboard != nullptr); @@ -81,7 +81,7 @@ TEST_CASE("validate nested number get/set", "[nestedInput]") TEST_CASE("validate nested trigger fire", "[nestedInput]") { - auto file = ReadRiveFile("../assets/runtime_nested_inputs.riv"); + auto file = ReadRiveFile("assets/runtime_nested_inputs.riv"); auto artboard = file->artboard("MainArtboard")->instance(); REQUIRE(artboard != nullptr); @@ -106,7 +106,7 @@ TEST_CASE("validate nested trigger fire", "[nestedInput]") TEST_CASE("validate nested boolean get/set multiple nested artboards deep", "[nestedInput]") { - auto file = ReadRiveFile("../assets/runtime_nested_inputs.riv"); + auto file = ReadRiveFile("assets/runtime_nested_inputs.riv"); auto artboard = file->artboard("MainArtboard")->instance(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/nested_text_run_test.cpp b/tests/unit_tests/runtime/nested_text_run_test.cpp index 404478fd..cf0fecb9 100644 --- a/tests/unit_tests/runtime/nested_text_run_test.cpp +++ b/tests/unit_tests/runtime/nested_text_run_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("validate nested text get/set", "[nestedText]") { - auto file = ReadRiveFile("../assets/runtime_nested_text_runs.riv"); + auto file = ReadRiveFile("assets/runtime_nested_text_runs.riv"); auto artboard = file->artboard("ArtboardA")->instance(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/path_test.cpp b/tests/unit_tests/runtime/path_test.cpp index 342beb63..4a35e07e 100644 --- a/tests/unit_tests/runtime/path_test.cpp +++ b/tests/unit_tests/runtime/path_test.cpp @@ -268,7 +268,7 @@ TEST_CASE("ellipse path builds expected commands", "[path]") TEST_CASE("nested solo with shape expanded and path collapsed", "[path]") { TestNoOpFactory emptyFactory; - auto file = ReadRiveFile("../assets/solos_collapse_tests.riv", &emptyFactory); + auto file = ReadRiveFile("assets/solos_collapse_tests.riv", &emptyFactory); auto artboard = file->artboard("test-1-shape-with-shape-and-path")->instance(); // Root-Shape @@ -300,7 +300,7 @@ TEST_CASE("nested solo with shape expanded and path collapsed", "[path]") TEST_CASE("nested solo clipping with shape collapsed and path expanded", "[path]") { TestNoOpFactory emptyFactory; - auto file = ReadRiveFile("../assets/solos_collapse_tests.riv", &emptyFactory); + auto file = ReadRiveFile("assets/solos_collapse_tests.riv", &emptyFactory); auto artboard = file->artboard("test-2-clip-with-shape-and-path")->instance(); // Root-Shape @@ -333,7 +333,7 @@ TEST_CASE("nested solo clipping with shape collapsed and path expanded", "[path] TEST_CASE("nested solo clipping with animation", "[path]") { TestNoOpFactory emptyFactory; - auto file = ReadRiveFile("../assets/solos_collapse_tests.riv", &emptyFactory); + auto file = ReadRiveFile("assets/solos_collapse_tests.riv", &emptyFactory); auto artboard = file->artboard("test-5-clip-with-group-and-path-and-shape")->instance(); artboard->advance(0.0f); @@ -377,7 +377,7 @@ TEST_CASE("nested solo clipping with animation", "[path]") TEST_CASE("double nested solos clipping with animation", "[path]") { TestNoOpFactory emptyFactory; - auto file = ReadRiveFile("../assets/solos_collapse_tests.riv", &emptyFactory); + auto file = ReadRiveFile("assets/solos_collapse_tests.riv", &emptyFactory); auto artboard = file->artboard("test-6-clip-with-nested-solos")->instance(); artboard->advance(0.0f); diff --git a/tests/unit_tests/runtime/rotation_constraint_test.cpp b/tests/unit_tests/runtime/rotation_constraint_test.cpp index f6aa18bc..069614ff 100644 --- a/tests/unit_tests/runtime/rotation_constraint_test.cpp +++ b/tests/unit_tests/runtime/rotation_constraint_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("rotation constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/rotation_constraint.riv"); + auto file = ReadRiveFile("assets/rotation_constraint.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/scale_constraint_test.cpp b/tests/unit_tests/runtime/scale_constraint_test.cpp index 9faf6294..7a21698a 100644 --- a/tests/unit_tests/runtime/scale_constraint_test.cpp +++ b/tests/unit_tests/runtime/scale_constraint_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("scale constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/scale_constraint.riv"); + auto file = ReadRiveFile("assets/scale_constraint.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/simd_test.cpp b/tests/unit_tests/runtime/simd_test.cpp index 2192f120..999fee45 100644 --- a/tests/unit_tests/runtime/simd_test.cpp +++ b/tests/unit_tests/runtime/simd_test.cpp @@ -239,15 +239,15 @@ template void check_if_then_else() { using vec4 = simd::gvec; using vec2 = simd::gvec; + using bmask = typename simd::boolean_mask_type::type; // Vector condition. vec4 f4 = simd::if_then_else(vec4{1, 2, 3, 4} < vec4{4, 3, 2, 1}, vec4(1), vec4(2)); CHECK_ALL((f4 == vec4{1, 1, 2, 2})); // In vector, -1 is true, 0 is false. - vec2 u2 = simd::if_then_else(simd::gvec::type, 2>{0, -1}, - vec2{1, 2}, - vec2{3, 4}); + vec2 u2 = + simd::if_then_else(simd::gvec{0, static_cast(-1)}, vec2{1, 2}, vec2{3, 4}); CHECK_ALL((u2 == vec2{3, 2})); // Scalar condition. diff --git a/tests/unit_tests/runtime/solo_test.cpp b/tests/unit_tests/runtime/solo_test.cpp index 89f7bada..8ce0ac52 100644 --- a/tests/unit_tests/runtime/solo_test.cpp +++ b/tests/unit_tests/runtime/solo_test.cpp @@ -12,7 +12,7 @@ TEST_CASE("file with skins in solos loads correctly", "[solo]") { - auto file = ReadRiveFile("../assets/death_knight.riv"); + auto file = ReadRiveFile("assets/death_knight.riv"); auto artboard = file->artboard()->instance(); artboard->advance(0.0f); @@ -22,7 +22,7 @@ TEST_CASE("file with skins in solos loads correctly", "[solo]") TEST_CASE("children load correctly", "[solo]") { - auto file = ReadRiveFile("../assets/solo_test.riv"); + auto file = ReadRiveFile("assets/solo_test.riv"); auto artboard = file->artboard()->instance(); artboard->advance(0.0f); @@ -76,7 +76,7 @@ TEST_CASE("children load correctly", "[solo]") TEST_CASE("nested solos work", "[solo]") { - auto file = ReadRiveFile("../assets/nested_solo.riv"); + auto file = ReadRiveFile("assets/nested_solo.riv"); auto artboard = file->artboard()->instance(); artboard->advance(0.0f); @@ -158,7 +158,7 @@ TEST_CASE("nested solos work", "[solo]") TEST_CASE("hit test on solos", "[solo]") { - auto file = ReadRiveFile("../assets/hit_test_solos.riv"); + auto file = ReadRiveFile("assets/hit_test_solos.riv"); auto artboard = file->artboard()->instance(); @@ -221,7 +221,7 @@ TEST_CASE("hit test on solos", "[solo]") TEST_CASE("hit test on nested artboards in solos", "[solo]") { - auto file = ReadRiveFile("../assets/pointer_events_nested_artboards_in_solos.riv"); + auto file = ReadRiveFile("assets/pointer_events_nested_artboards_in_solos.riv"); auto mainArtboard = file->artboard()->instance(); diff --git a/tests/unit_tests/runtime/state_machine_event_test.cpp b/tests/unit_tests/runtime/state_machine_event_test.cpp index 92f07e56..60998070 100644 --- a/tests/unit_tests/runtime/state_machine_event_test.cpp +++ b/tests/unit_tests/runtime/state_machine_event_test.cpp @@ -25,7 +25,7 @@ TEST_CASE("file with state machine listeners be read", "[file]") { - auto file = ReadRiveFile("../assets/bullet_man.riv"); + auto file = ReadRiveFile("assets/bullet_man.riv"); auto artboard = file->artboard("Bullet Man"); REQUIRE(artboard != nullptr); @@ -71,7 +71,7 @@ TEST_CASE("file with state machine listeners be read", "[file]") TEST_CASE("hit testing via a state machine works", "[file]") { - auto file = ReadRiveFile("../assets/bullet_man.riv"); + auto file = ReadRiveFile("assets/bullet_man.riv"); auto artboard = file->artboard("Bullet Man")->instance(); REQUIRE(artboard != nullptr); @@ -94,7 +94,7 @@ TEST_CASE("hit testing via a state machine works", "[file]") TEST_CASE("hit a toggle boolean listener", "[file]") { - auto file = ReadRiveFile("../assets/light_switch.riv"); + auto file = ReadRiveFile("assets/light_switch.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); @@ -123,7 +123,7 @@ TEST_CASE("hit a toggle boolean listener", "[file]") TEST_CASE("can query for all rive events", "[events]") { - auto file = ReadRiveFile("../assets/event_on_listener.riv"); + auto file = ReadRiveFile("assets/event_on_listener.riv"); auto artboard = file->artboard(); auto eventCount = artboard->count(); @@ -132,7 +132,7 @@ TEST_CASE("can query for all rive events", "[events]") TEST_CASE("can query for a rive event at a given index", "[events]") { - auto file = ReadRiveFile("../assets/event_on_listener.riv"); + auto file = ReadRiveFile("assets/event_on_listener.riv"); auto artboard = file->artboard(); auto event = artboard->objectAt(0); @@ -141,7 +141,7 @@ TEST_CASE("can query for a rive event at a given index", "[events]") TEST_CASE("events load correctly on a listener", "[events]") { - auto file = ReadRiveFile("../assets/event_on_listener.riv"); + auto file = ReadRiveFile("assets/event_on_listener.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); @@ -187,7 +187,7 @@ TEST_CASE("events load correctly on a listener", "[events]") TEST_CASE("events load correctly on a state and transition", "[events]") { - auto file = ReadRiveFile("../assets/events_on_states.riv"); + auto file = ReadRiveFile("assets/events_on_states.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); @@ -237,7 +237,7 @@ TEST_CASE("events load correctly on a state and transition", "[events]") TEST_CASE("timeline events load correctly and report", "[events]") { - auto file = ReadRiveFile("../assets/timeline_event_test.riv"); + auto file = ReadRiveFile("assets/timeline_event_test.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); @@ -263,7 +263,7 @@ TEST_CASE("timeline events load correctly and report", "[events]") TEST_CASE("events from a nested artboard propagate to a listener on a parent", "[events]") { - auto file = ReadRiveFile("../assets/nested_event_test.riv"); + auto file = ReadRiveFile("assets/nested_event_test.riv"); auto artboard = file->artboard()->instance(); REQUIRE(artboard != nullptr); diff --git a/tests/unit_tests/runtime/state_machine_test.cpp b/tests/unit_tests/runtime/state_machine_test.cpp index ee146045..b94305fe 100644 --- a/tests/unit_tests/runtime/state_machine_test.cpp +++ b/tests/unit_tests/runtime/state_machine_test.cpp @@ -20,7 +20,7 @@ TEST_CASE("file with state machine be read", "[file]") { - auto file = ReadRiveFile("../assets/rocket.riv"); + auto file = ReadRiveFile("assets/rocket.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); @@ -93,7 +93,7 @@ TEST_CASE("file with state machine be read", "[file]") TEST_CASE("file with blend states loads correctly", "[file]") { - auto file = ReadRiveFile("../assets/blend_test.riv"); + auto file = ReadRiveFile("assets/blend_test.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); @@ -149,7 +149,7 @@ TEST_CASE("file with blend states loads correctly", "[file]") TEST_CASE("animation state with no animation doesn't crash", "[file]") { - auto file = ReadRiveFile("../assets/multiple_state_machines.riv"); + auto file = ReadRiveFile("assets/multiple_state_machines.riv"); auto artboard = file->artboard(); REQUIRE(artboard != nullptr); @@ -179,7 +179,7 @@ TEST_CASE("animation state with no animation doesn't crash", "[file]") TEST_CASE("1D blend state keeps keepsGoing true even when animations themselves have stopped", "[file]") { - auto file = ReadRiveFile("../assets/oneshotblend.riv"); + auto file = ReadRiveFile("assets/oneshotblend.riv"); auto artboard = file->artboard(); auto stateMachine = artboard->stateMachine("State Machine 1"); @@ -205,7 +205,7 @@ TEST_CASE("1D blend state keeps keepsGoing true even when animations themselves TEST_CASE("Transitions with duration completes the state correctly before changing states", "[file]") { - auto file = ReadRiveFile("../assets/state_machine_transition.riv"); + auto file = ReadRiveFile("assets/state_machine_transition.riv"); auto black_color = 0xFF000000; auto white_color = 0xFFFFFFFF; @@ -246,7 +246,7 @@ TEST_CASE("Transitions with duration completes the state correctly before changi TEST_CASE("Blend state animations with reset applied to them.", "[file]") { - auto file = ReadRiveFile("../assets/animation_reset_cases.riv"); + auto file = ReadRiveFile("assets/animation_reset_cases.riv"); auto artboard = file->artboard(); auto stateMachine = artboard->stateMachine("blend-states-state-machine"); @@ -341,7 +341,7 @@ TEST_CASE("Blend state animations with reset applied to them.", "[file]") TEST_CASE("Transitions with reset applied to them.", "[file]") { - auto file = ReadRiveFile("../assets/animation_reset_cases.riv"); + auto file = ReadRiveFile("assets/animation_reset_cases.riv"); auto artboard = file->artboard("transitions"); auto stateMachine = artboard->stateMachine("transitions-state-machine"); diff --git a/tests/unit_tests/runtime/stroke_test.cpp b/tests/unit_tests/runtime/stroke_test.cpp index c301ce00..4820bf9b 100644 --- a/tests/unit_tests/runtime/stroke_test.cpp +++ b/tests/unit_tests/runtime/stroke_test.cpp @@ -12,7 +12,7 @@ TEST_CASE("stroke can be looked up at runtime", "[file]") { - auto file = ReadRiveFile("../assets/stroke_name_test.riv"); + auto file = ReadRiveFile("assets/stroke_name_test.riv"); auto artboard = file->artboard(); REQUIRE(artboard->find("white_stroke") != nullptr); diff --git a/tests/unit_tests/runtime/text_modifier_test.cpp b/tests/unit_tests/runtime/text_modifier_test.cpp index 98f061b7..19ddb8f4 100644 --- a/tests/unit_tests/runtime/text_modifier_test.cpp +++ b/tests/unit_tests/runtime/text_modifier_test.cpp @@ -9,7 +9,7 @@ TEST_CASE("text modifiers load correctly", "[text]") { - auto file = ReadRiveFile("../assets/modifier_test.riv"); + auto file = ReadRiveFile("assets/modifier_test.riv"); auto artboard = file->artboard(); auto textObjects = artboard->find(); diff --git a/tests/unit_tests/runtime/text_test.cpp b/tests/unit_tests/runtime/text_test.cpp index 24d26449..704f0d54 100644 --- a/tests/unit_tests/runtime/text_test.cpp +++ b/tests/unit_tests/runtime/text_test.cpp @@ -11,7 +11,7 @@ TEST_CASE("file with text loads correctly", "[text]") { - auto file = ReadRiveFile("../assets/new_text.riv"); + auto file = ReadRiveFile("assets/new_text.riv"); auto artboard = file->artboard(); auto textObjects = artboard->find(); @@ -30,7 +30,7 @@ TEST_CASE("file with text loads correctly", "[text]") TEST_CASE("can query for all text runs", "[text]") { - auto file = ReadRiveFile("../assets/new_text.riv"); + auto file = ReadRiveFile("assets/new_text.riv"); auto artboard = file->artboard(); auto textRunCount = artboard->count(); @@ -39,7 +39,7 @@ TEST_CASE("can query for all text runs", "[text]") TEST_CASE("can query for a text run at a given index", "[text]") { - auto file = ReadRiveFile("../assets/hello_world.riv"); + auto file = ReadRiveFile("assets/hello_world.riv"); auto artboard = file->artboard(); auto textRun = artboard->objectAt(0); @@ -48,7 +48,7 @@ TEST_CASE("can query for a text run at a given index", "[text]") TEST_CASE("simple text loads", "[text]") { - auto file = ReadRiveFile("../assets/hello_world.riv"); + auto file = ReadRiveFile("assets/hello_world.riv"); auto artboard = file->artboard(); auto textObjects = artboard->find(); @@ -107,7 +107,7 @@ TEST_CASE("simple text loads", "[text]") TEST_CASE("ellipsis is shown", "[text]") { - auto file = ReadRiveFile("../assets/ellipsis.riv"); + auto file = ReadRiveFile("assets/ellipsis.riv"); auto artboard = file->artboard(); auto textObjects = artboard->find(); @@ -199,7 +199,7 @@ TEST_CASE("range mapper maps words", "[text]") TEST_CASE("run modifier ranges select runs", "[text]") { - auto file = ReadRiveFile("../assets/modifier_to_run.riv"); + auto file = ReadRiveFile("assets/modifier_to_run.riv"); auto artboard = file->artboard(); artboard->advance(0.0f); @@ -268,7 +268,7 @@ TEST_CASE("run modifier ranges select runs", "[text]") TEST_CASE("run modifier ranges select runs with varying text size", "[text]") { - auto file = ReadRiveFile("../assets/test_modifier_run.riv"); + auto file = ReadRiveFile("assets/test_modifier_run.riv"); auto artboard = file->artboard(); artboard->advance(0.0f); @@ -315,7 +315,7 @@ TEST_CASE("run modifier ranges select runs with varying text size", "[text]") TEST_CASE("double new line type works", "[text]") { - auto file = ReadRiveFile("../assets/double_line.riv"); + auto file = ReadRiveFile("assets/double_line.riv"); auto artboard = file->artboard(); auto textObjects = artboard->find(); diff --git a/tests/unit_tests/runtime/transform_constraint_test.cpp b/tests/unit_tests/runtime/transform_constraint_test.cpp index cb78bacb..5f7a7ec1 100644 --- a/tests/unit_tests/runtime/transform_constraint_test.cpp +++ b/tests/unit_tests/runtime/transform_constraint_test.cpp @@ -9,7 +9,7 @@ TEST_CASE("transform constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/transform_constraint.riv"); + auto file = ReadRiveFile("assets/transform_constraint.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/translation_constraint_test.cpp b/tests/unit_tests/runtime/translation_constraint_test.cpp index aa448a36..5dd9fd1a 100644 --- a/tests/unit_tests/runtime/translation_constraint_test.cpp +++ b/tests/unit_tests/runtime/translation_constraint_test.cpp @@ -10,7 +10,7 @@ TEST_CASE("translation constraint updates world transform", "[file]") { - auto file = ReadRiveFile("../assets/translation_constraint.riv"); + auto file = ReadRiveFile("assets/translation_constraint.riv"); auto artboard = file->artboard(); diff --git a/tests/unit_tests/runtime/trim_test.cpp b/tests/unit_tests/runtime/trim_test.cpp index 389df22a..876c4627 100644 --- a/tests/unit_tests/runtime/trim_test.cpp +++ b/tests/unit_tests/runtime/trim_test.cpp @@ -12,7 +12,7 @@ TEST_CASE("A 0 scale path will trim with no crash", "[file]") { - auto file = ReadRiveFile("../assets/trim.riv"); + auto file = ReadRiveFile("assets/trim.riv"); auto artboard = file->artboard(); auto node = artboard->find("I");