MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / PostFlagParsingInit

Method PostFlagParsingInit

tests/gtest/gtest-all.cc:6536–6572  ·  view source on GitHub ↗

Performs initialization dependent upon flag values obtained in ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest this function is also called from RunAllTests. Since this function can be called more than once, it has to be idempotent.

Source from the content-addressed store, hash-verified

6534// this function is also called from RunAllTests. Since this function can be
6535// called more than once, it has to be idempotent.
6536void UnitTestImpl::PostFlagParsingInit() {
6537 // Ensures that this function does not execute more than once.
6538 if (!post_flag_parse_init_performed_) {
6539 post_flag_parse_init_performed_ = true;
6540
6541#if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
6542 // Register to send notifications about key process state changes.
6543 listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_());
6544#endif // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
6545
6546#if GTEST_HAS_DEATH_TEST
6547 InitDeathTestSubprocessControlInfo();
6548 SuppressTestEventsIfInSubprocess();
6549#endif // GTEST_HAS_DEATH_TEST
6550
6551 // Registers parameterized tests. This makes parameterized tests
6552 // available to the UnitTest reflection API without running
6553 // RUN_ALL_TESTS.
6554 RegisterParameterizedTests();
6555
6556 // Configures listeners for XML output. This makes it possible for users
6557 // to shut down the default XML output before invoking RUN_ALL_TESTS.
6558 ConfigureXmlOutput();
6559
6560#if GTEST_CAN_STREAM_RESULTS_
6561 // Configures listeners for streaming test results to the specified server.
6562 ConfigureStreamingOutput();
6563#endif // GTEST_CAN_STREAM_RESULTS_
6564
6565#if GTEST_HAS_ABSL
6566 if (GTEST_FLAG(install_failure_signal_handler)) {
6567 absl::FailureSignalHandlerOptions options;
6568 absl::InstallFailureSignalHandler(options);
6569 }
6570#endif // GTEST_HAS_ABSL
6571 }
6572}
6573
6574// A predicate that checks the name of a TestSuite against a known
6575// value.

Callers 1

InitGoogleTestImplFunction · 0.80

Calls 3

listenersFunction · 0.85
AppendMethod · 0.80

Tested by

no test coverage detected