summaryrefslogtreecommitdiff
path: root/tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs')
-rw-r--r--tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs63
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs b/tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs
new file mode 100644
index 0000000000..eb006f6d11
--- /dev/null
+++ b/tests/src/Loader/classloader/v1/Beta1/Layout/Matrix/cs/L-2-12-3.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+//////////////////////////////////////////////////////////
+// L-1-9-1.cs - Beta1 Layout Test - RDawson
+//
+// Tests layout of classes using 1-deep implementation in
+// the same assembly and module
+//
+// See ReadMe.txt in the same project as this source for
+// further details about these tests.
+//
+
+//@csharp C# doesn't allow much flexibility here in terms of negative testing on interfaces...
+//THIS NEEDS MORE COVERAGE
+
+using System;
+
+class Test{
+public static int Main(){
+ int mi_RetCode;
+ C c = new C();
+ mi_RetCode = c.Test();
+
+ if(mi_RetCode == 100)
+ Console.WriteLine("Pass");
+ else
+ Console.WriteLine("FAIL");
+
+ return mi_RetCode;
+}
+}
+
+struct C : A, B{
+public int MethPubInst(){
+ Console.WriteLine("B::MethPubInst()");
+ return 100;
+}
+
+public int MethPubInst2(){
+ Console.WriteLine("C::MethPubInst2()");
+ return 100;
+}
+
+public int Test(){
+ int mi_RetCode = 100;
+
+ /////////////////////////////////
+ // Test instance method access
+ if(MethPubInst() != 100)
+ mi_RetCode = 0;
+
+ if(MethPubInst2() != 100)
+ mi_RetCode = 0;
+
+ return mi_RetCode;
+}
+}
+
+
+
+