Home | Libraries | People | FAQ | More |
BITWISE_
level
_EQUAL(
lhs
,
rhs
)
compares the two arguments
for bitwise equality and fails if they are not equal. This can be useful
when testing integral values that represent a logical or combination of
bit flags.
enum bit_flags { source_file = 1u, header_file = 2u, build_file = 4u }; BOOST_AUTO_TEST_CASE(example_bitwise_equal) { BOOST_REQUIRE_BITWISE_EQUAL( source_file | build_file, build_file | source_file); }