aboutsummaryrefslogtreecommitdiff
path: root/dejagnu.h
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb@gnu.org>2022-11-26 22:08:48 -0600
committerJacob Bachmeyer <jcb@gnu.org>2022-11-26 22:08:48 -0600
commitc173c009bd41b821e9fad4938d69d2204de69e55 (patch)
tree7ef497b70e4f89ed4981834a16d8489ee0f8db66 /dejagnu.h
parent999b7c0475d5f31c9fc29be58a97078bf6f0f2ec (diff)
downloaddejagnu-c173c009bd41b821e9fad4938d69d2204de69e55.zip
dejagnu-c173c009bd41b821e9fad4938d69d2204de69e55.tar.gz
dejagnu-c173c009bd41b821e9fad4938d69d2204de69e55.tar.bz2
Fix miscounting of expected failures in C unit test API
Diffstat (limited to 'dejagnu.h')
-rw-r--r--dejagnu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/dejagnu.h b/dejagnu.h
index df23890..2b22b76 100644
--- a/dejagnu.h
+++ b/dejagnu.h
@@ -77,7 +77,7 @@ xpass (const char* fmt, ...)
{
va_list ap;
- passed++;
+ xpassed++;
va_start (ap, fmt);
vsnprintf (buffer, sizeof (buffer), fmt, ap);
va_end (ap);
@@ -103,7 +103,7 @@ xfail (const char* fmt, ...)
{
va_list ap;
- failed++;
+ xfailed++;
va_start (ap, fmt);
vsnprintf (buffer, sizeof (buffer), fmt, ap);
va_end (ap);
@@ -157,6 +157,8 @@ totals (void)
printf ("\t#real failed:\t\t%d\n", failed);
if (xfailed)
printf ("\t#expected failures:\t\t%d\n", xfailed);
+ if (xpassed)
+ printf ("\t#unexpected passes:\t\t%d\n", xpassed);
if (untest)
printf ("\t#untested:\t\t%d\n", untest);
if (unresolve)