mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
More generic conformance tests
This commit is contained in:
parent
eec61a425b
commit
b60fed96c0
1 changed files with 19 additions and 0 deletions
|
@ -87,6 +87,21 @@ namespace Tests
|
|||
{
|
||||
}
|
||||
|
||||
public static int MethodA<T>(T val) where T : var
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int MethodA<T>(T val) where T : ValueType
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public static int MethodA<T>(T val) where T : Enum
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestBasics()
|
||||
{
|
||||
|
@ -100,6 +115,10 @@ namespace Tests
|
|||
|
||||
LibA.LibA0.Alloc<ClassA>();
|
||||
LibA.LibA0.Alloc<ClassB>();
|
||||
|
||||
Test.Assert(MethodA("") == 1);
|
||||
Test.Assert(MethodA(1.2f) == 2);
|
||||
Test.Assert(MethodA(TypeCode.Boolean) == 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue