From 7960e7b7a92de91fa130cc19abe515b7aa09d3d4 Mon Sep 17 00:00:00 2001 From: tsutsumi <> Date: Wed, 24 Sep 2003 21:04:00 +0000 Subject: [PATCH] call dmalloc_shutdown at end --- tests/runFailure.c | 20 +++++++++++++------- tests/runSuccess.c | 8 ++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tests/runFailure.c b/tests/runFailure.c index 24f20f8..cb3a99d 100644 --- a/tests/runFailure.c +++ b/tests/runFailure.c @@ -20,17 +20,23 @@ /* * $Id$ */ -#include +#include int main () { - CCUnitTestRunner* runner = ccunit_newTestRunner (NULL); - CCUnitTestSuite* suite = ccunit_suite ("failure"); + CCUnitTestRunner* runner; + CCUnitTestSuite* suite; size_t fails; - size_t tests; - runner->run (runner, suite); +#if CCUNIT_WITH_DMALLOC +#endif + runner = ccunit_newTestRunner (NULL); + suite = ccunit_suite ("failure"); + ccunit_runTestRunner (runner, suite); fails = ccunit_failureCount (runner->result); - tests = ccunit_runCount (runner->result); ccunit_deleteTestRunner (runner); - return fails == tests ? 0 : -1; + ccunit_deleteTestSuite (suite); +#if CCUNIT_WITH_DMALLOC + dmalloc_shutdown (); +#endif + return (int)fails; } diff --git a/tests/runSuccess.c b/tests/runSuccess.c index ff4e449..7ee5fe8 100644 --- a/tests/runSuccess.c +++ b/tests/runSuccess.c @@ -20,14 +20,18 @@ /* * $Id$ */ -#include +#include int main () { CCUnitTestRunner* runner = ccunit_newTestRunner (NULL); CCUnitTestSuite* suite = ccunit_suite ("success"); - runner->run (runner, suite); + ccunit_runTestRunner (runner, suite); size_t fails = ccunit_failureCount (runner->result); ccunit_deleteTestRunner (runner); + ccunit_deleteTestSuite (suite); +#if CCUNIT_WITH_DMALLOC + dmalloc_shutdown (); +#endif return (int)fails; } -- 2.11.0