Fired before each iteration of tests starts.
| 4016 | |
| 4017 | // Fired before each iteration of tests starts. |
| 4018 | void PrettyUnitTestResultPrinter::OnTestIterationStart( |
| 4019 | const UnitTest& unit_test, int iteration) { |
| 4020 | if (GTEST_FLAG(repeat) != 1) |
| 4021 | printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); |
| 4022 | |
| 4023 | const char* const filter = GTEST_FLAG(filter).c_str(); |
| 4024 | |
| 4025 | // Prints the filter if it's not *. This reminds the user that some |
| 4026 | // tests may be skipped. |
| 4027 | if (!internal::String::CStringEquals(filter, kUniversalFilter)) { |
| 4028 | ColoredPrintf(COLOR_YELLOW, |
| 4029 | "Note: %s filter = %s\n", GTEST_NAME_, filter); |
| 4030 | } |
| 4031 | |
| 4032 | if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { |
| 4033 | const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); |
| 4034 | ColoredPrintf(COLOR_YELLOW, |
| 4035 | "Note: This is test shard %d of %s.\n", |
| 4036 | static_cast<int>(shard_index) + 1, |
| 4037 | internal::posix::GetEnv(kTestTotalShards)); |
| 4038 | } |
| 4039 | |
| 4040 | if (GTEST_FLAG(shuffle)) { |
| 4041 | ColoredPrintf(COLOR_YELLOW, |
| 4042 | "Note: Randomizing tests' orders with a seed of %d .\n", |
| 4043 | unit_test.random_seed()); |
| 4044 | } |
| 4045 | |
| 4046 | ColoredPrintf(COLOR_GREEN, "[==========] "); |
| 4047 | printf("Running %s from %s.\n", |
| 4048 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 4049 | FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); |
| 4050 | fflush(stdout); |
| 4051 | } |
| 4052 | |
| 4053 | void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( |
| 4054 | const UnitTest& /*unit_test*/) { |
no test coverage detected