Fix a typo.
[binutils-gdb.git] / gold / testsuite / test.cc
index 6eec33952152c02aaa5f5a3aa31e667c52c2cc6d..b08d6d774545a3ddaaa3f51a0e2f825ff13aab5f 100644 (file)
@@ -1,6 +1,6 @@
 // test.cc -- simplistic test framework for gold.
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -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.