misc diff tests, proper tests to come soon.
authorJackson Harper <jackson@novell.com>
Sat, 31 May 2003 17:57:39 +0000 (17:57 -0000)
committerJackson Harper <jackson@novell.com>
Sat, 31 May 2003 17:57:39 +0000 (17:57 -0000)
svn path=/trunk/mcs/; revision=15028

mcs/ilasm/tests/test-1.il
mcs/ilasm/tests/test-10.il
mcs/ilasm/tests/test-11.il
mcs/ilasm/tests/test-2.il
mcs/ilasm/tests/test-3.il
mcs/ilasm/tests/test-4.il
mcs/ilasm/tests/test-5.il
mcs/ilasm/tests/test-6.il
mcs/ilasm/tests/test-7.il
mcs/ilasm/tests/test-8.il
mcs/ilasm/tests/test-9.il

index e50562b01e480f513c2469d076acc13f8f3ceb05..d1503a104795485863494625ec3c1c1b06b9f40c 100644 (file)
@@ -7,46 +7,21 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly HelloWorld { }
-.module HelloWorld.exe
+
+//
+// Declare a namespace, a class, and a method
+//
 
 .namespace Mono.ILASM.Tests {
 
        .class public auto ansi Test_1 extends [mscorlib]System.Object {
 
-               .method public instance void .ctor () cil managed {
-                       ldstr "In Constructor"
-               }
-       
                .method public static void check(string) cil managed {
                        .entrypoint
                        .maxstack 1     
-                       .locals init ([mscorlib]System.Object V_0)
-                       
-                       ldnull
-                       pop
-                       
-                       nop
-                       nop
-                       
-                       newobj void Mono.ILASM.Tests.Test_1::.ctor ()
-
-                       ldstr "Hello World."
-                       call void Mono.ILASM.Tests.Test_1::check (string)
-                       ldstr "Hello World"
-                       call instance void Mono.ILASM.Tests.Test_1::a ()
 
-                       ldfld void [mscorlib]System.Object::a
-
-                       initobj Mono.ILASM.Tests.Test_1
-
-                       ret
+                        nop                    
                }               
-
-               .method public static void a ()
-               {
-
-               }
        }
 }
 
index 374920a556cc6b2e05d90582c058bc36245ab399..b48487d22ae43dff2a9c3fd5aaef9c72b272e74d 100644 (file)
@@ -7,8 +7,11 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_10 { }
-.module test_10.exe
+
+
+//
+// Create some bound arrays
+//
 
 .namespace Mono.ILASM.Tests {
 
index 4570f444d2860aeca57900325cfd5ed8c132b7de..61a20bcb576d6c29b403e1cdfe85335d94ce10e6 100644 (file)
@@ -7,12 +7,15 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_11 { }
-.module test_11.exe
+
+//
+// Create a generic type
+//
 
 .namespace Mono.ILASM.Tests {
 
-        .class public auto ansi Test_10<int32> extends [mscorlib]System.Object {
+        .class public Test_11<int32 name_a_a_1, int32 name_a_a_a_2> extends [mscorlib]System.Object {
                        
        }
+
 }
\ No newline at end of file
index de8fddccde4c117d2984977305b0bc88a6744202..9e3db00a5ce69f4478d6ef5fda2ba6e0c9c75c54 100644 (file)
@@ -7,14 +7,16 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly HelloWorld { }
-.module HelloWorld.exe
+
+//
+// Declare a local object instantiate it and print it to stdout
+//
 
 .namespace Mono.ILASM.Tests {
 
        .class public auto ansi Test_2 extends [mscorlib]System.Object {
        
-               .method public static void check( ) cil managed {
+               .method public static void main () cil managed {
                        .entrypoint
                        .maxstack 1     
                        .locals init (object obj)
index b0695d6ce1c8206aa789dd58c9567f96d73181ea..8724c3fe1384d895cb4d850a8b6d3ff01d3c399c 100644 (file)
@@ -7,8 +7,10 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern corlib { }
-.assembly HelloWorld { }
-.module HelloWorld.exe
+
+//
+// Define a method and execute that method
+//
 
 .namespace Mono.ILASM.Tests {
 
@@ -24,7 +26,7 @@
                }
 
                .method private static void print_hello() cil managed {
-                       ldstr "Hello, World!"
+                       ldstr "PASS"
                        call void [corlib]System.Console::WriteLine(string)
                }
        
index d4fcf14bba315f41dbda01d25feda836f77b4643..b79a85beed36e8c520086c730de2a24d101cb086 100644 (file)
@@ -7,8 +7,10 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern corlib { }
-.assembly HelloWorld { }
-.module HelloWorld.exe
+
+//
+// Pass a param to a method
+//
 
 .namespace Mono.ILASM.Tests {
 
@@ -18,7 +20,7 @@
                        .entrypoint
                        .maxstack 1     
                        
-                       ldstr "Hello, World!"
+                       ldstr "PASS"
                        call void Mono.ILASM.Tests.Test_4::print_string(string)
 
                        ret
index ddb7ba62a48037fb0fdb2bee49eeede58b244199..223d36244a3796c889a0707e13a1da73101dba9b 100644 (file)
@@ -7,8 +7,10 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_5 { }
-.module test_5.exe
+
+//
+// Define a field
+//
 
 .namespace Mono.ILASM.Tests {
 
index 2e8e149f7257dd37961fac2622b73fce3ad0f03c..bb809cae5027affb75301dd3145486648a7bfeb3 100644 (file)
@@ -7,21 +7,20 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_6 { }
-.module test_6.exe
 
-.namespace Mono.ILASM.Tests {
-
-       .class public auto ansi A extends [mscorlib]System.Object {
-       }
+//
+// Define classes outside of namespaces, also define a field that
+// references a type in this assembly
+//
 
-       .class public auto ansi Test_6 extends [mscorlib]System.Object {
-       
-               /// <summary>
-               ///  Field that references a type in this assembly
-               /// </summary>
-               .field public Mono.ILASM.Tests.A a_field
-       }
+.class public auto ansi Test_6 extends [mscorlib]System.Object {
        
+       /// <summary>
+       ///  Field that references a type in this assembly
+       /// </summary>
+       .field public class A a_field
 }
 
+.class public auto ansi A extends [mscorlib]System.Object {
+
+}
index 28d5f691e3733c911bfe6cd9a688fa460683df64..8de95a0d1a6eacf75e9bc78c79f3cc4791e96eee 100644 (file)
@@ -8,8 +8,12 @@
 //
 .assembly extern mscorlib { }
 .assembly extern Cscompmgd { }
-.assembly test_7 { }
-.module test_7.exe
+
+
+//
+// Define a method that references a type in another assembly (that is
+// not corlib)
+//
 
 .namespace Mono.ILASM.Tests {
 
index e41b768a42b368d27e7421cbc604c97aa086edf4..9e6fd1ae5388899b6463a05e794edf6d58f62644 100644 (file)
@@ -7,18 +7,16 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_8 { }
-.module test_8.exe
+
+//
+// Implement an interface
+//
 
 .namespace Mono.ILASM.Tests {
 
-       .class public auto ansi Test_8 extends [mscorlib]System.Object {
-       
-       }
-       
-       .class public auto ansi A 
+       .class public auto ansi Test_8
                extends [mscorlib]System.Collections.ArrayList 
-               implements [mscorlib]System.Collections.IList, [mscorlib]System.Object {
+               implements [mscorlib]System.Collections.IList {
 
        }
 }
index 5df1971a5406cba526d5efd0a4dd127102a206f2..db967816569bdcc11e4739ec3e96136463a8541b 100644 (file)
@@ -7,8 +7,10 @@
 // (C) 2003 Jackson Harper, All rights reserved
 //
 .assembly extern mscorlib { }
-.assembly test_9 { }
-.module test_9.exe
+
+//
+// Call a constructor for a type defined in this assembly
+//
 
 .namespace Mono.ILASM.Tests {