diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-30 01:14:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-30 01:14:47 +0300 |
commit | c5e926c01a5a767ed73286b4b5570a4bbb0a26ac (patch) | |
tree | 52e0c216cdfbc38a271d3d566b8e6d466765f737 /src/resources/sprite | |
parent | ede06c1fe25184b1232687950ce79dc29352c00b (diff) | |
download | manaverse-c5e926c01a5a767ed73286b4b5570a4bbb0a26ac.tar.gz manaverse-c5e926c01a5a767ed73286b4b5570a4bbb0a26ac.tar.bz2 manaverse-c5e926c01a5a767ed73286b4b5570a4bbb0a26ac.tar.xz manaverse-c5e926c01a5a767ed73286b4b5570a4bbb0a26ac.zip |
Fix some leaks in unit tests.
Diffstat (limited to 'src/resources/sprite')
-rw-r--r-- | src/resources/sprite/animatedsprite_unittest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc index 8601bed17..b59b4dbbb 100644 --- a/src/resources/sprite/animatedsprite_unittest.cc +++ b/src/resources/sprite/animatedsprite_unittest.cc @@ -89,6 +89,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") REQUIRE(false == sprite->update(11)); REQUIRE(10 == sprite->getFrameTime()); REQUIRE(0 == sprite->getFrameIndex()); + delete(sprite); } SECTION("basic test 2") @@ -149,6 +150,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") REQUIRE(true == sprite->update(1 + 10 + 20 + 10 + 25 + 10 + 10 + 1)); REQUIRE(4 == sprite->getFrameIndex()); REQUIRE(1 == sprite->getFrameTime()); + delete(sprite); } SECTION("basic test 3") @@ -166,6 +168,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") REQUIRE(true == sprite2->update(1 + 10 + 20 + 10 + 25 + 10 + 10 + 1)); REQUIRE(1 == sprite2->getFrameIndex()); REQUIRE(1 == sprite2->getFrameTime()); + delete(sprite2); } delete client; |