void SDKUnitTestListener::OnTestCaseEnd(const TestCase& test_case) { if (!GTEST_FLAG(print_time)) return; const std::string counts = FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); PushResult( "[----------] " ); PushResult( UTIL_VarArgs("%s from %s (%s ms total)\n\n", counts.c_str(), test_case.name(), internal::StreamableToString(test_case.elapsed_time()).c_str() ) ); }
// Called after the test case ends. void TersePrinter::OnTestCaseEnd(const TestCase& test_case) { // a test case end is not printed for the following if (useTerseOutput || !GTEST_FLAG(print_time)) return; ColoredPrintf(COLOR_GREEN, "[----------] "); printf("%s from %s (%s ms total)\n\n", FormatTestCount(test_case.test_to_run_count()).c_str(), test_case.name(), internal::StreamableToString(test_case.elapsed_time()).c_str()); fflush(stdout); }