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

Function AddGlobalTestEnvironment

tests/gtest/gtest.h:13914–13916  ·  view source on GitHub ↗

A convenient wrapper for adding an environment for the test program. You should call this before RUN_ALL_TESTS() is called, probably in main(). If you use gtest_main, you need to call this before main() starts for it to take effect. For example, you can define a global variable like this: testing::Environment* const foo_env = testing::AddGlobalTestEnvironment(new FooEnvironment); However, we

Source from the content-addressed store, hash-verified

13912// (remember that the compiler doesn't guarantee the order in which
13913// global variables from different translation units are initialized).
13914inline Environment* AddGlobalTestEnvironment(Environment* env) {
13915 return UnitTest::GetInstance()->AddEnvironment(env);
13916}
13917
13918// Initializes Google Test. This must be called before calling
13919// RUN_ALL_TESTS(). In particular, it parses a command line for the

Callers

nothing calls this directly

Calls 1

AddEnvironmentMethod · 0.80

Tested by

no test coverage detected