mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
AK/Tests: Add test for EnumBits has_any_flag()
This test will pass when any flag in the mask is present in the value.
This commit is contained in:
parent
9715311837
commit
5f3e6085a2
1 changed files with 8 additions and 0 deletions
|
@ -68,3 +68,11 @@ TEST_CASE(has_flag)
|
|||
EXPECT(!has_flag(intro, VideoIntro::Well));
|
||||
EXPECT(!has_flag(intro, VideoIntro::CompleteIntro));
|
||||
}
|
||||
|
||||
TEST_CASE(has_any_flag)
|
||||
{
|
||||
auto intro = VideoIntro::Hello | VideoIntro::Friends;
|
||||
EXPECT(has_any_flag(intro, VideoIntro::Friends));
|
||||
EXPECT(!has_any_flag(intro, VideoIntro::Well));
|
||||
EXPECT(has_any_flag(intro, VideoIntro::CompleteIntro));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue