| 4091 | } |
| 4092 | |
| 4093 | void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) { |
| 4094 | if (test_info.result()->Passed()) { |
| 4095 | ColoredPrintf(COLOR_GREEN, "[ OK ] "); |
| 4096 | } else { |
| 4097 | ColoredPrintf(COLOR_RED, "[ FAILED ] "); |
| 4098 | } |
| 4099 | PrintTestName(test_case_name_.c_str(), test_info.name()); |
| 4100 | if (test_info.result()->Failed()) |
| 4101 | PrintFullTestCommentIfPresent(test_info); |
| 4102 | |
| 4103 | if (GTEST_FLAG(print_time)) { |
| 4104 | printf(" (%s ms)\n", internal::StreamableToString( |
| 4105 | test_info.result()->elapsed_time()).c_str()); |
| 4106 | } else { |
| 4107 | printf("\n"); |
| 4108 | } |
| 4109 | fflush(stdout); |
| 4110 | } |
| 4111 | |
| 4112 | void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) { |
| 4113 | if (!GTEST_FLAG(print_time)) return; |
no test coverage detected