mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
chore(test): fix a few minor memory leaks in test suite
This commit is contained in:
parent
768a535eea
commit
29d99a2cbc
2 changed files with 9 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ TEST_CASE("TSList", "[list]") {
|
|||
// offset from the source list and initializes the list terminator.
|
||||
REQUIRE(list.Head() == node);
|
||||
REQUIRE(listCopy.Head() == nullptr);
|
||||
|
||||
delete node;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -47,6 +49,8 @@ TEST_CASE("TSList::IsEmpty", "[list]") {
|
|||
STORM_LIST(TestListNode) list;
|
||||
list.NewNode(STORM_LIST_TAIL, 0, 0);
|
||||
CHECK_FALSE(list.IsEmpty());
|
||||
|
||||
list.Clear();
|
||||
}
|
||||
|
||||
SECTION("returns true after clearing a populated list") {
|
||||
|
|
@ -172,5 +176,7 @@ TEST_CASE("TSExplicitList", "[list]") {
|
|||
// the source list and initializes the list terminator.
|
||||
REQUIRE(list.Head() == node);
|
||||
REQUIRE(listCopy.Head() == nullptr);
|
||||
|
||||
delete node;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue