Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2004-09-01 22:46:13 +0400
committerMarek Safar <marek.safar@gmail.com>2004-09-01 22:46:13 +0400
commitad1b8f61ce1802cb2d80afe156c49296ccb0d490 (patch)
treee88bfa7e4b8aedbb619c3b15560093bdd3d65bf0 /mcs/tests/test-287.cs
parentfb98c026008f10137b0852fba81d524f8a477a65 (diff)
2004-09-01 Marek Safar <marek.safar@seznam.cz>
* Makefile: Enabled test-286 * test-287.cs: New test for static classes. svn path=/trunk/mcs/; revision=33173
Diffstat (limited to 'mcs/tests/test-287.cs')
-rw-r--r--mcs/tests/test-287.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/mcs/tests/test-287.cs b/mcs/tests/test-287.cs
new file mode 100644
index 00000000000..aad225f17f8
--- /dev/null
+++ b/mcs/tests/test-287.cs
@@ -0,0 +1,27 @@
+// TODO: add test of no constructor presence in the class when mono will support it
+
+using System;
+using System.Reflection;
+
+static class StaticClass
+{
+ public static string Name ()
+ {
+ return "OK";
+ }
+}
+
+public class MainClass
+{
+ public static int Main ()
+ {
+ Type type = typeof (StaticClass);
+ if (!type.IsAbstract || !type.IsSealed) {
+ Console.WriteLine ("Is not abstract sealed");
+ return 1;
+ }
+
+ Console.WriteLine (StaticClass.Name ());
+ return 0;
+ }
+}