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

Method AddEnvironment

tests/gtest/gtest-all.cc:6193–6200  ·  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

6191// We don't protect this under mutex_, as we only support calling it
6192// from the main thread.
6193Environment* UnitTest::AddEnvironment(Environment* env) {
6194 if (env == nullptr) {
6195 return nullptr;
6196 }
6197
6198 impl_->environments().push_back(env);
6199 return env;
6200}
6201
6202// Adds a TestPartResult to the current TestResult object. All Google Test
6203// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call

Callers 1

AddGlobalTestEnvironmentFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected