src/base/flags.test.cc
/** Test isSet comparing against another flag. */
Test isSet comparing against another flag.
Test isSet comparing against another flag .
TEST(FlagsTest, IsSetType)
{
    const uint32_t value_a = (1 << 5) | (1 << 6);
    const uint32_t value_b = (1 << 3) | (1 << 5) | (1 << 9);
    const uint32_t value_c = (1 << 4) | (1 << 8);
    const Flags<uint32_t> flags(value_a);
    ASSERT_TRUE(flags.isSet(value_b));
    ASSERT_FALSE(flags.isSet(value_c));
}
TEST ( FlagsTest , IsSetType ) { const uint32_t value_a = ( 1 << 5 ) | ( 1 << 6 ) ; const uint32_t value_b = ( 1 << 3 ) | ( 1 << 5 ) | ( 1 << 9 ) ; const uint32_t value_c = ( 1 << 4 ) | ( 1 << 8 ) ; const Flags < uint32_t > flags ( value_a ) ; ASSERT_TRUE ( flags . isSet ( value_b ) ) ; ASSERT_FALSE ( flags . isSet ( value_c ) ) ; }
Test isSet comparing against another flag.
Test isSet comparing against another flag .