From 045ff9d50cb9fccb5625da4c21912ce8bd3847f3 Mon Sep 17 00:00:00 2001 From: Ravi Pratap M Date: Tue, 5 Mar 2002 22:42:24 +0000 Subject: [PATCH] 2002-03-05 Ravi Pratap * test-81.cs : Add. * makefile : Update accordingly as this test passes. svn path=/trunk/mcs/; revision=2932 --- mcs/tests/ChangeLog | 6 ++++++ mcs/tests/makefile | 3 ++- mcs/tests/test-81.cs | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 mcs/tests/test-81.cs diff --git a/mcs/tests/ChangeLog b/mcs/tests/ChangeLog index 304a062f384..517db04c843 100755 --- a/mcs/tests/ChangeLog +++ b/mcs/tests/ChangeLog @@ -1,3 +1,9 @@ +2002-03-05 Ravi Pratap + + * test-81.cs : Add. + + * makefile : Update accordingly as this test passes. + 2002-02-20 Miguel de Icaza * unsafe-1.cs: Extend test. diff --git a/mcs/tests/makefile b/mcs/tests/makefile index 7f17431221d..b991b9e1350 100755 --- a/mcs/tests/makefile +++ b/mcs/tests/makefile @@ -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 index 00000000000..005708bfc86 --- /dev/null +++ b/mcs/tests/test-81.cs @@ -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; + } + } +} -- 2.25.1