diff --git a/IDEHelper/Tests/src/Enums.bf b/IDEHelper/Tests/src/Enums.bf index 07a12cbd..8309ee11 100644 --- a/IDEHelper/Tests/src/Enums.bf +++ b/IDEHelper/Tests/src/Enums.bf @@ -123,7 +123,8 @@ namespace Tests { A, B, - C + C, + D = 4 } [Test] @@ -292,11 +293,19 @@ namespace Tests Test.Assert(sizeof(EnumN) == sizeof(System.Interop.c_int)); - Test.Assert(value.HasFlag(.A) == false); + Test.Assert(value.HasFlag(.A) == true); Test.Assert(value.HasFlag(.B) == true); - + Test.Assert(value.HasFlag(.B | .C) == false); + Test.Assert(value.HasFlag(.D) == false); Test.Assert(value.Underlying == 1); + value = .B | .C; + Test.Assert(value.HasFlag(.A) == true); + Test.Assert(value.HasFlag(.B) == true); + Test.Assert(value.HasFlag(.B | .C) == true); + Test.Assert(value.HasFlag(.D) == false); + Test.Assert(value.Underlying == 3); + ref System.Interop.c_int valueRef = ref value.UnderlyingRef; valueRef = 2; Test.Assert(value == .C);