diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-26 22:08:48 -0600 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-26 22:08:48 -0600 |
commit | c173c009bd41b821e9fad4938d69d2204de69e55 (patch) | |
tree | 7ef497b70e4f89ed4981834a16d8489ee0f8db66 /dejagnu.h | |
parent | 999b7c0475d5f31c9fc29be58a97078bf6f0f2ec (diff) | |
download | dejagnu-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.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |