// 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.
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.