summaryrefslogtreecommitdiff
path: root/test/unit/util
diff options
context:
space:
mode:
authorAndres Notzli <andres.noetzli@gmail.com>2016-11-04 18:21:38 -0700
committerAndres Notzli <andres.noetzli@gmail.com>2016-11-04 22:24:25 -0700
commitc08aa1d05429ad0a293d708236d6d29afd3d02cc (patch)
tree728523b4689a1576c23c4895f175a34e46461c4c /test/unit/util
parent44d49562a5a9d98e818aabc2943a84630560c8ed (diff)
Fix three leaks in unit tests
The `testMultipleCollection` test case was allocating a ListenerCollection without deleting it. The helper function `countCommands` was not deleting the `Command`s returned from `InteractiveShell::readCommand`. In the `testEmptyFileInput` and `testSimpleFileInput` tests, the `filename` string was not deleted. This commit fixes all issues.
Diffstat (limited to 'test/unit/util')
-rw-r--r--test/unit/util/listener_black.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unit/util/listener_black.h b/test/unit/util/listener_black.h
index 5319eacd1..b9ce7a3f7 100644
--- a/test/unit/util/listener_black.h
+++ b/test/unit/util/listener_black.h
@@ -100,6 +100,7 @@ public:
TS_ASSERT(collection->empty());
std::string expected[4] = {"a", "b", "c", "c"};
TS_ASSERT_EQUALS(d_events, mkMultiset(expected, 4));
+ TS_ASSERT_THROWS_NOTHING( delete collection );
}
void testRegisterMiddleTearDown() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback