Add new test
authorMiguel de Icaza <miguel@gnome.org>
Mon, 15 Jul 2002 00:57:15 +0000 (00:57 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Mon, 15 Jul 2002 00:57:15 +0000 (00:57 -0000)
svn path=/trunk/mcs/; revision=5803

mcs/tests/makefile
mcs/tests/test-143.cs [new file with mode: 0755]

index b1ebec2c7226afb5b552caf897ed9d7e58278abb..ccc62b12e30601d21da5c64e3953ba384468c33f 100755 (executable)
@@ -23,7 +23,7 @@ TEST_SOURCES = \
        test-111 test-112 test-113 test-114 test-115 test-116 test-117 test-118 test-119 \
        test-121 test-122 test-123          test-125 test-126 test-127 test-128 test-129 test-130 \
        test-131 test-132 test-133 test-134 test-135 test-136 test-137 test-138 test-139 test-140 \
-       test-141 test-142
+       test-141 test-142 test-143
 
 UNSAFE_SOURCES = \
        unsafe-1 unsafe-2 unsafe-3
diff --git a/mcs/tests/test-143.cs b/mcs/tests/test-143.cs
new file mode 100755 (executable)
index 0000000..942caed
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+
+struct MonoEnumInfo {
+        int val;
+
+        void stuff() { val = 1; }
+
+        static int GetInfo (out MonoEnumInfo info) {
+                info.stuff();
+                return info.val;
+        }
+
+        static int Main()
+       {
+               MonoEnumInfo m;
+
+               if (GetInfo (out m) != 1)
+                       return 1;
+               
+               if (m.val != 1)
+                       return 2;
+
+               return 0;
+       }
+};
+