the Compartmented Robust Posix C++ Unit Test system | hosted by |
---|
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
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.
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.
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.