diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-03 00:34:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-03 00:34:49 +0000 |
commit | 6340166c8b339b88f1baeff8a3703bf09ed7ce1c (patch) | |
tree | 13efda39532068099a6275af784956645b92e125 /gold/testsuite/test.h | |
parent | 66247fc7443dad8a4abafbef57bc4b8dc659d8dc (diff) | |
download | gdb-6340166c8b339b88f1baeff8a3703bf09ed7ce1c.zip gdb-6340166c8b339b88f1baeff8a3703bf09ed7ce1c.tar.gz gdb-6340166c8b339b88f1baeff8a3703bf09ed7ce1c.tar.bz2 |
Parameterize object_unittest to work for whatever target types are
supported.
Diffstat (limited to 'gold/testsuite/test.h')
-rw-r--r-- | gold/testsuite/test.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gold/testsuite/test.h b/gold/testsuite/test.h index cd2628f..1672d40 100644 --- a/gold/testsuite/test.h +++ b/gold/testsuite/test.h @@ -57,8 +57,7 @@ class Test_framework // Cause the current test to fail. void - fail() - { ++this->current_fail_ = true; } + fail(const char* filename, int lineno); // Report an error from the current test. void @@ -89,8 +88,8 @@ public: // Mark the test as failing. void - fail() - { this->tf_->fail(); } + fail(const char* filename, int lineno) + { this->tf_->fail(filename, lineno); } // Report an error. void @@ -131,8 +130,13 @@ class Register_test // Check that a condition is true. If it is false, report a failure. -#define CHECK(cond) \ - ((cond) ? 0 : (::gold_testsuite::Test_framework::report()->fail(), 0)) +#define CHECK(cond) \ + ((void) \ + ((cond) \ + ? 0 \ + : (::gold_testsuite::Test_framework::report()->fail(__FILE__, \ + __LINE__), \ + 0))) // Report an error during a test. |