| 3602 | } |
| 3603 | |
| 3604 | void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, |
| 3605 | int /*iteration*/) { |
| 3606 | ColoredPrintf(GTestColor::kGreen, "[==========] "); |
| 3607 | printf("%s from %s ran.", |
| 3608 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 3609 | FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); |
| 3610 | if (GTEST_FLAG_GET(print_time)) { |
| 3611 | printf(" (%s ms total)", |
| 3612 | internal::StreamableToString(unit_test.elapsed_time()).c_str()); |
| 3613 | } |
| 3614 | printf("\n"); |
| 3615 | ColoredPrintf(GTestColor::kGreen, "[ PASSED ] "); |
| 3616 | printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); |
| 3617 | |
| 3618 | const int skipped_test_count = unit_test.skipped_test_count(); |
| 3619 | if (skipped_test_count > 0) { |
| 3620 | ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); |
| 3621 | printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str()); |
| 3622 | PrintSkippedTests(unit_test); |
| 3623 | } |
| 3624 | |
| 3625 | if (!unit_test.Passed()) { |
| 3626 | PrintFailedTests(unit_test); |
| 3627 | PrintFailedTestSuites(unit_test); |
| 3628 | } |
| 3629 | |
| 3630 | int num_disabled = unit_test.reportable_disabled_test_count(); |
| 3631 | if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) { |
| 3632 | if (unit_test.Passed()) { |
| 3633 | printf("\n"); // Add a spacer if no FAILURE banner is displayed. |
| 3634 | } |
| 3635 | ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n", |
| 3636 | num_disabled, num_disabled == 1 ? "TEST" : "TESTS"); |
| 3637 | } |
| 3638 | // Ensure that Google Test output is printed before, e.g., heapchecker output. |
| 3639 | fflush(stdout); |
| 3640 | } |
| 3641 | |
| 3642 | // End PrettyUnitTestResultPrinter |
| 3643 |
no test coverage detected