MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / AddEnvironment

Method AddEnvironment

test/common/gtest/gtest.cpp:5639–5646  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

5637// We don't protect this under mutex_, as we only support calling it
5638// from the main thread.
5639Environment* UnitTest::AddEnvironment(Environment* env) {
5640 if (env == NULL) {
5641 return NULL;
5642 }
5643
5644 impl_->environments().push_back(env);
5645 return env;
5646}
5647
5648// Adds a TestPartResult to the current TestResult object. All Google Test
5649// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call

Callers 1

AddGlobalTestEnvironmentFunction · 0.80

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected