src/base/flags.test.cc
/** Test setting with a few overlapping bits. */
Test setting with a few overlapping bits.
Test setting with a few overlapping bits .
TEST(FlagsTest, SetOverlapping)
{
    const uint32_t value_a = (1 << 5) | (1 << 6);
    const uint32_t value_b = (1 << 3) | (1 << 5) | (1 << 9);
    Flags<uint32_t> flags(value_a);
    flags.set(value_b);
    ASSERT_EQ(value_a | value_b, uint32_t(flags));
}
TEST ( FlagsTest , SetOverlapping ) { const uint32_t value_a = ( 1 << 5 ) | ( 1 << 6 ) ; const uint32_t value_b = ( 1 << 3 ) | ( 1 << 5 ) | ( 1 << 9 ) ; Flags < uint32_t > flags ( value_a ) ; flags . set ( value_b ) ; ASSERT_EQ ( value_a | value_b , uint32_t ( flags ) ) ; }
Test setting with a few overlapping bits.
Test setting with a few overlapping bits .