about summary refs log tree commit diff stats
path: root/002test.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-02 00:42:43 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-02 00:42:43 -0700
commit60c566eaacbae981c425d4a12abafb56506bacfa (patch)
tree46a23d059389cc12e6cfb6853c1075e899b84d3b /002test.cc
parent36d74808d9d8fdb9c38c8164d34de24dd7968b1b (diff)
downloadmu-60c566eaacbae981c425d4a12abafb56506bacfa.tar.gz
3291
Stop double-counting failing tests in some situations.
Diffstat (limited to '002test.cc')
-rw-r--r--002test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/002test.cc b/002test.cc
index b9cb0e15..a07d5d9f 100644
--- a/002test.cc
+++ b/002test.cc
@@ -23,7 +23,7 @@ long Num_failures = 0;
 
 :(before "End Includes")
 #define CHECK(X) \
-  if (!(X)) { \
+  if (Passed && !(X)) { \
     ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << '\n'; \
     Passed = false; \
@@ -31,7 +31,7 @@ long Num_failures = 0;
   }
 
 #define CHECK_EQ(X, Y) \
-  if ((X) != (Y)) { \
+  if (Passed && (X) != (Y)) { \
     ++Num_failures; \
     cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): " << #X << " == " << #Y << '\n'; \
     cerr << "  got " << (X) << '\n';  /* BEWARE: multiple eval */ \