| 4699 | } |
| 4700 | |
| 4701 | void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) { |
| 4702 | if (test_info.result()->Passed()) { |
| 4703 | ColoredPrintf(COLOR_GREEN, "[ OK ] "); |
| 4704 | } else if (test_info.result()->Skipped()) { |
| 4705 | ColoredPrintf(COLOR_GREEN, "[ SKIPPED ] "); |
| 4706 | } else { |
| 4707 | ColoredPrintf(COLOR_RED, "[ FAILED ] "); |
| 4708 | } |
| 4709 | PrintTestName(test_info.test_suite_name(), test_info.name()); |
| 4710 | if (test_info.result()->Failed()) |
| 4711 | PrintFullTestCommentIfPresent(test_info); |
| 4712 | |
| 4713 | if (GTEST_FLAG(print_time)) { |
| 4714 | printf(" (%s ms)\n", internal::StreamableToString( |
| 4715 | test_info.result()->elapsed_time()).c_str()); |
| 4716 | } else { |
| 4717 | printf("\n"); |
| 4718 | } |
| 4719 | fflush(stdout); |
| 4720 | } |
| 4721 | |
| 4722 | void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestSuite& test_suite) { |
| 4723 | if (!GTEST_FLAG(print_time)) return; |
no test coverage detected