aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/test.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-03 00:34:49 +0000
committerIan Lance Taylor <iant@google.com>2007-10-03 00:34:49 +0000
commit6340166c8b339b88f1baeff8a3703bf09ed7ce1c (patch)
tree13efda39532068099a6275af784956645b92e125 /gold/testsuite/test.cc
parent66247fc7443dad8a4abafbef57bc4b8dc659d8dc (diff)
downloadgdb-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.cc')
-rw-r--r--gold/testsuite/test.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/gold/testsuite/test.cc b/gold/testsuite/test.cc
index 6eec339..4f16da0 100644
--- a/gold/testsuite/test.cc
+++ b/gold/testsuite/test.cc
@@ -61,13 +61,22 @@ Test_framework::run(const char *name, bool (*pfn)(Test_report*))
this->testname_ = NULL;
}
+// Report a failure.
+
+void
+Test_framework::fail(const char* filename, int lineno)
+{
+ printf("FAIL: %s: %s: %d\n", this->testname_, filename, lineno);
+ this->current_fail_ = true;
+}
+
// Let a test report an error.
void
Test_framework::error(const char* message)
{
printf("ERROR: %s: %s\n", this->testname_, message);
- this->fail();
+ this->current_fail_ = true;
}
// Register_test methods.