TEST(Buttons, add) { Buttons buttons; buttons.add(PointingButton::LEFT); EXPECT_EQ(Buttons(PointingButton::LEFT), buttons); buttons.add(PointingButton::MIDDLE); EXPECT_EQ(Buttons(PointingButton::LEFT | PointingButton::MIDDLE), buttons); // some PointingButton twice. buttons.add(PointingButton::LEFT); EXPECT_EQ(Buttons(PointingButton::LEFT | PointingButton::MIDDLE), buttons); buttons = 0; buttons.add(PointingButton::LEFT | PointingButton::MIDDLE); EXPECT_EQ(Buttons(PointingButton::LEFT | PointingButton::MIDDLE), buttons); }