src/base/flags.test.cc
/** Test isSet for multiple bits set. */
Test isSet for multiple bits set.
Test isSet for multiple bits set .
TEST(FlagsTest, IsSetValue)
{
    const uint32_t value_a = (1 << 3);
    const uint32_t value_b = (1 << 5);
    const Flags<uint32_t> flags(value_a | value_b);
    ASSERT_TRUE(flags.isSet(value_a));
    ASSERT_FALSE(flags.isSet(value_a << 1));
    ASSERT_TRUE(flags.isSet(value_b));
}
TEST ( FlagsTest , IsSetValue ) { const uint32_t value_a = ( 1 << 3 ) ; const uint32_t value_b = ( 1 << 5 ) ; const Flags < uint32_t > flags ( value_a | value_b ) ; ASSERT_TRUE ( flags . isSet ( value_a ) ) ; ASSERT_FALSE ( flags . isSet ( value_a << 1 ) ) ; ASSERT_TRUE ( flags . isSet ( value_b ) ) ; }
Test isSet for multiple bits set.
Test isSet for multiple bits set .