diff options
author | Jackson Harper <jackson@novell.com> | 2003-07-21 00:53:57 +0400 |
---|---|---|
committer | Jackson Harper <jackson@novell.com> | 2003-07-21 00:53:57 +0400 |
commit | 0c4baf268cafc49f76ccde8aa96d6dfdd047bae2 (patch) | |
tree | b0eea6a3ca6d37e7be5d7f66c30e7871eb4cd956 | |
parent | 4bb6c5d8504e8b79627e39f0a3fc7919c2572f26 (diff) |
Some generics tests
svn path=/trunk/mcs/; revision=16455
-rw-r--r-- | mcs/ilasm/tests/generics-b.il | 30 | ||||
-rw-r--r-- | mcs/ilasm/tests/generics-c.il | 35 |
2 files changed, 65 insertions, 0 deletions
diff --git a/mcs/ilasm/tests/generics-b.il b/mcs/ilasm/tests/generics-b.il new file mode 100644 index 00000000000..3f94b7305bc --- /dev/null +++ b/mcs/ilasm/tests/generics-b.il @@ -0,0 +1,30 @@ +// +// Test instantiating a generic type +// + +.assembly extern mscorlib { } + + +.namespace Mono.ILASM.Tests { + + .class public Set<T> extends [mscorlib]System.Object { + + } + + .class public GenericsB extends [mscorlib]System.Object { + + .method public static void Main () + { + .entrypoint + .locals init (class Mono.ILASM.Tests.Set<int32>) + + ldloc.0 + call void [mscorlib]System.Console::WriteLine (object) + + ret + } + + } + +} + diff --git a/mcs/ilasm/tests/generics-c.il b/mcs/ilasm/tests/generics-c.il new file mode 100644 index 00000000000..549ab170bb8 --- /dev/null +++ b/mcs/ilasm/tests/generics-c.il @@ -0,0 +1,35 @@ +// +// Test a generic type type param field +// + +.assembly extern mscorlib { } + + +.namespace Mono.ILASM.Tests { + + .class public Set<T> extends [mscorlib]System.Object { + + .field public !0 val + + } + + .class public Driver extends [mscorlib]System.Object { + + .method public static void Main () + { + .entrypoint + .locals init (class Mono.ILASM.Tests.Set<int32>) + + ldloc.0 + ldc.i4.1 + stfld int32 class Mono.ILASM.Tests.Set<int32>::val + + ldfld int32 class Mono.ILASM.Tests.Set<int32>::val + call void [mscorlib]System.Console::WriteLine (int32) + + ret + } + + } +} + |