MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / OnTestIterationStart

Method OnTestIterationStart

engine/source/testing/googleTest/src/gtest.cc:2715–2748  ·  view source on GitHub ↗

Fired before each iteration of tests starts.

Source from the content-addressed store, hash-verified

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

Callers 1

RunAllTestsMethod · 0.45

Calls 12

printfFunction · 0.85
c_strMethod · 0.80
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