2002-03-05 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Tue, 5 Mar 2002 22:42:24 +0000 (22:42 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Tue, 5 Mar 2002 22:42:24 +0000 (22:42 -0000)
* test-81.cs : Add.

* makefile : Update accordingly as this test passes.

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

mcs/tests/ChangeLog
mcs/tests/makefile
mcs/tests/test-81.cs [new file with mode: 0644]

index 304a062f384acb8b0d2ef319e545acdff0e96c95..517db04c843211b79d32c7d0129b661943ca4be0 100755 (executable)
@@ -1,3 +1,9 @@
+2002-03-05  Ravi Pratap  <ravi@ximian.com>
+
+       * test-81.cs : Add. 
+
+       * makefile : Update accordingly as this test passes.
+
 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
 
        * unsafe-1.cs: Extend test.
index 7f17431221dedd439607b7946c9d9b46e28544ce..b991b9e13508a8c3f1b29700e5f1f1cfd9b7e036 100755 (executable)
@@ -11,7 +11,8 @@ TEST_SOURCES = \
        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-71 test-72 test-73 test-74 test-75         test-77 test-78 test-79 test-80
+       test-71 test-72 test-73 test-74 test-75         test-77 test-78 test-79 test-80 \
+       test-81
 
 UNSAFE_SOURCES = \
        unsafe-1 unsafe-2
diff --git a/mcs/tests/test-81.cs b/mcs/tests/test-81.cs
new file mode 100644 (file)
index 0000000..005708b
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Tests if we can invoke static members using the short
+// names
+//
+using System;
+
+namespace N1
+{      
+       public class A
+       {
+               int x;
+               string s;
+
+               void Bar ()
+               {
+                       x = int.Parse ("0");
+                       s = string.Format("{0}", x);
+               }
+
+               public static int Main ()
+               {
+                       A a = new A ();
+
+                       a.Bar ();
+                       
+                       if (a.x != 0)
+                               return 1;
+
+                       if (a.s != "0")
+                               return 1;
+
+                       Console.WriteLine ("Bar set s to " + a.s);
+
+                       return 0;
+               }
+       }               
+}