diff options
Diffstat (limited to 'mcs/tests')
-rwxr-xr-x | mcs/tests/ChangeLog | 20 | ||||
-rw-r--r-- | mcs/tests/Makefile | 6 | ||||
-rw-r--r-- | mcs/tests/test-280.cs | 23 | ||||
-rw-r--r-- | mcs/tests/test-283.cs | 33 | ||||
-rw-r--r-- | mcs/tests/test-284.cs | 7 | ||||
-rw-r--r-- | mcs/tests/test-290.cs | 14 | ||||
-rw-r--r-- | mcs/tests/test-292.cs | 11 |
7 files changed, 112 insertions, 2 deletions
diff --git a/mcs/tests/ChangeLog b/mcs/tests/ChangeLog index 0d97986bf11..196e11c13db 100755 --- a/mcs/tests/ChangeLog +++ b/mcs/tests/ChangeLog @@ -1,3 +1,23 @@ +2004-09-15 Raja R Harinath <rharinath@novell.com> + + * test-280.cs: Backport fix from HEAD. + * test-292.cs: New test for #64330. + +2004-09-10 Raja R Harinath <rharinath@novell.com> + + * test-290.cs: New test. + * Makefile (TEST_SOURCES): Add test-290.cs. + +2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net> + + * unsafe-10.cs: new test + +2004-08-03 Ben Maurer <bmaurer@ximian.com> + + * test-283.cs: for 62275. + + * unsafe-9.cs: new test for #62263. + 2004-06-24 Raja R Harinath <rharinath@novell.com> * test-252.cs: Avoid reference to System.dll. diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile index 2ccfb9d1614..79fe1a6aed4 100644 --- a/mcs/tests/Makefile +++ b/mcs/tests/Makefile @@ -43,7 +43,9 @@ TEST_SOURCES = \ test-241 test-242 test-243 test-244 test-245 test-246 test-247 test-248 test-249 test-250 \ test-251 test-252 test-253 test-254 test-255 test-256 test-257 test-258 test-259 test-260 \ test-261 test-262 test-263 test-264 test-265 test-266 test-267 test-268 test-269 test-270 \ - test-271 test-272 test-273 test-274 test-275 test-276 test-277 \ + test-271 test-272 test-273 test-274 test-275 test-276 test-277 test-280 \ + test-283 test-284 test-290 \ + test-292 \ cls-test-0 cls-test-1 cls-test-2 cls-test-3 cls-test-5 cls-test-6 cls-test-7 cls-test-10 \ cls-test-11 cls-test-14 cls-test-15 cls-test-16 @@ -54,7 +56,7 @@ TEST2_SOURCES = \ 2test-1 2test-2 2test-3 2test-4 2test-5 2test-6 UNSAFE_SOURCES = \ - unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8 + unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8 unsafe-9 unsafe-10 WINDOWS_SOURCES = \ test-50 test-67 diff --git a/mcs/tests/test-280.cs b/mcs/tests/test-280.cs new file mode 100644 index 00000000000..aff2fbb5994 --- /dev/null +++ b/mcs/tests/test-280.cs @@ -0,0 +1,23 @@ +// +// Thisis just a compilation test for bug 61593 +using System; +namespace AppFramework.Util +{ + public class Logic + { + static public bool EnumInSet(Enum anEnum, Enum[] checkSet) + { + foreach(Enum aVal in checkSet) + { + if (aVal == anEnum) + { + return true; + } + } + return false; + } + + static void Main () {} + } +} + diff --git a/mcs/tests/test-283.cs b/mcs/tests/test-283.cs new file mode 100644 index 00000000000..f4b0bc8d06f --- /dev/null +++ b/mcs/tests/test-283.cs @@ -0,0 +1,33 @@ +class X { + public virtual int Foo () { + return 1; + } +} + +class Y : X { + + delegate int D(); + + + D GetIt () { + return new D (base.Foo); + } + + D GetIt2 () { + return base.Foo; + } + + public override int Foo () { + return 0; + } + + static int Main () + { + if (new Y ().GetIt () () == 1 && new Y ().GetIt2 () () == 1) { + System.Console.WriteLine ("good"); + return 0; + } + + return 1; + } +}
\ No newline at end of file diff --git a/mcs/tests/test-284.cs b/mcs/tests/test-284.cs new file mode 100644 index 00000000000..a4830a5c8c2 --- /dev/null +++ b/mcs/tests/test-284.cs @@ -0,0 +1,7 @@ +public class App +{ + public static void Main() + { + object a = uint.MaxValue - ushort.MaxValue; + } +} diff --git a/mcs/tests/test-290.cs b/mcs/tests/test-290.cs new file mode 100644 index 00000000000..905fc6a706f --- /dev/null +++ b/mcs/tests/test-290.cs @@ -0,0 +1,14 @@ +// Distilled from report in http://lists.ximian.com/archives/public/mono-devel-list/2004-September/007777.html + +using System; + +class EntryPoint { + delegate void EventHandler (object sender); + static event EventHandler FooEvent; + static void bar_f (object sender) {} + static void Main () { + if (FooEvent != null) + FooEvent (null); + object bar = new EventHandler (bar_f); + } +} diff --git a/mcs/tests/test-292.cs b/mcs/tests/test-292.cs new file mode 100644 index 00000000000..c67fec01e29 --- /dev/null +++ b/mcs/tests/test-292.cs @@ -0,0 +1,11 @@ +// Compiler options: -unsafe +// Test for bug #64330: A 'fixed' statement should introduce a scope + +unsafe class X { + static int x = 0; + static void Main () { + fixed (void* p = &x) {} + fixed (void* p = &x) {} + } +} + |