test for Context leak

Tests should only hold a single Context pointer
This commit is contained in:
Michael Davidsaver
2020-04-10 08:45:49 -07:00
parent 29c837e7ed
commit 20c4ff0c26
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -46,6 +46,12 @@ struct BasicTest {
initial["value"] = 42;
}
~BasicTest()
{
if(cli.use_count()!=1u)
testAbort("Tester Context leak");
}
void subscribe(const char *name)
{
sub = cli.monitor(name)