From 1d569e9913bb3a71bc431c27fb67dc3f08eb7a92 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 29 Jul 2022 17:08:01 +0200 Subject: [PATCH] tests: Fix memory leaks in Character tests --- test/character.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/character.c b/test/character.c index 2ef4435..0bd83f5 100644 --- a/test/character.c +++ b/test/character.c @@ -76,6 +76,8 @@ static void character_spritesheet_stops(void** state) { assert_int_equal(character->pos, 2); AnimateCharacter(game, character, 0.1, 1.0); assert_int_equal(character->pos, 2); + + DestroyCharacter(game, character); } static void character_spritesheet_reversed_stops(void** state) { @@ -93,6 +95,8 @@ static void character_spritesheet_reversed_stops(void** state) { assert_int_equal(character->pos, 0); AnimateCharacter(game, character, 0.1, 1.0); assert_int_equal(character->pos, 0); + + DestroyCharacter(game, character); } int test_character(void) {