AK/Tests: Add test for EnumBits has_flag()

This test requires that all values in the mask are present in the value
as well.
This commit is contained in:
Timothy 2021-07-14 01:16:55 +10:00 committed by Andreas Kling
parent 03b76e4ba0
commit 371911b1b5
Notes: sideshowbarker 2024-07-18 08:56:51 +09:00

View file

@ -66,4 +66,5 @@ TEST_CASE(has_flag)
auto intro = VideoIntro::Hello | VideoIntro::Friends;
EXPECT(has_flag(intro, VideoIntro::Friends));
EXPECT(!has_flag(intro, VideoIntro::Well));
EXPECT(!has_flag(intro, VideoIntro::CompleteIntro));
}