summaryrefslogtreecommitdiffstats
path: root/tests/scene/test_sprite_frames.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-08-04 15:55:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-08-04 22:03:44 +0200
commit62423b691eff1da8a93a76e1149a1ba1e3ed46b1 (patch)
tree2c6b09ccdc5544237595c78f22389e63b1c90800 /tests/scene/test_sprite_frames.h
parentdaa1220a8605be05a2d0cd1c2def71238fcb15ac (diff)
downloadredot-engine-62423b691eff1da8a93a76e1149a1ba1e3ed46b1.tar.gz
Tests: Silence some intentional errors
Also fix printing messages in ClassDB test.
Diffstat (limited to 'tests/scene/test_sprite_frames.h')
-rw-r--r--tests/scene/test_sprite_frames.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/scene/test_sprite_frames.h b/tests/scene/test_sprite_frames.h
index b252ea8aae..61bbd16493 100644
--- a/tests/scene/test_sprite_frames.h
+++ b/tests/scene/test_sprite_frames.h
@@ -144,7 +144,7 @@ TEST_CASE("[SpriteFrames] Animation Speed getter and setter") {
frames.get_animation_speed(test_animation_name) == 5.0,
"Sets new animation to default speed");
- frames.set_animation_speed("GodotTest", 123.0004);
+ frames.set_animation_speed(test_animation_name, 123.0004);
CHECK_MESSAGE(
frames.get_animation_speed(test_animation_name) == 123.0004,
@@ -197,7 +197,7 @@ TEST_CASE("[SpriteFrames] Animation Loop getter and setter") {
}
// TODO
-TEST_CASE("[SpriteFrames] Frame addition, removal, and retrival") {
+TEST_CASE("[SpriteFrames] Frame addition, removal, and retrieval") {
Ref<Texture2D> dummy_frame1;
dummy_frame1.instantiate();
@@ -212,13 +212,14 @@ TEST_CASE("[SpriteFrames] Frame addition, removal, and retrival") {
frames.add_frame(test_animation_name, dummy_frame1, 0);
frames.add_frame(test_animation_name, dummy_frame1, 1);
+ frames.add_frame(test_animation_name, dummy_frame1, 2);
CHECK_MESSAGE(
- frames.get_frame_count(test_animation_name) == 2,
+ frames.get_frame_count(test_animation_name) == 3,
"Adds multiple frames");
- frames.remove_frame(test_animation_name, 0);
frames.remove_frame(test_animation_name, 1);
+ frames.remove_frame(test_animation_name, 0);
CHECK_MESSAGE(
frames.get_frame_count(test_animation_name) == 1,