Browse Source

Change summary totals emitted by dejagnu.h for consistency

master
Jacob Bachmeyer 3 years ago
parent
commit
865dc67cd4
  1. 5
      ChangeLog
  2. 4
      dejagnu.h
  3. 2
      testsuite/libdejagnu/harness.exp

5
ChangeLog

@ -1,5 +1,10 @@
2022-12-20 Jacob Bachmeyer <jcb@gnu.org>
* dejagnu.h (totals, TestState::totals): Change "real failed" to
"failed" when listing number of failed tests.
* testsuite/libdejagnu/harness.exp (test_libdejagnu_unit): Update
to match above change.
* dejagnu.h (DG_error, DG_warning): New functions.
(TestState::error, TestState::warning): New methods.
* doc/dejagnu.texi (C unit testing API): Document new functions.

4
dejagnu.h

@ -209,7 +209,7 @@ totals (void)
{
printf ("\nTotals:\n");
printf ("\t#passed:\t\t%d\n", DG__status.pass);
printf ("\t#real failed:\t\t%d\n", DG__status.fail);
printf ("\t#failed:\t\t%d\n", DG__status.fail);
if (DG__status.xfail)
printf ("\t#expected failures:\t\t%d\n", DG__status.xfail);
if (DG__status.xpass)
@ -360,7 +360,7 @@ class TestState {
std::cout << "\t#passed:\t\t"
<< DG__status.pass << std::endl;
std::cout << "\t#real failed:\t\t"
std::cout << "\t#failed:\t\t"
<< DG__status.fail << std::endl;
if (DG__status.xfail)

2
testsuite/libdejagnu/harness.exp

@ -32,7 +32,7 @@ proc test_libdejagnu_unit { language tests } {
# map messages from dejagnu.h:totals() to result types
array set expected_totals_map {
passed pass "real failed" fail
passed pass failed fail
"unexpected passes" xpass
"expected failures" xfail
untested untested

Loading…
Cancel
Save