Răsfoiți Sursa

Add new tests

svn path=/trunk/mcs/; revision=1905
Miguel de Icaza 24 ani în urmă
părinte
comite
cb5a67cf66
4 a modificat fișierele cu 54 adăugiri și 2 ștergeri
  1. 2 1
      mcs/tests/makefile
  2. 3 1
      mcs/tests/test-14.cs
  3. 28 0
      mcs/tests/test-71.cs
  4. 21 0
      mcs/tests/test-72.cs

+ 2 - 1
mcs/tests/makefile

@@ -11,7 +11,8 @@ TEST_SOURCES = \
 	test-31 test-32 test-33 test-34 test-35 test-36	test-37 	test-39 test-40 \
 	test-41 test-42 test-43 test-44 test-45 test-46 test-47 test-48 test-49 test-50 \
 	test-51 test-52	test-53 test-54 test-55 test-56 test-57		test-59 	\
-	test-61	test-62 test-63	test-64 test-65 test-66 test-67 test-68 test-69 test-70
+	test-61	test-62 test-63	test-64 test-65 test-66 test-67 test-68 test-69 test-70	\
+	test-71 test-72
 
 
 TEST_NOPASS = \

+ 3 - 1
mcs/tests/test-14.cs

@@ -25,8 +25,10 @@ namespace Obj {
 				result |= 1 << 1;
 			if (b.G () != 4)
 				result |= 1 << 2;
-			if (a.G () != 4)
+			if (a.G () != 4){
+				Console.WriteLine ("oops: " + a.G ());
 				result |= 1 << 3;
+			}
 			if (a.H () != 10)
 				result |= 1 << 4;
 			if (b.H () != 11)

+ 28 - 0
mcs/tests/test-71.cs

@@ -0,0 +1,28 @@
+//
+// struct with a constructor
+//
+using System;
+
+class X {
+
+	static void Main ()
+	{
+		MethodSignature ms = new MethodSignature ("hello", null, null);
+		
+		Console.WriteLine ("About to look for: " + ms.Name);
+	}
+}
+
+	struct MethodSignature {
+		public string Name;
+		public Type RetType;
+		public Type [] Parameters;
+		
+		public MethodSignature (string name, Type ret_type, Type [] parameters)
+		{
+			Name = name;
+			RetType = ret_type;
+			Parameters = parameters;
+		}
+	}
+		

+ 21 - 0
mcs/tests/test-72.cs

@@ -0,0 +1,21 @@
+//
+// Compile test for referencing types on nested types
+//
+
+using System;
+
+public class outer {
+        public class inner {
+                public void meth(Object o) {
+                        inner inst = (inner)o;
+                }
+        }
+	
+	static int Main ()
+	{
+		// We only test that this compiles.
+		
+		return 0;
+	}
+  }
+