mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Fixed payload enum switch case comparison
This commit is contained in:
parent
52f746aae9
commit
11bde5caf2
5 changed files with 65 additions and 1 deletions
|
@ -84,6 +84,34 @@ namespace Tests
|
|||
Test.Assert(a == 1);
|
||||
Test.Assert(b == 2);
|
||||
|
||||
ee = default;
|
||||
switch (ee)
|
||||
{
|
||||
case default:
|
||||
Test.Assert(true);
|
||||
default:
|
||||
Test.Assert(false);
|
||||
}
|
||||
|
||||
ee = .B(123);
|
||||
switch (ee)
|
||||
{
|
||||
case default:
|
||||
Test.Assert(false);
|
||||
default:
|
||||
Test.Assert(true);
|
||||
}
|
||||
|
||||
switch (ee)
|
||||
{
|
||||
case .B(100):
|
||||
Test.Assert(false);
|
||||
case .B(123):
|
||||
Test.Assert(true);
|
||||
default:
|
||||
Test.Assert(false);
|
||||
}
|
||||
|
||||
EnumF ef = .EE(.C(3, 4));
|
||||
switch (ef)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue