Fired before each iteration of tests starts.
| 4490 | |
| 4491 | // Fired before each iteration of tests starts. |
| 4492 | void PrettyUnitTestResultPrinter::OnTestIterationStart( |
| 4493 | const UnitTest& unit_test, int iteration) { |
| 4494 | if (GTEST_FLAG(repeat) != 1) |
| 4495 | printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); |
| 4496 | |
| 4497 | const char* const filter = GTEST_FLAG(filter).c_str(); |
| 4498 | |
| 4499 | // Prints the filter if it's not *. This reminds the user that some |
| 4500 | // tests may be skipped. |
| 4501 | if (!String::CStringEquals(filter, kUniversalFilter)) { |
| 4502 | ColoredPrintf(COLOR_YELLOW, |
| 4503 | "Note: %s filter = %s\n", GTEST_NAME_, filter); |
| 4504 | } |
| 4505 | |
| 4506 | if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { |
| 4507 | const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); |
| 4508 | ColoredPrintf(COLOR_YELLOW, |
| 4509 | "Note: This is test shard %d of %s.\n", |
| 4510 | static_cast<int>(shard_index) + 1, |
| 4511 | internal::posix::GetEnv(kTestTotalShards)); |
| 4512 | } |
| 4513 | |
| 4514 | if (GTEST_FLAG(shuffle)) { |
| 4515 | ColoredPrintf(COLOR_YELLOW, |
| 4516 | "Note: Randomizing tests' orders with a seed of %d .\n", |
| 4517 | unit_test.random_seed()); |
| 4518 | } |
| 4519 | |
| 4520 | ColoredPrintf(COLOR_GREEN, "[==========] "); |
| 4521 | printf("Running %s from %s.\n", |
| 4522 | FormatTestCount(unit_test.test_to_run_count()).c_str(), |
| 4523 | FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); |
| 4524 | fflush(stdout); |
| 4525 | } |
| 4526 | |
| 4527 | void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( |
| 4528 | const UnitTest& /*unit_test*/) { |
no test coverage detected