about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--002test.cc3
-rw-r--r--003trace.cc4
-rw-r--r--050scenario.cc2
3 files changed, 1 insertions, 8 deletions
diff --git a/002test.cc b/002test.cc
index eeea02a3..6bb71b6c 100644
--- a/002test.cc
+++ b/002test.cc
@@ -24,7 +24,6 @@ long Num_failures = 0;
 :(before "End Includes")
 #define CHECK(X) \
   if (Passed && !(X)) { \
-    ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << '\n'; \
     Passed = false; \
     return;  /* Currently we stop at the very first failure. */ \
@@ -32,7 +31,6 @@ long Num_failures = 0;
 
 #define CHECK_EQ(X, Y) \
   if (Passed && (X) != (Y)) { \
-    ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << " == " << #Y << '\n'; \
     cerr << "  got " << (X) << '\n';  /* BEWARE: multiple eval */ \
     Passed = false; \
@@ -82,6 +80,7 @@ void run_test(size_t i) {
   // End Test Teardown
   teardown();
   if (Passed) cerr << '.';
+  else ++Num_failures;
 }
 
 bool is_integer(const string& s) {
diff --git a/003trace.cc b/003trace.cc
index 6c4bbabf..5f807476 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -178,7 +178,6 @@ int Trace_errors = 0;  // used only when Trace_stream is NULL
 :(before "End Test Teardown")
 if (Passed && !Hide_errors && trace_count("error") > 0) {
   Passed = false;
-  ++Num_failures;
 }
 
 :(before "End Types")
@@ -220,7 +219,6 @@ START_TRACING_UNTIL_END_OF_SCOPE
 #define CHECK_TRACE_CONTAINS_ERROR()  CHECK(trace_count("error") > 0)
 #define CHECK_TRACE_DOESNT_CONTAIN_ERROR() \
   if (Passed && trace_count("error") > 0) { \
-    ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): unexpected errors\n"; \
     DUMP("error"); \
     Passed = false; \
@@ -229,7 +227,6 @@ START_TRACING_UNTIL_END_OF_SCOPE
 
 #define CHECK_TRACE_COUNT(label, count) \
   if (Passed && trace_count(label) != (count)) { \
-    ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): trace_count of " << label << " should be " << count << '\n'; \
     cerr << "  got " << trace_count(label) << '\n';  /* multiple eval */ \
     DUMP(label); \
@@ -260,7 +257,6 @@ bool check_trace_contents(string FUNCTION, string FILE, int LINE, string expecte
     split_label_contents(expected_lines.at(curr_expected_line), &label, &contents);
   }
 
-  ++Num_failures;
   if (line_exists_anywhere(label, contents)) {
     cerr << "\nF - " << FUNCTION << "(" << FILE << ":" << LINE << "): line [" << label << ": " << contents << "] out of order in trace:\n";
     DUMP("");
diff --git a/050scenario.cc b/050scenario.cc
index 4cc284e8..2e0d1ca7 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -181,8 +181,6 @@ void run_mu_scenario(const scenario& s) {
   // End Mu Test Teardown
   if (!Hide_errors && trace_count("error") > 0 && !Scenario_testing_scenario)
     Passed = false;
-  if (!Passed)
-    ++Num_failures;
   if (not_already_inside_test && Trace_stream) {
     teardown();
     if (Save_trace) {