-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for AnimationPlayer
#92649
base: master
Are you sure you want to change the base?
Conversation
…and modified test_main.cpp to include the new file
AnimationPlayer
Since most of your code is commented out I'd suggest making this a draft until you're done, or remove the commented out code |
tests/test_main.cpp
Outdated
@@ -100,6 +100,8 @@ | |||
#include "tests/core/variant/test_variant.h" | |||
#include "tests/core/variant/test_variant_utility.h" | |||
#include "tests/scene/test_animation.h" | |||
#include "tests/scene/test_animation_player.h" | |||
#include "tests/scene/test_arraymesh.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "tests/scene/test_arraymesh.h" |
Don't move this here it's below to prevent errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see that, it copied it there when I synced with main repo, my bad.
tests/scene/test_animation_player.h
Outdated
namespace TestAnimationPlayer { | ||
|
||
TEST_CASE("[AnimationPlayer] get & set default_blend_time") { | ||
AnimationPlayer *animationPlayer = memnew(AnimationPlayer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnimationPlayer *animationPlayer = memnew(AnimationPlayer); | |
AnimationPlayer *animation_player = memnew(AnimationPlayer); |
Please use snake_case
, for all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, correcting and updating now.
AnimationPlayer
AnimationPlayer
…mation_player.h and deleted commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding [SceneTree] will allow you to call more godot functionaility.
I need to add a test to guard #97760. Should I add my test there, since this thread seems still ongoing? |
Added file test_animation_player.h under tests/scene.
File contains tests cases for methods set_default_blend_time, get_default_blend_time, set_blend_time and get_blend_time.
Modified test_main.cpp to include the new test file.
EDIT: forgot to link to issue #43440 (sorry).