1 #include "TestReporterStdout.h"
4 #include "TestDetails.h"
8 void TestReporterStdout::ReportFailure(TestDetails
const& details
, char const* failure
)
11 char const* const errorFormat
= "%s:%d: error: Failure in %s: %s\n";
13 char const* const errorFormat
= "%s(%d): error: Failure in %s: %s\n";
15 std::printf(errorFormat
, details
.filename
, details
.lineNumber
, details
.testName
, failure
);
18 void TestReporterStdout::ReportTestStart(TestDetails
const& /*test*/)
22 void TestReporterStdout::ReportTestFinish(TestDetails
const& /*test*/, float)
26 void TestReporterStdout::ReportSummary(int const totalTestCount
, int const failedTestCount
,
27 int const failureCount
, float secondsElapsed
)
30 std::printf("FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount
, totalTestCount
, failureCount
);
32 std::printf("Success: %d tests passed.\n", totalTestCount
);
33 std::printf("Test time: %.2f seconds.\n", secondsElapsed
);