mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-14 11:54:53 +03: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
Notes:
sideshowbarker
2024-07-18 08:56:44 +09:00
Author: https://github.com/timmot Commit: https://github.com/SerenityOS/serenity/commit/5f3e6085a21 Pull-request: https://github.com/SerenityOS/serenity/pull/8724 Reviewed-by: https://github.com/bgianfo ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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…
Reference in New Issue
Block a user