MCPcopy Create free account
hub / github.com/apache/singa / AddGlobalTestEnvironment

Function AddGlobalTestEnvironment

test/gtest/gtest.h:18731–18733  ·  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

18729// (remember that the compiler doesn't guarantee the order in which
18730// global variables from different translation units are initialized).
18731inline Environment* AddGlobalTestEnvironment(Environment* env) {
18732 return UnitTest::GetInstance()->AddEnvironment(env);
18733}
18734
18735// Initializes Google Test. This must be called before calling
18736// 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