]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gold/testsuite/test.cc
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gold / testsuite / test.cc
index 6eec33952152c02aaa5f5a3aa31e667c52c2cc6d..e74908e5bf15b6c1c36a56213000864dc1ac6d96 100644 (file)
@@ -1,6 +1,6 @@
 // test.cc -- simplistic test framework for gold.
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2006-2021 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.