Registers and returns a global test environment. When a test program is run, all global test environments will be set-up in the order they were registered. After all tests in the program have finished, all global test environments will be torn-down in the reverse* order they were registered. The UnitTest object takes ownership of the given environment. We don't protect this under mutex_, as we
| 5246 | // We don't protect this under mutex_, as we only support calling it |
| 5247 | // from the main thread. |
| 5248 | Environment* UnitTest::AddEnvironment(Environment* env) { |
| 5249 | if (env == NULL) { |
| 5250 | return NULL; |
| 5251 | } |
| 5252 | |
| 5253 | impl_->environments().push_back(env); |
| 5254 | return env; |
| 5255 | } |
| 5256 | |
| 5257 | // Adds a TestPartResult to the current TestResult object. All Google Test |
| 5258 | // assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call |
no outgoing calls
no test coverage detected