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.
| 5594 | // this function is also called from RunAllTests. Since this function can be |
| 5595 | // called more than once, it has to be idempotent. |
| 5596 | void UnitTestImpl::PostFlagParsingInit() { |
| 5597 | // Ensures that this function does not execute more than once. |
| 5598 | if (!post_flag_parse_init_performed_) { |
| 5599 | post_flag_parse_init_performed_ = true; |
| 5600 | |
| 5601 | #if GTEST_HAS_DEATH_TEST |
| 5602 | InitDeathTestSubprocessControlInfo(); |
| 5603 | SuppressTestEventsIfInSubprocess(); |
| 5604 | #endif // GTEST_HAS_DEATH_TEST |
| 5605 | |
| 5606 | // Registers parameterized tests. This makes parameterized tests |
| 5607 | // available to the UnitTest reflection API without running |
| 5608 | // RUN_ALL_TESTS. |
| 5609 | RegisterParameterizedTests(); |
| 5610 | |
| 5611 | // Configures listeners for XML output. This makes it possible for users |
| 5612 | // to shut down the default XML output before invoking RUN_ALL_TESTS. |
| 5613 | ConfigureXmlOutput(); |
| 5614 | |
| 5615 | #if GTEST_CAN_STREAM_RESULTS_ |
| 5616 | // Configures listeners for streaming test results to the specified server. |
| 5617 | ConfigureStreamingOutput(); |
| 5618 | #endif // GTEST_CAN_STREAM_RESULTS_ |
| 5619 | } |
| 5620 | } |
| 5621 | |
| 5622 | // A predicate that checks the name of a TestCase against a known |
| 5623 | // value. |
no test coverage detected