Просмотр исходного кода

2001-09-21 Ravi Pratap <[email protected]>

	* test-7.cs : Add.

svn path=/trunk/mcs/; revision=911
Ravi Pratap M 24 лет назад
Родитель
Сommit
e3bd02a2e5
3 измененных файлов с 50 добавлено и 1 удалено
  1. 4 0
      mcs/tests/ChangeLog
  2. 1 1
      mcs/tests/makefile
  3. 45 0
      mcs/tests/test-7.cs

+ 4 - 0
mcs/tests/ChangeLog

@@ -1,3 +1,7 @@
+2001-09-21  Ravi Pratap  <[email protected]>
+
+	* test-7.cs : Add.
+
 2001-09-21  Miguel de Icaza  <[email protected]>
 
 	* makefile (test-compiler): Abort tests on failure.

+ 1 - 1
mcs/tests/makefile

@@ -1,5 +1,5 @@
 TEST_SOURCES = \
-	test-1 test-4 test-6
+	test-1 test-4 test-6 test-7
 
 TEST_NOPASS = \
 	test-2 test-3 test-5

+ 45 - 0
mcs/tests/test-7.cs

@@ -0,0 +1,45 @@
+using System;
+
+namespace Mine {
+
+	public class Blah {
+
+		public int i;
+
+		public static void Main ()
+		{
+			Console.WriteLine ("Blah ");
+			Blah k;
+
+			k = new Blah () + new Blah (); 
+			k = ~ new Blah ();
+			k = + new Blah ();
+
+			//int number = 5;
+	
+			//Console.WriteLine ("This is : " + number);
+			
+		}
+		
+		public static Blah operator + (Blah i, Blah j)
+		{
+			Console.WriteLine ("Wooo!");
+			return null; 
+		}
+
+		public static Blah operator + (Blah i)
+		{
+			Console.WriteLine ("This is the unary one !");
+			return null;
+		}
+		
+	
+		public static Blah operator ~ (Blah i)
+		{
+			Console.WriteLine ("This is even better !");
+			return null;
+		}
+
+	}
+
+}