Tests: Add default field and parameter value tests to CSharp1
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/* C# 1.0 feature test */
|
||||
namespace Il2CppTests.TestSources
|
||||
@@ -14,6 +15,9 @@ namespace Il2CppTests.TestSources
|
||||
{
|
||||
public SimpleStruct ss;
|
||||
public int i;
|
||||
public const int fieldWithDefaultValue = 3;
|
||||
public const LayoutKind fieldWithDefaultEnumValue = LayoutKind.Sequential;
|
||||
public const SimpleClass fieldWithDefaultReferenceValue = null;
|
||||
|
||||
public static SimpleStruct StaticFunc(SimpleStruct ss) {
|
||||
Console.WriteLine(ss);
|
||||
@@ -29,6 +33,10 @@ namespace Il2CppTests.TestSources
|
||||
return val + 42;
|
||||
}
|
||||
|
||||
public void funcWithDefaultValue(int a, int b = 2) { }
|
||||
public void funcWithDefaultEnumValue(int a, LayoutKind b = LayoutKind.Explicit) { }
|
||||
public void funcWithDefaultReferenceValue(int a, SimpleClass b = null) { }
|
||||
|
||||
public delegate SimpleStruct SimpleDelegate(SimpleStruct ss);
|
||||
public event SimpleDelegate SimpleEvent;
|
||||
public int SimpleProperty {
|
||||
|
||||
Reference in New Issue
Block a user