From 01fa5bfcf4c458577dfd44dcb96a9bf9647c2f86 Mon Sep 17 00:00:00 2001 From: Kouji Matsui Date: Sun, 22 May 2022 15:08:25 +0900 Subject: [PATCH] Updated RuntimeSystems [f-z]. --- .../GarbageCollection/GarbageCollection.cs | 44 +++++----- .../Interoperability/Interoperability.cs | 10 +-- .../Threading/Threading.cs | 22 ++--- .../TypeInitializer/TypeInitializer.cs | 36 ++++----- .../TypeInitializerAtomicity.cs | 6 +- .../TypeRelations/TypeImplements.cs | 62 +++++++------- .../TypeRelations/TypeInheritance.cs | 52 ++++++------ .../TypeInheritanceAndImplements.cs | 80 +++++++++---------- .../ValueTypes/ValueTypes.cs | 36 ++++----- 9 files changed, 174 insertions(+), 174 deletions(-) diff --git a/tests/IL2C.Core.Test.RuntimeSystems/GarbageCollection/GarbageCollection.cs b/tests/IL2C.Core.Test.RuntimeSystems/GarbageCollection/GarbageCollection.cs index 4f0b6810..81cf3a44 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/GarbageCollection/GarbageCollection.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/GarbageCollection/GarbageCollection.cs @@ -185,42 +185,27 @@ public ConcurrentCollectValueHolder(int value) => } [Description("These tests are verified the IL2C manages tracing the object references and collect garbages from the heap memory.")] - [TestCase("ABCDEF", "ObjRefInsideObjRef", IncludeTypes = new[] { typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEF", "ObjRefInsideValueType", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeType) })] - [TestCase("ABCDEF", "ObjRefInsideValueTypeInsideObjRef", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeInsideObjRefType), typeof(ObjRefInsideValueTypeType) })] - [TestCase("ABCDEF", "ObjRefInsideObjRefInsideValueType", IncludeTypes = new[] { typeof(ObjRefInsideObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEF1", "MultipleInsideValueType", 0, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEF2", "MultipleInsideValueType", 1, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEF3", "MultipleInsideValueType", 2, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEFABCGHI", new[] { "ArrayForObjRefInsideObjRefTypeTracking", "MakeArrayForObjRefInsideObjRefType" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(ObjRefInsideObjRefType) })] - [TestCase("ABCDEFABCGHI", new[] { "ArrayForObjRefInsideValueTypeTypeTracking", "MakeArrayForObjRefInsideValueTypeType" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeType) })] - [TestCase("ABCDEFGHI", new[] { "DelegateMarkHandlerTracking", "MakeDelegateMarkHandlerForObjRefTestDelegate" }, "ABC", "DEF", IncludeTypes = new[] { typeof(DelegateMarkHandlerForObjRef), typeof(DelegateMarkHandlerForObjRefTestDelegate) })] - [TestCase("ABCGHIJKL", new[] { "MulticastDelegateMarkHandlerTracking", "MakeMulticastDelegateMarkHandlerForObjRefTestDelegate" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(DelegateMarkHandlerForObjRef), typeof(DelegateMarkHandlerForObjRefTestDelegate) })] - [TestCase(12345, new[] { "TraceStaticField", "RunTraceStaticField" }, 12345, IncludeTypes = new[] { typeof(StaticFieldTracible), typeof(StaticFieldInstanceType) })] - [TestCase(1, new[] { "CallFinalizerByCollect", "RunCallFinalizer" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 0, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 1, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 2, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(0, new[] { "DontCallFinalizerByCollectWithPinned", "RunDontCallFinalizerWithPinned" }, IncludeTypes = new[] { typeof(FinalzerImplementedWithPinned), typeof(FinalizerCalleeHolder) })] - [TestCase(123, new[] { "DontCollectWithResurrect", "RunDontCollectWithResurrect" }, 123, IncludeTypes = new[] { typeof(FinalzerImplementedWithResurrect) })] - [TestCase(2, new[] { "CallFinalizerByCollectWithReRegister", "RunCallFinalizerWithReRegister" }, IncludeTypes = new[] { typeof(FinalzerImplementedWithReRegister), typeof(FinalizerCalleeHolder) })] - [TestCase(0, new[] { "SuppressFinalize", "RunCallFinalizerWithSuppressed" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(1, new[] { "ReRegisterForFinalize", "RunCallFinalizerWithSuppressedAndReRegistered" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] - [TestCase(200000, "ConcurrentCollect", 10, 100000, IncludeTypes = new[] { typeof(ConcurrentCollectClosure), typeof(ConcurrentCollectValueHolder) })] public sealed class GarbageCollection { + [TestCase("ABCDEF", "ObjRefInsideObjRef", IncludeTypes = new[] { typeof(ObjRefInsideObjRefType) })] [MethodImpl(MethodImplOptions.ForwardRef)] public static extern string ObjRefInsideObjRef(); + [TestCase("ABCDEF", "ObjRefInsideValueType", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeType) })] [MethodImpl(MethodImplOptions.ForwardRef)] public static extern string ObjRefInsideValueType(); + [TestCase("ABCDEF", "ObjRefInsideValueTypeInsideObjRef", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeInsideObjRefType), typeof(ObjRefInsideValueTypeType) })] [MethodImpl(MethodImplOptions.ForwardRef)] public static extern string ObjRefInsideValueTypeInsideObjRef(); + [TestCase("ABCDEF", "ObjRefInsideObjRefInsideValueType", IncludeTypes = new[] { typeof(ObjRefInsideObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] [MethodImpl(MethodImplOptions.ForwardRef)] public static extern string ObjRefInsideObjRefInsideValueType(); + [TestCase("ABCDEF1", "MultipleInsideValueType", 0, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] + [TestCase("ABCDEF2", "MultipleInsideValueType", 1, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] + [TestCase("ABCDEF3", "MultipleInsideValueType", 2, IncludeTypes = new[] { typeof(MultipleInsideValueTypeType), typeof(ObjRefInsideValueTypeType), typeof(ObjRefInsideObjRefType) })] [MethodImpl(MethodImplOptions.ForwardRef)] public static extern string MultipleInsideValueType(int index); @@ -235,6 +220,7 @@ private static void RunTraceStaticField(int value) private static ObjRefInsideObjRefType[] MakeArrayForObjRefInsideObjRefType(string a, string b, string c) => new[] { new ObjRefInsideObjRefType(a + b), new ObjRefInsideObjRefType(a + c) }; + [TestCase("ABCDEFABCGHI", new[] { "ArrayForObjRefInsideObjRefTypeTracking", "MakeArrayForObjRefInsideObjRefType" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(ObjRefInsideObjRefType) })] public static string ArrayForObjRefInsideObjRefTypeTracking(string a, string b, string c) { // Test for Array_MarkHandler. @@ -249,6 +235,7 @@ public static string ArrayForObjRefInsideObjRefTypeTracking(string a, string b, private static ObjRefInsideValueTypeType[] MakeArrayForObjRefInsideValueTypeType(string a, string b, string c) => new[] { new ObjRefInsideValueTypeType(a + b), new ObjRefInsideValueTypeType(a + c) }; + [TestCase("ABCDEFABCGHI", new[] { "ArrayForObjRefInsideValueTypeTypeTracking", "MakeArrayForObjRefInsideValueTypeType" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(ObjRefInsideValueTypeType) })] public static string ArrayForObjRefInsideValueTypeTypeTracking(string a, string b, string c) { // Test for Array_MarkHandler. @@ -266,6 +253,7 @@ private static DelegateMarkHandlerForObjRefTestDelegate MakeDelegateMarkHandlerF return new DelegateMarkHandlerForObjRefTestDelegate(target.CombineForStrings); } + [TestCase("ABCDEFGHI", new[] { "DelegateMarkHandlerTracking", "MakeDelegateMarkHandlerForObjRefTestDelegate" }, "ABC", "DEF", IncludeTypes = new[] { typeof(DelegateMarkHandlerForObjRef), typeof(DelegateMarkHandlerForObjRefTestDelegate) })] public static string DelegateMarkHandlerTracking(string a, string b) { // Test for Delegate_MarkHandler. @@ -286,6 +274,7 @@ private static DelegateMarkHandlerForObjRefTestDelegate MakeMulticastDelegateMar new DelegateMarkHandlerForObjRefTestDelegate(target2.CombineForStrings); } + [TestCase("ABCGHIJKL", new[] { "MulticastDelegateMarkHandlerTracking", "MakeMulticastDelegateMarkHandlerForObjRefTestDelegate" }, "ABC", "DEF", "GHI", IncludeTypes = new[] { typeof(DelegateMarkHandlerForObjRef), typeof(DelegateMarkHandlerForObjRefTestDelegate) })] public static string MulticastDelegateMarkHandlerTracking(string a, string b, string c) { // Test for Delegate_MarkHandler (tracks each delegate target) @@ -297,6 +286,7 @@ public static string MulticastDelegateMarkHandlerTracking(string a, string b, st return d("JKL"); } + [TestCase(12345, new[] { "TraceStaticField", "RunTraceStaticField" }, 12345, IncludeTypes = new[] { typeof(StaticFieldTracible), typeof(StaticFieldInstanceType) })] public static int TraceStaticField(int value) { RunTraceStaticField(value); @@ -312,6 +302,7 @@ private static void RunCallFinalizer(FinalizerCalleeHolder holder) var implemented = new FinalzerImplemented(holder); } + [TestCase(1, new[] { "CallFinalizerByCollect", "RunCallFinalizer" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] public static int CallFinalizerByCollect() { var holder = new FinalizerCalleeHolder(); @@ -323,6 +314,9 @@ public static int CallFinalizerByCollect() return holder.Called; } + [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 0, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] + [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 1, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] + [TestCase(1, new[] { "CallFinalizerByCollectWithGeneration", "RunCallFinalizer" }, 2, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] public static int CallFinalizerByCollectWithGeneration(int generation) { var holder = new FinalizerCalleeHolder(); @@ -340,6 +334,7 @@ private static void RunDontCallFinalizerWithPinned(FinalizerCalleeHolder holder) var handle = GCHandle.Alloc(implemented, GCHandleType.Pinned); } + [TestCase(0, new[] { "DontCallFinalizerByCollectWithPinned", "RunDontCallFinalizerWithPinned" }, IncludeTypes = new[] { typeof(FinalzerImplementedWithPinned), typeof(FinalizerCalleeHolder) })] public static int DontCallFinalizerByCollectWithPinned() { var holder = new FinalizerCalleeHolder(); @@ -356,6 +351,7 @@ private static void RunDontCollectWithResurrect(int value) var implemented = new FinalzerImplementedWithResurrect(value); } + [TestCase(123, new[] { "DontCollectWithResurrect", "RunDontCollectWithResurrect" }, 123, IncludeTypes = new[] { typeof(FinalzerImplementedWithResurrect) })] public static int DontCollectWithResurrect(int value) { RunDontCollectWithResurrect(value); @@ -371,6 +367,7 @@ private static void RunCallFinalizerWithReRegister(FinalizerCalleeHolder holder) var implemented = new FinalzerImplementedWithReRegister(holder); } + [TestCase(2, new[] { "CallFinalizerByCollectWithReRegister", "RunCallFinalizerWithReRegister" }, IncludeTypes = new[] { typeof(FinalzerImplementedWithReRegister), typeof(FinalizerCalleeHolder) })] public static int CallFinalizerByCollectWithReRegister() { var holder = new FinalizerCalleeHolder(); @@ -396,6 +393,7 @@ private static void RunCallFinalizerWithSuppressed(FinalizerCalleeHolder holder) GC.SuppressFinalize(implemented); } + [TestCase(0, new[] { "SuppressFinalize", "RunCallFinalizerWithSuppressed" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] public static int SuppressFinalize() { var holder = new FinalizerCalleeHolder(); @@ -414,6 +412,7 @@ private static void RunCallFinalizerWithSuppressedAndReRegistered(FinalizerCalle GC.ReRegisterForFinalize(implemented); } + [TestCase(1, new[] { "ReRegisterForFinalize", "RunCallFinalizerWithSuppressedAndReRegistered" }, IncludeTypes = new[] { typeof(FinalzerImplemented), typeof(FinalizerCalleeHolder) })] public static int ReRegisterForFinalize() { var holder = new FinalizerCalleeHolder(); @@ -425,6 +424,7 @@ public static int ReRegisterForFinalize() return holder.Called; } + [TestCase(200000, "ConcurrentCollect", 10, 100000, IncludeTypes = new[] { typeof(ConcurrentCollectClosure), typeof(ConcurrentCollectValueHolder) })] public static int ConcurrentCollect(int count, int increments) { var target = new ConcurrentCollectClosure(); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/Interoperability/Interoperability.cs b/tests/IL2C.Core.Test.RuntimeSystems/Interoperability/Interoperability.cs index f1dfeb1c..539deaec 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/Interoperability/Interoperability.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/Interoperability/Interoperability.cs @@ -22,17 +22,13 @@ public struct NativePointerInside } [Description("These tests are verified the IL2C manages interoperability with the P/Invoke adn IL2C/Invoke method and internalcall method.")] - [TestCase(null, new[] { "InternalCallWithUnicodeStringArgument", "OutputDebugString1" }, "ABC", Assert = TestCaseAsserts.IgnoreValidateInvokeResult)] - [TestCase(null, new[] { "DllImportWithUnicodeStringArgument", "OutputDebugString2" }, "ABC", Assert = TestCaseAsserts.IgnoreValidateInvokeResult)] - [TestCase(12345678, "TransparencyForNativePointer", 12345678)] - [TestCase(12345678, "TransparencyForNativePointerInsideNativeType", 12345678, IncludeTypes = new[] { typeof(NativePointerInside) })] - [TestCase("ABCDEF", new[] { "BypassObjRefWithObjRefHandle", "ConcatAndToObjRefHandle" }, "ABC", "DEF")] public sealed class Interoperability { [NativeMethod("windows.h", SymbolName = "OutputDebugStringW", CharSet = NativeCharSet.Unicode)] [MethodImpl(MethodImplOptions.InternalCall)] private static extern void OutputDebugString1(string message); + [TestCase(null, new[] { "InternalCallWithUnicodeStringArgument", "OutputDebugString1" }, "ABC", Assert = TestCaseAsserts.IgnoreValidateInvokeResult)] public static void InternalCallWithUnicodeStringArgument(string message) { OutputDebugString1(message); @@ -41,11 +37,13 @@ public static void InternalCallWithUnicodeStringArgument(string message) [DllImport("kernel32", EntryPoint = "OutputDebugStringW")] private static extern void OutputDebugString2(string message); + [TestCase(null, new[] { "DllImportWithUnicodeStringArgument", "OutputDebugString2" }, "ABC", Assert = TestCaseAsserts.IgnoreValidateInvokeResult)] public static void DllImportWithUnicodeStringArgument(string message) { OutputDebugString2(message); } + [TestCase(12345678, "TransparencyForNativePointer", 12345678)] public static IntPtr TransparencyForNativePointer(IntPtr value) { NativePointer np = value; @@ -53,6 +51,7 @@ public static IntPtr TransparencyForNativePointer(IntPtr value) return ip; } + [TestCase(12345678, "TransparencyForNativePointerInsideNativeType", 12345678, IncludeTypes = new[] { typeof(NativePointerInside) })] public static IntPtr TransparencyForNativePointerInsideNativeType(IntPtr value) { NativePointerInside npi; @@ -68,6 +67,7 @@ private static IntPtr ConcatAndToObjRefHandle(string a, string b) return GCHandle.ToIntPtr(handle); } + [TestCase("ABCDEF", new[] { "BypassObjRefWithObjRefHandle", "ConcatAndToObjRefHandle" }, "ABC", "DEF")] public static string BypassObjRefWithObjRefHandle(string a, string b) { var objRefHandle = ConcatAndToObjRefHandle(a, b); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/Threading/Threading.cs b/tests/IL2C.Core.Test.RuntimeSystems/Threading/Threading.cs index 44cc397c..eba0ce12 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/Threading/Threading.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/Threading/Threading.cs @@ -151,19 +151,9 @@ public void Run() } [Description("These tests are verified the IL2C can handle threading features.")] - [TestCase(333, "RunAndFinishInstanceMethod", 111, 222, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] - [TestCase(333, "RunAndFinishInstanceWithParameterMethod", 111, 222, IncludeTypes = new[] { typeof(RunAndFinishClosureWithParameter) })] - [TestCase(true, "MultipleRunAndFinishInstanceMethod", 100, 10, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] - [TestCase(true, "MultipleRunAndFinishInstanceMethod", 100, 100, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] - [TestCase(true, "WillGetDifferentThreadId", IncludeTypes = new[] { typeof(WillGetDifferentThreadIdClosure) })] - [TestCase(100, "RaceFreeWithObjectMonitorLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLockClosure) })] - [TestCase(100, "RaceFreeWithConstStringMonitorLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLockClosure) })] - [TestCase(100, "RaceFreeWithObjectMonitorLock2", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLock2Closure) })] - [TestCase(100, "RaceFreeWithConstStringMonitorLock2", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLock2Closure) })] - [TestCase(100, "RaceFreeWithObjectMonitorTryLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorTryLockClosure) })] - [TestCase(100, "RaceFreeWithConstStringMonitorTryLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorTryLockClosure) })] public sealed class Threading { + [TestCase(333, "RunAndFinishInstanceMethod", 111, 222, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] public static int RunAndFinishInstanceMethod(int a, int b) { var target = new RunAndFinishClosure(a, b); @@ -174,6 +164,7 @@ public static int RunAndFinishInstanceMethod(int a, int b) return target.Result; } + [TestCase(333, "RunAndFinishInstanceWithParameterMethod", 111, 222, IncludeTypes = new[] { typeof(RunAndFinishClosureWithParameter) })] public static int RunAndFinishInstanceWithParameterMethod(int a, int b) { var target = new RunAndFinishClosureWithParameter(a); @@ -184,6 +175,8 @@ public static int RunAndFinishInstanceWithParameterMethod(int a, int b) return target.Result; } + [TestCase(true, "MultipleRunAndFinishInstanceMethod", 100, 10, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] + [TestCase(true, "MultipleRunAndFinishInstanceMethod", 100, 100, IncludeTypes = new[] { typeof(RunAndFinishClosure) })] public static bool MultipleRunAndFinishInstanceMethod(int a, int count) { var targets = new RunAndFinishClosure[count]; @@ -215,6 +208,7 @@ public static bool MultipleRunAndFinishInstanceMethod(int a, int count) return true; } + [TestCase(true, "WillGetDifferentThreadId", IncludeTypes = new[] { typeof(WillGetDifferentThreadIdClosure) })] public static bool WillGetDifferentThreadId() { var target = new WillGetDifferentThreadIdClosure(); @@ -225,6 +219,7 @@ public static bool WillGetDifferentThreadId() return target.TestThreadId != target.RunThreadId; } + [TestCase(100, "RaceFreeWithObjectMonitorLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLockClosure) })] public static int RaceFreeWithObjectMonitorLock(int count) { var target = new RaceFreeMonitorLockClosure(new object()); @@ -246,6 +241,7 @@ public static int RaceFreeWithObjectMonitorLock(int count) return target.Value; } + [TestCase(100, "RaceFreeWithConstStringMonitorLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLockClosure) })] public static int RaceFreeWithConstStringMonitorLock(int count) { var target = new RaceFreeMonitorLockClosure("LOCK TARGET"); @@ -267,6 +263,7 @@ public static int RaceFreeWithConstStringMonitorLock(int count) return target.Value; } + [TestCase(100, "RaceFreeWithObjectMonitorLock2", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLock2Closure) })] public static int RaceFreeWithObjectMonitorLock2(int count) { var target = new RaceFreeMonitorLock2Closure(new object()); @@ -288,6 +285,7 @@ public static int RaceFreeWithObjectMonitorLock2(int count) return target.Value; } + [TestCase(100, "RaceFreeWithConstStringMonitorLock2", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorLock2Closure) })] public static int RaceFreeWithConstStringMonitorLock2(int count) { var target = new RaceFreeMonitorLock2Closure("LOCK TARGET"); @@ -309,6 +307,7 @@ public static int RaceFreeWithConstStringMonitorLock2(int count) return target.Value; } + [TestCase(100, "RaceFreeWithObjectMonitorTryLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorTryLockClosure) })] public static int RaceFreeWithObjectMonitorTryLock(int count) { var target = new RaceFreeMonitorTryLockClosure(new object()); @@ -330,6 +329,7 @@ public static int RaceFreeWithObjectMonitorTryLock(int count) return target.Value; } + [TestCase(100, "RaceFreeWithConstStringMonitorTryLock", 10, IncludeTypes = new[] { typeof(RaceFreeMonitorTryLockClosure) })] public static int RaceFreeWithConstStringMonitorTryLock(int count) { var target = new RaceFreeMonitorTryLockClosure("LOCK TARGET"); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializer.cs b/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializer.cs index fd6f0bef..8d581278 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializer.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializer.cs @@ -83,112 +83,112 @@ public static class TypeInitializer_NonTrackingGCs [TestId("TypeInitializer")] [Description("These tests are verified the IL2C can handle the type initializer special translation cases.")] - [TestCase(true, "Bool", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((byte)1, "Byte", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((short)1, "Int16", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((int)3, "Int32", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((long)1, "Int64", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((sbyte)1, "SByte", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((ushort)1, "UInt16", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((uint)1, "UInt32", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((ulong)1, "UInt64", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((int)1, "IntPtr", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((uint)1, "UIntPtr", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((float)1, "Single", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((double)1, "Double", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase((char)1, "Char", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase("ABC", "String", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] - [TestCase(0, "Int32_None", IncludeTypes = new[] { typeof(TypeInitializer_None) })] - [TestCase(null, "String_None", IncludeTypes = new[] { typeof(TypeInitializer_None) })] - [TestCase(0, "NonTracked", IncludeTypes = new[] { typeof(TypeInitializer_NonTrackingGCs) })] public sealed partial class TypeInitializer { + [TestCase(true, "Bool", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static bool Bool() { return TypeInitializer_Field.BooleanValue; } + [TestCase((byte)1, "Byte", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static byte Byte() { return TypeInitializer_Field.ByteValue; } + [TestCase((short)1, "Int16", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static short Int16() { return TypeInitializer_Field.Int16Value; } + [TestCase((int)3, "Int32", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static int Int32() { return TypeInitializer_Field.Int32Value; } + [TestCase((long)1, "Int64", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static long Int64() { return TypeInitializer_Field.Int64Value; } + [TestCase((sbyte)1, "SByte", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static sbyte SByte() { return TypeInitializer_Field.SByteValue; } + [TestCase((ushort)1, "UInt16", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static ushort UInt16() { return TypeInitializer_Field.UInt16Value; } + [TestCase((uint)1, "UInt32", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static uint UInt32() { return TypeInitializer_Field.UInt32Value; } + [TestCase((ulong)1, "UInt64", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static ulong UInt64() { return TypeInitializer_Field.UInt64Value; } + [TestCase((int)1, "IntPtr", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static IntPtr IntPtr() { return TypeInitializer_Field.IntPtrValue; } + [TestCase((uint)1, "UIntPtr", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static UIntPtr UIntPtr() { return TypeInitializer_Field.UIntPtrValue; } + [TestCase((float)1, "Single", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static float Single() { return TypeInitializer_Field.SingleValue; } + [TestCase((double)1, "Double", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static double Double() { return TypeInitializer_Field.DoubleValue; } + [TestCase((char)1, "Char", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static char Char() { return TypeInitializer_Field.CharValue; } + [TestCase("ABC", "String", IncludeTypes = new[] { typeof(TypeInitializer_Field) })] public static string String() { return TypeInitializer_Field.StringValue; } + [TestCase(0, "Int32_None", IncludeTypes = new[] { typeof(TypeInitializer_None) })] public static int Int32_None() { return TypeInitializer_None.Int32Value; } + [TestCase(null, "String_None", IncludeTypes = new[] { typeof(TypeInitializer_None) })] public static string? String_None() { return TypeInitializer_None.StringValue; } // Only manual revewing generated C source code. + [TestCase(0, "NonTracked", IncludeTypes = new[] { typeof(TypeInitializer_NonTrackingGCs) })] public static int NonTracked() { return TypeInitializer_NonTrackingGCs.Int32Value; diff --git a/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializerAtomicity.cs b/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializerAtomicity.cs index 3accd1c7..b2f86179 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializerAtomicity.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/TypeInitializer/TypeInitializerAtomicity.cs @@ -48,11 +48,9 @@ public void Run() } } - [TestCase(1230, "MultipleExecution", 10, IncludeTypes = new[] { typeof(MultipleExecutionClosure), typeof(TypeInitializer_Atomicity) })] - [TestCase(0, "MultipleExecutionWithNoTypeInitializer", 40, IncludeTypes = new[] { typeof(MultipleExecutionClosure_NoTypeInitializer), typeof(TypeInitializer_Atomicity_NoTypeInitializer) })] - [TestCase(246, "AfterInitialized", IncludeTypes = new[] { typeof(TypeInitializer_Atomicity) })] partial class TypeInitializer { + [TestCase(1230, "MultipleExecution", 10, IncludeTypes = new[] { typeof(MultipleExecutionClosure), typeof(TypeInitializer_Atomicity) })] public static int MultipleExecution(int count) { var targets = new MultipleExecutionClosure[count]; @@ -84,6 +82,7 @@ public static int MultipleExecution(int count) return sum; } + [TestCase(0, "MultipleExecutionWithNoTypeInitializer", 40, IncludeTypes = new[] { typeof(MultipleExecutionClosure_NoTypeInitializer), typeof(TypeInitializer_Atomicity_NoTypeInitializer) })] public static int MultipleExecutionWithNoTypeInitializer(int count) { var targets = new MultipleExecutionClosure_NoTypeInitializer[count]; @@ -113,6 +112,7 @@ public static int MultipleExecutionWithNoTypeInitializer(int count) return sum; } + [TestCase(246, "AfterInitialized", IncludeTypes = new[] { typeof(TypeInitializer_Atomicity) })] public static int AfterInitialized() { var value0 = TypeInitializer_Atomicity.Int32Value; diff --git a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeImplements.cs b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeImplements.cs index 39621b39..28533565 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeImplements.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeImplements.cs @@ -238,219 +238,219 @@ public class InstanceMultipleImplement3DepthType : InstanceMultipleImplement2Dep } [TestId("TypeRelations")] - [TestCase("223", "InstanceImplement", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })] - [TestCase("223", "InstanceImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })] - [TestCase("223", "InstanceMultipleImplement1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] - [TestCase("223", "InstanceMultipleImplementFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] - [TestCase("323", "InstanceMultipleImplement2", 123L, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] - [TestCase("323", "InstanceMultipleImplementFromInterface2", 123L, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] - [TestCase("223", "InstanceMultipleImplementUnified1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleImplementUnifiedFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleImplementUnifiedFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleImplementCombination", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleImplementCombinationFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("323", "InstanceMultipleImplementCombinationFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleImplementExplicitlyFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementExplicitlyType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("323", "InstanceMultipleImplementExplicitlyFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementExplicitlyType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("223", "InstanceMultipleCombinedImplement", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombined1ImplementFromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] - [TestCase("323", "InstanceMultipleCombined2ImplementFromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombinedAndParallelImplement", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] - [TestCase("323", "InstanceMultipleCombinedAndParallel1ImplementFromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] - [TestCase("423", "InstanceMultipleCombinedAndParallel2ImplementFromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombinedImplementCombination1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombined2ImplementCombination1FromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("323", "InstanceMultipleCombined1ImplementCombination1FromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("423", "InstanceMultipleCombined2ImplementCombination1FromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombinedImplementCombination2", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("323", "InstanceMultipleCombined2ImplementCombination2FromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("223", "InstanceMultipleCombined1ImplementCombination2FromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("423", "InstanceMultipleCombined2ImplementCombination2FromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] - [TestCase("523", "InstanceMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("323", "InstanceMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("423", "InstanceMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public sealed class TypeImplements { + [TestCase("223", "InstanceImplement", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })] public static string InstanceImplement(int value) { var inst = new InstanceImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })] public static string InstanceImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplement1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] public static string InstanceMultipleImplement1(int value) { var inst = new InstanceMultipleImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] public static string InstanceMultipleImplementFromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleImplement2", 123L, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] public static string InstanceMultipleImplement2(long value) { var inst = new InstanceMultipleImplementType(); return inst.GetStringFromInt64(value); } + [TestCase("323", "InstanceMultipleImplementFromInterface2", 123L, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })] public static string InstanceMultipleImplementFromInterface2(long value) { IInterfaceType2 inst = new InstanceMultipleImplementType(); return inst.GetStringFromInt64(value); } + [TestCase("223", "InstanceMultipleImplementUnified1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementUnified1(int value) { var inst = new InstanceMultipleImplementUnifiedType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementUnifiedFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementUnifiedFromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleImplementUnifiedType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementUnifiedFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementUnifiedType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementUnifiedFromInterface3(int value) { IInterfaceType3 inst = new InstanceMultipleImplementUnifiedType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementCombination", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementCombination(int value) { var inst = new InstanceMultipleImplementCombinationType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementCombinationFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementCombinationFromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleImplementCombinationType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleImplementCombinationFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementCombinationType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementCombinationFromInterface3(int value) { IInterfaceType3 inst = new InstanceMultipleImplementCombinationType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleImplementExplicitlyFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementExplicitlyType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementExplicitlyFromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleImplementExplicitlyType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleImplementExplicitlyFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementExplicitlyType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementExplicitlyFromInterface3(int value) { IInterfaceType3 inst = new InstanceMultipleImplementExplicitlyType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleCombinedImplement", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedImplement(int value) { var inst = new InstanceMultipleCombinedImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleCombined1ImplementFromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined1ImplementFromInterface4(int value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleCombined2ImplementFromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined2ImplementFromInterface4(long value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementType(); return inst.GetStringFromInt64(value); } + [TestCase("223", "InstanceMultipleCombinedAndParallelImplement", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedAndParallelImplement(int value) { var inst = new InstanceMultipleCombinedAndParallelImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleCombinedAndParallel1ImplementFromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedAndParallel1ImplementFromInterface4(int value) { IInterfaceType4 inst = new InstanceMultipleCombinedAndParallelImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceMultipleCombinedAndParallel2ImplementFromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedAndParallelImplementType), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedAndParallel2ImplementFromInterface4(long value) { IInterfaceType4 inst = new InstanceMultipleCombinedAndParallelImplementType(); return inst.GetStringFromInt64(value); } + [TestCase("223", "InstanceMultipleCombinedImplementCombination1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedImplementCombination1(int value) { var inst = new InstanceMultipleCombinedImplementCombinationType1(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleCombined2ImplementCombination1FromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined1ImplementCombination1FromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleCombinedImplementCombinationType1(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleCombined1ImplementCombination1FromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined1ImplementCombination1FromInterface4(int value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementCombinationType1(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceMultipleCombined2ImplementCombination1FromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType1), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined2ImplementCombination1FromInterface4(long value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementCombinationType1(); return inst.GetStringFromInt64(value); } + [TestCase("223", "InstanceMultipleCombinedImplementCombination2", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombinedImplementCombination2(int value) { var inst = new InstanceMultipleCombinedImplementCombinationType2(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleCombined2ImplementCombination2FromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined1ImplementCombination2FromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleCombinedImplementCombinationType2(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceMultipleCombined1ImplementCombination2FromInterface4", 123, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined1ImplementCombination2FromInterface4(int value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementCombinationType2(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceMultipleCombined2ImplementCombination2FromInterface4", 123L, IncludeTypes = new[] { typeof(InstanceMultipleCombinedImplementCombinationType2), typeof(IInterfaceType1), typeof(IInterfaceType4) })] public static string InstanceMultipleCombined2ImplementCombination2FromInterface4(long value) { IInterfaceType4 inst = new InstanceMultipleCombinedImplementCombinationType2(); return inst.GetStringFromInt64(value); } + [TestCase("523", "InstanceMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementDepth(int value) { var inst = new InstanceMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementDepthFromInterface1(int value) { IInterfaceType1 inst = new InstanceMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplement3DepthType), typeof(InstanceMultipleImplement2DepthType), typeof(InstanceMultipleImplement1DepthType), typeof(InstanceMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string InstanceMultipleImplementDepthFromInterface3(int value) { IInterfaceType3 inst = new InstanceMultipleImplement3DepthType(); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritance.cs b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritance.cs index 92061e8c..95ee85f9 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritance.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritance.cs @@ -202,184 +202,184 @@ public override string GetStringFromInt32(int value) [TestId("TypeRelations")] [Description("CLR type system contains single-inheritance class types and multiple-implementation interface types. These tests are verified the IL2C can handle the member methods both simple instance methods and complex overriden virtual methods.")] - [TestCase("223", "InstanceBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType) })] - [TestCase("323", "InstanceNew", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewType) })] - [TestCase("223", "InstanceNewFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewType) })] - [TestCase("323", "InstanceNewVirtual", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType) })] - [TestCase("223", "InstanceNewVirtualFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType) })] - [TestCase("423", "InstanceNewVirtualOverride", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] - [TestCase("223", "InstanceNewVirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] - [TestCase("423", "InstanceNewVirtualOverrideFromNewVirtual", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] - [TestCase("223ABC", "InstanceNewCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewCallBaseType) })] - [TestCase("223ABC", "InstanceNewVirtualCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualCallBaseType) })] - [TestCase("323ABC", "InstanceNewVirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideCallBaseType) })] - [TestCase("223", "VirtualBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType) })] - [TestCase("323", "VirtualOverride", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType) })] - [TestCase("323", "VirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType) })] - [TestCase("323", "VirtualNew", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewType) })] - [TestCase("223", "VirtualNewFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewType) })] - [TestCase("323", "VirtualNewVirtual", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType) })] - [TestCase("223", "VirtualNewVirtualFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType) })] - [TestCase("423", "VirtualNewVirtualOverride", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] - [TestCase("223", "VirtualNewVirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] - [TestCase("423", "VirtualNewVirtualOverrideFromNewVirtual", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] - [TestCase("223ABC", "VirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideCallBaseType) })] - [TestCase("223ABC", "VirtualNewCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewCallBaseType) })] - [TestCase("223ABC", "VirtualNewVirtualCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualCallBaseType) })] - [TestCase("323ABC", "VirtualOverrideOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType), typeof(VirtualOverrideOverrideCallBaseType) })] - [TestCase("323ABC", "VirtualNewVirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideCallBaseType) })] public sealed class TypeInheritance { + [TestCase("223", "InstanceBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType) })] public static string InstanceBase(int value) { var inst = new InstanceBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNew", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewType) })] public static string InstanceNew(int value) { var inst = new InstanceNewType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceNewFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewType) })] public static string InstanceNewFromBase(int value) { InstanceBaseType inst = new InstanceNewType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewVirtual", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType) })] public static string InstanceNewVirtual(int value) { var inst = new InstanceNewVirtualType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceNewVirtualFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType) })] public static string InstanceNewVirtualFromBase(int value) { InstanceBaseType inst = new InstanceNewVirtualType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceNewVirtualOverride", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] public static string InstanceNewVirtualOverride(int value) { var inst = new InstanceNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceNewVirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] public static string InstanceNewVirtualOverrideFromBase(int value) { InstanceBaseType inst = new InstanceNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceNewVirtualOverrideFromNewVirtual", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideType) })] public static string InstanceNewVirtualOverrideFromNewVirtual(int value) { InstanceNewVirtualType inst = new InstanceNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("223ABC", "InstanceNewCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewCallBaseType) })] public static string InstanceNewCallBase(int value) { var inst = new InstanceNewCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("223ABC", "InstanceNewVirtualCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualCallBaseType) })] public static string InstanceNewVirtualCallBase(int value) { var inst = new InstanceNewVirtualCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("323ABC", "InstanceNewVirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(InstanceBaseType), typeof(InstanceNewVirtualType), typeof(InstanceNewVirtualOverrideCallBaseType) })] public static string InstanceNewVirtualOverrideCallBase(int value) { var inst = new InstanceNewVirtualOverrideCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType) })] public static string VirtualBase(int value) { var inst = new VirtualBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverride", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType) })] public static string VirtualOverride(int value) { var inst = new VirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType) })] public static string VirtualOverrideFromBase(int value) { VirtualBaseType inst = new VirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNew", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewType) })] public static string VirtualNew(int value) { var inst = new VirtualNewType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualNewFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewType) })] public static string VirtualNewFromBase(int value) { VirtualBaseType inst = new VirtualNewType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNewVirtual", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType) })] public static string VirtualNewVirtual(int value) { var inst = new VirtualNewVirtualType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualNewVirtualFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType) })] public static string VirtualNewVirtualFromBase(int value) { VirtualBaseType inst = new VirtualNewVirtualType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualNewVirtualOverride", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] public static string VirtualNewVirtualOverride(int value) { var inst = new VirtualNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualNewVirtualOverrideFromBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] public static string VirtualNewVirtualOverrideFromBase(int value) { VirtualBaseType inst = new VirtualNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualNewVirtualOverrideFromNewVirtual", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideType) })] public static string VirtualNewVirtualOverrideFromNewVirtual(int value) { VirtualNewVirtualType inst = new VirtualNewVirtualOverrideType(); return inst.GetStringFromInt32(value); } + [TestCase("223ABC", "VirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideCallBaseType) })] public static string VirtualOverrideCallBase(int value) { var inst = new VirtualOverrideCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("223ABC", "VirtualNewCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewCallBaseType) })] public static string VirtualNewCallBase(int value) { var inst = new VirtualNewCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("223ABC", "VirtualNewVirtualCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualCallBaseType) })] public static string VirtualNewVirtualCallBase(int value) { var inst = new VirtualNewVirtualCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("323ABC", "VirtualOverrideOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualOverrideType), typeof(VirtualOverrideOverrideCallBaseType) })] public static string VirtualOverrideOverrideCallBase(int value) { var inst = new VirtualOverrideOverrideCallBaseType(); return inst.GetStringFromInt32(value); } + [TestCase("323ABC", "VirtualNewVirtualOverrideCallBase", 123, IncludeTypes = new[] { typeof(VirtualBaseType), typeof(VirtualNewVirtualType), typeof(VirtualNewVirtualOverrideCallBaseType) })] public static string VirtualNewVirtualOverrideCallBase(int value) { var inst = new VirtualNewVirtualOverrideCallBaseType(); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritanceAndImplements.cs b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritanceAndImplements.cs index 8219c879..0ef7d2d8 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritanceAndImplements.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/TypeRelations/TypeInheritanceAndImplements.cs @@ -285,282 +285,282 @@ public class VirtualNewVirtualMultipleImplement3DepthType : VirtualNewVirtualMul } [TestId("TypeRelations")] - [TestCase("223", "InstanceImplicitlyImplement", 123, IncludeTypes = new[] { typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("223", "InstanceImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "InstanceNewAndImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "InstanceNewAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "InstanceNewAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("223", "InstanceNewAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "InstanceNewAndNewImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndNewImplementType), typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "InstanceNewAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndNewImplementType), typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "InstanceNewAndImplicitlyAndNewImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyAndNewImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "InstanceNewAndImplicitlyAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyAndNewImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] - [TestCase("223", "VirtualImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("223", "VirtualImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualNewAndImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualNewAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualNewAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("223", "VirtualNewAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "VirtualNewAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndNewImplementType), typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "VirtualNewAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndNewImplementType), typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "VirtualOverrideAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "VirtualOverrideAndImplicitlyAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyAndNewImplementType), typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndImplicitlyAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyAndNewImplementType), typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("423", "VirtualOverrideAndNewVirtualImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndNewVirtualImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("323", "VirtualOverrideAndNewVirtualAndOverrideImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideReImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideReImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideReImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideReImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("223AAABBBCCCDDD", "VirtualNewVirtualStacked", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualStacked4Type), typeof(VirtualNewVirtualStacked3Type), typeof(VirtualNewVirtualStacked2Type), typeof(VirtualNewVirtualStacked1Type), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("223AAABBBCCC", "VirtualNewVirtualStackedFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualStacked4Type), typeof(VirtualNewVirtualStacked3Type), typeof(VirtualNewVirtualStacked2Type), typeof(VirtualNewVirtualStacked1Type), typeof(VirtualBaseType), typeof(IInterfaceType1) })] - [TestCase("523", "VirtualOverrideMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("523", "VirtualOverrideMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("523", "VirtualOverrideMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("523", "VirtualNewVirtualMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("323", "VirtualNewVirtualMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] - [TestCase("423", "VirtualNewVirtualMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public sealed class TypeInheritanceAndImplements { + [TestCase("223", "InstanceImplicitlyImplement", 123, IncludeTypes = new[] { typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceImplicitlyImplement(int value) { var inst = new InstanceImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceImplicitlyImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewAndImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplement(int value) { var inst = new InstanceNewAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceNewAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplicitlyImplement(int value) { var inst = new InstanceNewAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "InstanceNewAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplicitlyImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceNewAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceNewAndNewImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndNewImplementType), typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndNewImplement(int value) { var inst = new InstanceNewAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "InstanceNewAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndNewImplementType), typeof(InstanceNewAndImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndNewImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceNewAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewAndImplicitlyAndNewImplement", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyAndNewImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplicitlyAndNewImplement(int value) { var inst = new InstanceNewAndImplicitlyAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "InstanceNewAndImplicitlyAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceNewAndImplicitlyAndNewImplementType), typeof(InstanceImplicitlyImplementType), typeof(InstanceBaseType), typeof(IInterfaceType1) })] public static string InstanceNewAndImplicitlyAndNewImplementFromInterface(int value) { IInterfaceType1 inst = new InstanceNewAndImplicitlyAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualImplicitlyImplement(int value) { var inst = new VirtualImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualImplicitlyImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNewAndImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndImplement(int value) { var inst = new VirtualNewAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNewAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualNewAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNewAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndImplicitlyImplement(int value) { var inst = new VirtualNewAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223", "VirtualNewAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndImplicitlyImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualNewAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualNewAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualNewAndNewImplementType), typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndNewImplement(int value) { var inst = new VirtualNewAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualNewAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewAndNewImplementType), typeof(VirtualNewAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewAndNewImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualNewAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplement(int value) { var inst = new VirtualOverrideAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndImplicitlyImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplicitlyImplement(int value) { var inst = new VirtualOverrideAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndImplicitlyImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplicitlyImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndImplicitlyImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualOverrideAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewImplement(int value) { var inst = new VirtualOverrideAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualOverrideAndImplicitlyAndNewImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyAndNewImplementType), typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplicitlyAndNewImplement(int value) { var inst = new VirtualOverrideAndImplicitlyAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndImplicitlyAndNewImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndImplicitlyAndNewImplementType), typeof(VirtualOverrideAndImplicitlyImplementType), typeof(VirtualImplicitlyImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndImplicitlyAndNewImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndImplicitlyAndNewImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualOverrideAndNewVirtualImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualImplement(int value) { var inst = new VirtualOverrideAndNewVirtualImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndNewVirtualImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndNewVirtualImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualAndOverrideImplement(int value) { var inst = new VirtualOverrideAndNewVirtualAndOverrideImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualOverrideAndNewVirtualAndOverrideImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualAndOverrideImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndNewVirtualAndOverrideImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideReImplement", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideReImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualAndOverrideReImplement(int value) { var inst = new VirtualOverrideAndNewVirtualAndOverrideReImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideAndNewVirtualAndOverrideReImplementFromInterface", 123, IncludeTypes = new[] { typeof(VirtualOverrideAndNewVirtualAndOverrideReImplementType), typeof(VirtualOverrideAndNewVirtualImplementType), typeof(VirtualOverrideAndImplementType), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualOverrideAndNewVirtualAndOverrideReImplementFromInterface(int value) { IInterfaceType1 inst = new VirtualOverrideAndNewVirtualAndOverrideReImplementType(); return inst.GetStringFromInt32(value); } + [TestCase("223AAABBBCCCDDD", "VirtualNewVirtualStacked", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualStacked4Type), typeof(VirtualNewVirtualStacked3Type), typeof(VirtualNewVirtualStacked2Type), typeof(VirtualNewVirtualStacked1Type), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewVirtualStacked(int value) { var inst = new VirtualNewVirtualStacked4Type(); return inst.GetStringFromInt32(value); } + [TestCase("223AAABBBCCC", "VirtualNewVirtualStackedFromInterface", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualStacked4Type), typeof(VirtualNewVirtualStacked3Type), typeof(VirtualNewVirtualStacked2Type), typeof(VirtualNewVirtualStacked1Type), typeof(VirtualBaseType), typeof(IInterfaceType1) })] public static string VirtualNewVirtualStackedFromInterface(int value) { IInterfaceType1 inst = new VirtualNewVirtualStacked4Type(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualOverrideMultipleImplementDepth(int value) { var inst = new VirtualOverrideMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualOverrideMultipleImplementDepthFromInterface1(int value) { IInterfaceType1 inst = new VirtualOverrideMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualOverrideMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(VirtualOverrideMultipleImplement3DepthType), typeof(VirtualOverrideMultipleImplement2DepthType), typeof(VirtualOverrideMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualOverrideMultipleImplementDepthFromInterface3(int value) { IInterfaceType3 inst = new VirtualOverrideMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("523", "VirtualNewVirtualMultipleImplementDepth", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualNewVirtualMultipleImplementDepth(int value) { var inst = new VirtualNewVirtualMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("323", "VirtualNewVirtualMultipleImplementDepthFromInterface1", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualNewVirtualMultipleImplementDepthFromInterface1(int value) { IInterfaceType1 inst = new VirtualNewVirtualMultipleImplement3DepthType(); return inst.GetStringFromInt32(value); } + [TestCase("423", "VirtualNewVirtualMultipleImplementDepthFromInterface3", 123, IncludeTypes = new[] { typeof(VirtualNewVirtualMultipleImplement3DepthType), typeof(VirtualNewVirtualMultipleImplement2DepthType), typeof(VirtualNewVirtualMultipleImplement1DepthType), typeof(VirtualMultipleImplementDepthBaseType), typeof(IInterfaceType1), typeof(IInterfaceType3) })] public static string VirtualNewVirtualMultipleImplementDepthFromInterface3(int value) { IInterfaceType3 inst = new VirtualNewVirtualMultipleImplement3DepthType(); diff --git a/tests/IL2C.Core.Test.RuntimeSystems/ValueTypes/ValueTypes.cs b/tests/IL2C.Core.Test.RuntimeSystems/ValueTypes/ValueTypes.cs index e114043b..dbd86188 100644 --- a/tests/IL2C.Core.Test.RuntimeSystems/ValueTypes/ValueTypes.cs +++ b/tests/IL2C.Core.Test.RuntimeSystems/ValueTypes/ValueTypes.cs @@ -155,38 +155,23 @@ public override string ToString() } [Description("Value types are specialized types at the .NET type system. Because the type inherited from the System.ValueType (objref type), all method has the managed pointer at the arg0 and these instances will box and apply the pseudo vptrs. These tests are verified the IL2C can handle value types.")] - [TestCase("123", "CallInstanceMethod", 123, IncludeTypes = new[] { typeof(ValueType1) })] - [TestCase("123", "CallInstanceMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueType2), typeof(IValueTypeAccessor1) })] - [TestCase("123", "CallInstanceMethodBoxedInterface", 123, IncludeTypes = new[] { typeof(ValueType2), typeof(IValueTypeAccessor1) })] - [TestCase("123", "CallCombinedInstanceMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("123", "CallCombinedInstanceMethodBoxedInterface1", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("123", "CallCombinedInstanceMethodBoxedInterface2", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("123", "CallCombinedInstanceMethodExplicitlyDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("223", "CallCombinedInstanceMethodExplicitlyBoxedInterface1", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("323", "CallCombinedInstanceMethodExplicitlyBoxedInterface2", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] - [TestCase("123", "CallOverrideMethod", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual1) })] - [TestCase("123", "CallOverrideMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] - [TestCase("123", "CallOverrideMethodBoxed", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] - [TestCase("123", "CallOverrideMethodBoxedInterface", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] - [TestCase("IL2C.RuntimeSystems.ValueTypeInheritedMethod", "CallInheritedMethod", IncludeTypes = new[] { typeof(ValueTypeInheritedMethod) })] - [TestCase(456, "ValueTypeUpdate1", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType1) })] - [TestCase(123, "ValueTypeUpdate2", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType2), typeof(IValueTypeUpdateType2) })] - [TestCase(123, "ValueTypeUpdate2ExplicitlyBoxed", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType2), typeof(IValueTypeUpdateType2) })] - [TestCase(456, "ValueTypeUpdate3", 123, IncludeTypes = new[] { typeof(ValueTypeUpdateType3) })] public sealed class ValueTypes { + [TestCase("123", "CallInstanceMethod", 123, IncludeTypes = new[] { typeof(ValueType1) })] public static string CallInstanceMethod(int value) { var v = new ValueType1(value); return v.GetStringValue(); } + [TestCase("123", "CallInstanceMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueType2), typeof(IValueTypeAccessor1) })] public static string CallInstanceMethodDirectly(int value) { var v = new ValueType2(value); return v.GetStringValue(); } + [TestCase("123", "CallInstanceMethodBoxedInterface", 123, IncludeTypes = new[] { typeof(ValueType2), typeof(IValueTypeAccessor1) })] public static string CallInstanceMethodBoxedInterface(int value) { // implicitly boxed @@ -194,12 +179,14 @@ public static string CallInstanceMethodBoxedInterface(int value) return v.GetStringValue(); } + [TestCase("123", "CallCombinedInstanceMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodDirectly(int value) { var v = new ValueTypeCombinedInterfaces(value); return v.GetStringValue(); } + [TestCase("123", "CallCombinedInstanceMethodBoxedInterface1", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodBoxedInterface1(int value) { // implicitly boxed @@ -207,6 +194,7 @@ public static string CallCombinedInstanceMethodBoxedInterface1(int value) return v.GetStringValue(); } + [TestCase("123", "CallCombinedInstanceMethodBoxedInterface2", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodBoxedInterface2(int value) { // implicitly boxed @@ -214,12 +202,14 @@ public static string CallCombinedInstanceMethodBoxedInterface2(int value) return v.GetStringValue(); } + [TestCase("123", "CallCombinedInstanceMethodExplicitlyDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodExplicitlyDirectly(int value) { var v = new ValueTypeCombinedExplicitlyInterfaces(value); return v.GetStringValue(); } + [TestCase("223", "CallCombinedInstanceMethodExplicitlyBoxedInterface1", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodExplicitlyBoxedInterface1(int value) { // implicitly boxed @@ -227,6 +217,7 @@ public static string CallCombinedInstanceMethodExplicitlyBoxedInterface1(int val return v.GetStringValue(); } + [TestCase("323", "CallCombinedInstanceMethodExplicitlyBoxedInterface2", 123, IncludeTypes = new[] { typeof(ValueTypeCombinedExplicitlyInterfaces), typeof(IValueTypeAccessor1), typeof(IValueTypeAccessor2) })] public static string CallCombinedInstanceMethodExplicitlyBoxedInterface2(int value) { // implicitly boxed @@ -234,18 +225,21 @@ public static string CallCombinedInstanceMethodExplicitlyBoxedInterface2(int val return v.GetStringValue(); } + [TestCase("123", "CallOverrideMethod", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual1) })] public static string CallOverrideMethod(int value) { var v = new ValueTypeWithOverridedVirtual1(value); return v.ToString(); } + [TestCase("123", "CallOverrideMethodDirectly", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] public static string CallOverrideMethodDirectly(int value) { var v = new ValueTypeWithOverridedVirtual2(value); return v.ToString(); } + [TestCase("123", "CallOverrideMethodBoxed", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] public static string CallOverrideMethodBoxed(int value) { // implicitly boxed @@ -253,6 +247,7 @@ public static string CallOverrideMethodBoxed(int value) return v.ToString()!; } + [TestCase("123", "CallOverrideMethodBoxedInterface", 123, IncludeTypes = new[] { typeof(ValueTypeWithOverridedVirtual2), typeof(IValueTypeOverrideAccessor) })] public static string CallOverrideMethodBoxedInterface(int value) { // implicitly boxed @@ -260,12 +255,14 @@ public static string CallOverrideMethodBoxedInterface(int value) return v.ToString(); } + [TestCase("IL2C.RuntimeSystems.ValueTypeInheritedMethod", "CallInheritedMethod", IncludeTypes = new[] { typeof(ValueTypeInheritedMethod) })] public static string CallInheritedMethod() { var v = new ValueTypeInheritedMethod(); return v.ToString()!; } + [TestCase(456, "ValueTypeUpdate1", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType1) })] public static int ValueTypeUpdate1(int before, int update) { var v = new ValueTypeUpdateType1(before); @@ -273,6 +270,7 @@ public static int ValueTypeUpdate1(int before, int update) return v.Value; } + [TestCase(123, "ValueTypeUpdate2", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType2), typeof(IValueTypeUpdateType2) })] public static int ValueTypeUpdate2(int before, int update) { var v = new ValueTypeUpdateType2(before); @@ -280,6 +278,7 @@ public static int ValueTypeUpdate2(int before, int update) return v.Value; } + [TestCase(123, "ValueTypeUpdate2ExplicitlyBoxed", 123, 456, IncludeTypes = new[] { typeof(ValueTypeUpdateType2), typeof(IValueTypeUpdateType2) })] public static int ValueTypeUpdate2ExplicitlyBoxed(int before, int update) { var v = new ValueTypeUpdateType2(before); @@ -288,6 +287,7 @@ public static int ValueTypeUpdate2ExplicitlyBoxed(int before, int update) return v.Value; } + [TestCase(456, "ValueTypeUpdate3", 123, IncludeTypes = new[] { typeof(ValueTypeUpdateType3) })] public static int ValueTypeUpdate3(int before) { var v = new ValueTypeUpdateType3(before);