Home | Libraries | People | FAQ | More |
BOOST_
level
_GE(
lhs
,
rhs
)
asserts that lhs
is greater than or equal to rhs
. The comparison
is made by applying operator>=
to both arguments. The diagnostic
message is constructed from applying operator<<
to the two arguments.
Important | |
---|---|
If you get a strange compile error when using |
BOOST_AUTO_TEST_CASE(example_ge) { // integral types unsigned const u = 1u; int const i = -10; char const A = 'A'; // standard library types providing operator>= and operator<< std::string const s = "scooby"; BOOST_REQUIRE_GE(2u, u); BOOST_REQUIRE_GE(1u, u); BOOST_REQUIRE_GE(-9, i); BOOST_REQUIRE_GE(-10, i); BOOST_REQUIRE_GE('B', A); BOOST_REQUIRE_GE('A', A); BOOST_REQUIRE_GE("scoobz", s); BOOST_REQUIRE_GE("scooby", s); }