MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / OnTestIterationStart

Method OnTestIterationStart

tests/external/gmock-1.7.0/gtest/src/gtest.cc:2719–2752  ·  view source on GitHub ↗

Fired before each iteration of tests starts.

Source from the content-addressed store, hash-verified

2717
2718 // Fired before each iteration of tests starts.
2719void PrettyUnitTestResultPrinter::OnTestIterationStart(
2720 const UnitTest& unit_test, int iteration) {
2721 if (GTEST_FLAG(repeat) != 1)
2722 printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
2723
2724 const char* const filter = GTEST_FLAG(filter).c_str();
2725
2726 // Prints the filter if it's not *. This reminds the user that some
2727 // tests may be skipped.
2728 if (!String::CStringEquals(filter, kUniversalFilter)) {
2729 ColoredPrintf(COLOR_YELLOW,
2730 "Note: %s filter = %s\n", GTEST_NAME_, filter);
2731 }
2732
2733 if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
2734 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
2735 ColoredPrintf(COLOR_YELLOW,
2736 "Note: This is test shard %d of %s.\n",
2737 static_cast<int>(shard_index) + 1,
2738 internal::posix::GetEnv(kTestTotalShards));
2739 }
2740
2741 if (GTEST_FLAG(shuffle)) {
2742 ColoredPrintf(COLOR_YELLOW,
2743 "Note: Randomizing tests' orders with a seed of %d .\n",
2744 unit_test.random_seed());
2745 }
2746
2747 ColoredPrintf(COLOR_GREEN, "[==========] ");
2748 printf("Running %s from %s.\n",
2749 FormatTestCount(unit_test.test_to_run_count()).c_str(),
2750 FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str());
2751 fflush(stdout);
2752}
2753
2754void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart(
2755 const UnitTest& /*unit_test*/) {

Callers 1

RunAllTestsMethod · 0.45

Calls 10

ColoredPrintfFunction · 0.70
ShouldShardFunction · 0.70
Int32FromEnvOrDieFunction · 0.70
FormatTestCountFunction · 0.70
FormatTestCaseCountFunction · 0.70
GetEnvFunction · 0.50
random_seedMethod · 0.45
test_to_run_countMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected