MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / TEST_P

Function TEST_P

tests/unit/platform/test_common.cpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19TEST_P(SetEnvTest, SetEnvironmentVariableTests) {
20 const auto &[name, value, expected] = GetParam();
21 platf::set_env(name, value);
22
23 const char *env_value = std::getenv(name.c_str());
24 if (expected == 0 && !value.empty()) {
25 ASSERT_NE(env_value, nullptr);
26 ASSERT_EQ(std::string(env_value), value);
27 } else {
28 ASSERT_EQ(env_value, nullptr);
29 }
30}
31
32TEST_P(SetEnvTest, UnsetEnvironmentVariableTests) {
33 const auto &[name, value, expected] = GetParam();

Callers

nothing calls this directly

Calls 3

stringFunction · 0.85
set_envFunction · 0.50
unset_envFunction · 0.50

Tested by

no test coverage detected