Updated.
[mono.git] / mcs / class / corlib / Test / TheTests.cs
1 using NUnit.Framework;
2 using System;
3 using System.Threading;
4 using System.Globalization;
5
6 namespace MonoTests.System
7 {
8         public class RunBooleanTest : BooleanTest
9         {
10                 protected override void RunTest ()
11                 {
12                         TestStrings ();
13                         TestCompareTo ();
14                         TestEquals ();
15                         TestGetHashCode ();
16                         TestGetType ();
17                         TestGetTypeCode ();
18                         TestParse ();
19                         TestToString ();
20                 }
21         }
22 }
23
24 namespace MonoTests.System
25 {
26         public class RunStringTest : StringTest
27         {
28                 protected override void RunTest ()
29                 {
30                         TestLength ();
31                         TestCompare ();
32                         TestCompareOrdinal ();
33                         TestCompareTo ();
34                         TestConcat ();
35                         TestCopy ();
36                         TestCopyTo ();
37                         TestEndsWith ();
38                         TestEquals ();
39                         TestFormat ();
40                         TestGetEnumerator ();
41                         TestGetHashCode ();
42                         TestGetType ();
43                         TestGetTypeCode ();
44                         TestIndexOf ();
45                         TestIndexOfAny ();
46                         TestInsert ();
47                         TestIntern ();
48                         TestIsInterned ();
49                         TestJoin ();
50                         TestLastIndexOf ();
51                         TestLastIndexOfAny ();
52                         TestPadLeft ();
53                         TestPadRight ();
54                         TestRemove ();
55                         TestReplace ();
56                         TestSplit ();
57                         TestStartsWith ();
58                         TestSubstring ();
59                         TestToCharArray ();
60                         TestToLower ();
61                         TestToString ();
62                         TestToUpper ();
63                         TestTrim ();
64                         TestTrimEnd ();
65                         TestTrimStart ();
66                 }
67         }
68 }
69
70 namespace MonoTests.System
71 {
72         public class RunTimeSpanTest : TimeSpanTest
73         {
74                 protected override void RunTest ()
75                 {
76                         TestCtors ();
77                         TestProperties ();
78                         TestAdd ();
79                         TestCompare ();
80                         TestNegateAndDuration ();
81                         TestEquals ();
82                         TestFromXXXX ();
83                         TestGetHashCode ();
84                         TestParse ();
85                         TestSubstract ();
86                         TestToString ();
87                 }
88         }
89 }
90
91 namespace MonoTests.System
92 {
93         public class RunDoubleTest : DoubleTest
94         {
95                 protected override void RunTest ()
96                 {
97                         TestPublicFields ();
98                         TestCompareTo ();
99                         TestEquals ();
100                         TestGetHasCode ();
101                         TestTypeCode ();
102                         TestIsInfinity ();
103                         TestIsNan ();
104                         TestIsNegativeInfinity ();
105                         TestIsPositiveInfinity ();
106                         TestParse ();
107                         TestToString ();
108                 }
109         }
110 }
111
112 namespace MonoTests.System
113 {
114         public class RunTimeZoneTest : TimeZoneTest
115         {
116                 protected override void RunTest ()
117                 {
118                         TestCtors ();
119                 }
120         }
121 }
122
123 namespace MonoTests.System
124 {
125         public class RunDateTimeTest : DateTimeTest
126         {
127                 protected override void RunTest ()
128                 {
129                         TestCtors ();
130                         TestToString ();
131                         TestParseExact ();
132                         TestParse ();
133                 }
134         }
135 }
136
137 namespace MonoTests
138 {
139         public class RunAllTests
140         {
141                 public static void AddAllTests (TestSuite suite)
142                 {
143                         suite.AddTest (new MonoTests.System.RunBooleanTest ());
144                         suite.AddTest (new MonoTests.System.RunStringTest ());
145                         suite.AddTest (new MonoTests.System.RunTimeSpanTest ());
146                         suite.AddTest (new MonoTests.System.RunDoubleTest ());
147                         suite.AddTest (new MonoTests.System.RunTimeZoneTest ());
148                         suite.AddTest (new MonoTests.System.RunDateTimeTest ());
149                 }
150         }
151 }
152
153 class MainApp
154 {
155         public static void Main()
156         {
157                 Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-US");
158
159                 TestResult result = new TestResult ();
160                 TestSuite suite = new TestSuite ();
161                 MonoTests.RunAllTests.AddAllTests (suite);
162                 suite.Run (result);
163                 MonoTests.MyTestRunner.Print (result);
164         }
165 }
166