Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More tests.

svn path=/trunk/mono/; revision=2369
  • Loading branch information...
commit 2539b42868d6833e0c6a4750349db50e73d2b174 1 parent 85dbd7f
@illupus illupus authored
View
1  mono/tests/Makefile.am
@@ -34,6 +34,7 @@ TESTSRC= \
enum2.cs \
property.cs \
enumcast.cs \
+ newobj-valuetype.cs \
arraylist-clone.cs \
setenv.cs \
vtype.cs \
View
21 mono/tests/newobj-valuetype.cs
@@ -0,0 +1,21 @@
+
+namespace Test {
+ public struct Struct {
+ public int a;
+
+ public Struct (int val) {
+ a = val;
+ }
+
+ public static int Main () {
+ object o = new Struct (1);
+ Struct s = new Struct (2);
+
+ if (s.a != 2)
+ return 1;
+ if (((Struct)o).a != 1)
+ return 2;
+ return 0;
+ }
+ }
+}
View
17 mono/tests/unreachable-code.cs
@@ -0,0 +1,17 @@
+using System;
+
+// You need to compile this test with mcs:
+// csc will discard unreachable code sections
+
+namespace Test {
+ public class Test {
+ public static int Main () {
+ int var = 0;
+ goto label2;
+ label1:
+ goto label2;
+ label2:
+ return var;
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.