Add animation unit tests #143
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds comprehensive automated unit tests for animation functions in SplashKit. The existing
test_animation.cppprovides manual/interactive testing, but lacked automated unit tests that can be run as part of CI/CD pipelines.This PR adds
unit_test_animation.cppwhich provides automated tests for:Animation Script functions:
load_animation_script,free_animation_script,free_all_animation_scriptshas_animation_script,animation_script_named,animation_script_nameanimation_count,has_animation_named,animation_indexAnimation functions:
create_animation(multiple overloads with/without sound)free_animation,assign_animation(multiple overloads)animation_name,animation_current_cell,animation_endedanimation_entered_frame,animation_frame_time,animation_current_vectorupdate_animation,restart_animationEdge case handling:
The tests use the existing
kermit.txtanimation script resource and follow the same patterns as other unit tests in the project.Type of change
How Has This Been Tested?
Built the test project using CMake as per build instructions. All tests pass successfully.
Automated Testing:
Testing Checklist
Checklist