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() ) );
}
Beispiel #2
0
// Called before the test case starts.
void TersePrinter::OnTestCaseStart(const TestCase& test_case)
{
	if (useTerseOutput) return;

	ColoredPrintf(COLOR_GREEN, "[----------] ");
	printf("%s from %s\n",
	       FormatTestCount(test_case.test_to_run_count()).c_str(),
	       test_case.name());
	fflush(stdout);
}
void SDKUnitTestListener::OnTestCaseStart(const TestCase& test_case) {
	const std::string counts =
		FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
	PushResult( "[----------] " );
	PushResult( UTIL_VarArgs("%s from %s", counts.c_str(), test_case.name()) );
	if (test_case.type_param() == NULL) {
		PushResult( "\n" );
	} else {
		PushResult( UTIL_VarArgs(", where %s = %s\n", kTypeParamLabel, test_case.type_param()) );
	}
}
Beispiel #4
0
// 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);
}