the Compartmented Robust Posix C++ Unit Test system

crpcut::get_parameter()

Get the value of a named parameter defined with the -p name=value command line parameter.

Used in: A test function body, the constructor or destructor of a fixture, or a function called from them. See TEST(name, ...).

crpcut::get_parameter() exists in three flavors.

Flavor

const char *crpcut::get_parameter(const char *name)

Returns the raw C-string value of the parameter, or 0 if no parameter was defined with the provided name.

template <typename T> void crpcut::get_param(const char *name, T& t)

Convert the raw value to type T by means of operator>>(std::istream&, T&). If no parameter was defined with the provided name, or if the input streaming failed, the test will fail.

template <typename T> T crpcut::get_param(const char *name)

Convert the raw value to type T by means of operator>>(std::istream&, T&). If no parameter was defined with the provided name, or if the input streaming failed, the test will fail.