[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / test-partial-11.cs
blob2665bd2a2a707ead2015af652b921a539ea9723e
1 using System;
2 using System.Reflection;
4 static partial class StaticClass
6 public static string Name ()
8 return "OK";
12 partial class StaticClass2 {}
13 static partial class StaticClass2 {}
16 public class MainClass
18 static bool IsStatic (Type t)
20 Type type = typeof (StaticClass);
21 if (!type.IsAbstract || !type.IsSealed) {
22 Console.WriteLine ("Is not abstract sealed");
23 return false;
26 if (type.GetConstructors ().Length > 0) {
27 Console.WriteLine ("Has constructor");
28 return false;
30 return true;
33 public static int Main ()
35 if (!IsStatic (typeof (StaticClass)))
36 return 1;
38 if (!IsStatic (typeof (StaticClass2)))
39 return 2;
41 Console.WriteLine ("OK");
42 return 0;