class ScopedTestEnv
Defined at line 30 of file ../../src/developer/debug/zxdb/common/scoped_test_env.h
A helper class that saves original environment variables before modification and restores them on
destruction. There is no checking of whether or not inputs are valid environment variables and
callers are responsible for ensuring the return value matches what they expect. The return values
of |Set| and |Unset| are the same as their corresponding libc counterparts. See man setenv and
man unsetenv for details.
Edge cases:
* Users *may* call |Set| on the same key multiple times, only the original value will be
restored.
* Calling |Unset| on a key that does not exist in the current environment will return the value
of calling |unsetenv| with that same key.
Public Methods
void ScopedTestEnv ()
Defined at line 32 of file ../../src/developer/debug/zxdb/common/scoped_test_env.h
void ~ScopedTestEnv ()
Defined at line 33 of file ../../src/developer/debug/zxdb/common/scoped_test_env.h
int Set (const std::string & key, const std::string & val)
Defined at line 43 of file ../../src/developer/debug/zxdb/common/scoped_test_env.h
int Unset (const std::string & key)
Defined at line 48 of file ../../src/developer/debug/zxdb/common/scoped_test_env.h