From b2012ebf8072efd5332c845be3c5dedb5e27bf6f Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 16 Jun 2006 19:27:36 +0000 Subject: [PATCH] Don't print results if no tests! --- src/libCom/misc/epicsUnitTest.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libCom/misc/epicsUnitTest.c b/src/libCom/misc/epicsUnitTest.c index ad3748893..4354f17f6 100644 --- a/src/libCom/misc/epicsUnitTest.c +++ b/src/libCom/misc/epicsUnitTest.c @@ -127,13 +127,15 @@ int testDone(void) { status = 2; } printf("\n Results\n =======\n Tests: %d\n", tests); - testResult("Passed", passed); - if (bonus) testResult("Todo Passes", bonus); - if (failed) { - testResult("Failed", failed); - status = 1; + if (tests) { + testResult("Passed", passed); + if (bonus) testResult("Todo Passes", bonus); + if (failed) { + testResult("Failed", failed); + status = 1; + } + if (skipped) testResult("Skipped", skipped); } - if (skipped) testResult("Skipped", skipped); } epicsMutexUnlock(testLock); return (status);