2002-09-17 Martin Baulig <martin@gnome.org>
authorMartin Baulig <martin@novell.com>
Mon, 16 Sep 2002 22:14:48 +0000 (22:14 -0000)
committerMartin Baulig <martin@novell.com>
Mon, 16 Sep 2002 22:14:48 +0000 (22:14 -0000)
* test-148.cs: Added testcase for base indexers.

svn path=/trunk/mcs/; revision=7527

mcs/tests/ChangeLog
mcs/tests/test-148.cs

index b929e050ccf2f26f9b32f7ce11d0e08f5098e5ce..53b962129f4dc02783260cce01e8eefc8a8b2612 100755 (executable)
@@ -1,3 +1,7 @@
+2002-09-17  Martin Baulig  <martin@gnome.org>
+
+       * test-148.cs: Added testcase for base indexers.
+
 2002-09-14  Martin Baulig  <martin@gnome.org>
 
        * test-166.cs: New test.
index 5c29fe1322a8542d3613975065f74d0409192017..8dca09c511f4ff1a1885b8174942cf787a59baea 100644 (file)
@@ -41,6 +41,20 @@ public class Z : Y
                }
        }
 
+       public int InstanceTest ()
+       {
+               double index = 5;
+
+               Console.WriteLine ("INSTANCE TEST");
+
+               if (this [index] != 4)
+                       return 6;
+               if (base [index] != 3)
+                       return 7;
+
+               return 0;
+       }
+
        public static int Test ()
        {
                Z z = new Z ();
@@ -68,7 +82,7 @@ public class Z : Y
                if (y [index] != 3)
                        return 5;
 
-               return 0;
+               return z.InstanceTest ();
        }
 
        public static int Main ()