Modified:
trunk/testutil/CuTest.c
Log:
fixed summary output bug
Modified: trunk/testutil/CuTest.c
===================================================================
--- trunk/testutil/CuTest.c 2007-04-10 19:43:34 UTC (rev 72)
+++ trunk/testutil/CuTest.c 2007-04-11 08:30:08 UTC (rev 73)
@@ -181,10 +181,8 @@
{
printf("not ");
}
-
printf("ok %d - [%s/%s/%s]", testSuite->testNum++,
testSuite->name, tc->suite_name, tc->name);
-
if (tc->todo)
{
/*
@@ -197,15 +195,14 @@
*/
char buf[HUGE_STRING_LEN];
-
printf("\n# TODO %s", tc->todomessage);
testSuite->todoCount++;
if (tc->failed) testSuite->todofailCount++;
if (testSuite->todoCount>1)
- sprintf(buf, "%s, %d", testSuite->todotest, testSuite->testNum);
+ sprintf(buf, "%s, %d", testSuite->todotest, testSuite->testNum - 1);
else
- sprintf(buf, "%d", testSuite->testNum);
+ sprintf(buf, "%d", testSuite->testNum - 1);
testSuite->todotest= buf;
}
if (tc->failed)
@@ -220,13 +217,15 @@
Smolder will show it in the HTML, other TAP interpreter might
act differently.
*/
+
char buf[HUGE_STRING_LEN];
printf("\n# %s", tc->message);
testSuite->failCount++;
+
if (testSuite->failCount>1)
- sprintf(buf, "%s, %d", testSuite->failedtest, testSuite->testNum);
+ sprintf(buf, "%s, %d", testSuite->failedtest, testSuite->testNum - 1);
else
- sprintf(buf, "%d", testSuite->testNum);
+ sprintf(buf, "%d", testSuite->testNum - 1);
testSuite->failedtest = buf;
}
else if (tc->skipped)
@@ -239,13 +238,15 @@
The harness should report the text after # SKIP\S*\s+
as a reason for skipping.
*/
+
char buf[HUGE_STRING_LEN];
printf("\n# SKIP %s", tc->message);
testSuite->skipCount++;
- if(testSuite->skipCount>1)
- sprintf(buf, "%s, %d", testSuite->skippedtest, testSuite->testNum);
+
+ if(testSuite->skipCount > 1)
+ sprintf(buf, "%s, %d", testSuite->skippedtest, testSuite->testNum - 1);
else
- sprintf(buf, "%d", testSuite->testNum);
+ sprintf(buf, "%d", testSuite->testNum - 1);
testSuite->skippedtest = buf;
}
| Thread |
|---|
| • ODBC C-tests commit: r73 - trunk/testutil | sebrecht | 11 Apr |