Parameterize object_unittest to work for whatever target types are

supported.
This commit is contained in:
Ian Lance Taylor
2007-10-03 00:34:49 +00:00
parent 66247fc744
commit 6340166c8b
7 changed files with 719 additions and 44 deletions

View File

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