mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-12 11:11:45 +00:00
Added tests for list with enums of underlying long type
This commit is contained in:
parent
a3dedd4fe7
commit
f8e3179ce0
1 changed files with 14 additions and 0 deletions
|
|
@ -14,6 +14,13 @@ namespace Cosmos.Compiler.Tests.Bcl.System.Collections.Generic
|
|||
E1,
|
||||
E2
|
||||
}
|
||||
|
||||
public enum LongTest : long
|
||||
{
|
||||
L1 = long.MaxValue - 1,
|
||||
L2 = long.MaxValue - 2,
|
||||
L3 = 0
|
||||
}
|
||||
public static void Execute()
|
||||
{
|
||||
var xList = new List<int>();
|
||||
|
|
@ -94,6 +101,13 @@ namespace Cosmos.Compiler.Tests.Bcl.System.Collections.Generic
|
|||
list.Add(Test.E2);
|
||||
Assert.IsTrue(list[0] == Test.E2, "IL2CPU does not handle lists with Enums correctly");
|
||||
|
||||
List<LongTest> list2 = new List<LongTest>();
|
||||
list2.Add(LongTest.L3);
|
||||
list2.Add(LongTest.L2);
|
||||
list2.Add(LongTest.L1);
|
||||
Assert.IsTrue(list2[2] == LongTest.L1, "Enums with underlying long type work");
|
||||
Assert.IsTrue(list2[1] == LongTest.L2, "Enums with underlying long type work");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue