Completed cases in CharEnumeratorTest.cs
[mono.git] / mcs / class / corlib / Test / TheTests.cs
index e55b286bf9a62a33e1d1c7520a30c4105d2a2a9d..4768577bd15b5daac490347f524d412a38e7f70e 100755 (executable)
@@ -5,138 +5,339 @@ using System.Globalization;
 
 namespace MonoTests.System
 {
-       public class RunBitConverterTest : BitConverterTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestIsLittleEndian (); } catch { }\r
-                       try { TestDouble (); } catch { }\r
-                       try { TestChar (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
+       public class RunArrayTest : ArrayTest
+       {
+               protected override void RunTest ()
+               {
+                       TestIsFixedSize ();
+                       TestIsReadOnly ();
+                       TestIsSynchronized ();
+                       TestLength ();
+                       TestRank ();
+                       TestBinarySearch1 ();
+                       TestBinarySearch2 ();
+                       TestClear ();
+                       TestClone ();
+                       TestCopy ();
+                       TestCopy2 ();
+                       TestCopyTo ();
+                       TestCreateInstance ();
+                       TestGetEnumerator ();
+                       TestGetLength ();
+                       TestGetLowerBound ();
+                       TestGetUpperBound ();
+                       TestGetValue1 ();
+                       TestGetValue2 ();
+                       TestGetValue3 ();
+                       TestGetValueN ();
+                       TestIndexOf1 ();
+                       TestIndexOf2 ();
+                       TestIndexOf3 ();
+                       TestLastIndexOf1 ();
+                       TestLastIndexOf2 ();
+                       TestLastIndexOf3 ();
+                       TestReverse ();
+                       TestSetValue1 ();
+                       TestSetValue2 ();
+                       TestSetValue3 ();
+                       TestSetValueN ();
+                       TestSort ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunBitConverterTest : BitConverterTest
+       {
+               protected override void RunTest ()
+               {
+                       TestIsLittleEndian ();
+                       TestSingle ();
+                       TestDouble ();
+                       TestBool ();
+                       TestChar ();
+                       TestInt16 ();
+                       TestUInt16 ();
+                       TestInt32 ();
+                       TestUInt32 ();
+                       TestInt64 ();
+                       TestUInt64 ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
        public class RunBooleanTest : BooleanTest
        {
                protected override void RunTest ()
                {
-                       try { TestStrings (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestGetType (); } catch { }\r
-                       try { TestGetTypeCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunByteTest : ByteTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestMinMax (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunConsoleTest : ConsoleTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestError (); } catch { }\r
-                       try { TestIn (); } catch { }\r
-                       try { TestOut (); } catch { }\r
-                       try { TestOpenStandardError (); } catch { }\r
-                       try { TestOpenStandardInput (); } catch { }\r
-                       try { TestOpenStandardOutput (); } catch { }\r
-                       try { TestRead (); } catch { }\r
-                       try { TestReadLine (); } catch { }\r
-                       try { TestSetError (); } catch { }\r
-                       try { TestSetIn (); } catch { }\r
-                       try { TestSetOut (); } catch { }\r
-                       try { TestWrite (); } catch { }\r
-                       try { TestWriteLine (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunGuidTest : GuidTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestCtor1 (); } catch { }\r
-                       try { TestCtor2 (); } catch { }\r
-                       try { TestCtor4 (); } catch { }\r
-                       try { TestCtor5 (); } catch { }\r
-                       try { TestEmpty (); } catch { }\r
-                       try { TestNewGuid (); } catch { }\r
-                       try { TestEqualityOp (); } catch { }\r
-                       try { TestInequalityOp (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestToByteArray (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunInt32Test : Int32Test\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestMinMax (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-                       try { TestCustomToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunObjectTest : ObjectTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestCtor (); } catch { }\r
-                       try { TestEquals1 (); } catch { }\r
-                       try { TestEquals2 (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestGetType (); } catch { }\r
-                       try { TestReferenceEquals (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunResolveEventArgsTest : ResolveEventArgsTest\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestTheWholeThing (); } catch { }\r
+                       TestStrings ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestGetType ();
+                       TestGetTypeCode ();
+                       TestParse ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunByteTest : ByteTest
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunCharTest : CharTest
+       {
+               protected override void RunTest ()
+               {
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashValue ();
+                       TestGetNumericValue ();
+                       TestGetUnicodeCategory ();
+                       TestIsControl ();
+                       TestIsDigit ();
+                       TestIsLetter ();
+                       TestIsLetterOrDigit ();
+                       TestIsLower ();
+                       TestIsNumber ();
+                       TestIsPunctuation ();
+                       TestIsSeparator ();
+                       TestIsSurrogate ();
+                       TestIsSymbol ();
+                       TestIsUpper ();
+                       TestIsWhiteSpace ();
+                       TestParse ();
+                       TestToLower ();
+                       TestToUpper ();
+                       TestToString ();
+                       TestGetTypeCode ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunConsoleTest : ConsoleTest
+       {
+               protected override void RunTest ()
+               {
+                       TestError ();
+                       TestIn ();
+                       TestOut ();
+                       TestOpenStandardError ();
+                       TestOpenStandardInput ();
+                       TestOpenStandardOutput ();
+                       TestRead ();
+                       TestReadLine ();
+                       TestSetError ();
+                       TestSetIn ();
+                       TestSetOut ();
+                       TestWrite ();
+                       TestWriteLine ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunEnumTest : EnumTest
+       {
+               protected override void RunTest ()
+               {
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestFormat ();
+                       TestGetHashCode ();
+                       TestGetNames ();
+                       TestGetTypeCode ();
+                       TestGetUnderlyingType ();
+                       TestGetValues ();
+                       TestIsDefined ();
+                       TestParse1 ();
+                       TestParse2 ();
+                       TestToObject ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunDecimalTest : DecimalTest
+       {
+               protected override void RunTest ()
+               {
+                       TestToString ();
+                       TestCurrencyPattern ();
+                       TestNumberNegativePattern ();
+                       TestPercentPattern ();
+                       TestParse ();
+                       TestConstants ();
+                       TestConstructInt32 ();
+                       TestConstructUInt32 ();
+                       TestConstructInt64 ();
+                       TestConstructUInt64 ();
+                       TestConstructSingle ();
+                       TestConstructSingleRounding ();
+                       TestConstructDouble ();
+                       TestConstructDoubleRound ();
+                       TestNegate ();
+                       TestPartConstruct ();
+                       TestFloorTruncate ();
+                       TestRound ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunDecimalTest2 : DecimalTest2
+       {
+               protected override void RunTest ()
+               {
+                       TestCompare ();
+                       TestRemainder ();
+                       TestAdd ();
+                       TestMult ();
+                       TestDiv ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunGuidTest : GuidTest
+       {
+               protected override void RunTest ()
+               {
+                       TestCtor1 ();
+                       TestCtor2 ();
+                       TestCtor4 ();
+                       TestCtor5 ();
+                       TestEmpty ();
+                       TestNewGuid ();
+                       TestEqualityOp ();
+                       TestInequalityOp ();
+                       TestEquals ();
+                       TestCompareTo ();
+                       TestGetHashCode ();
+                       TestToByteArray ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunInt16Test : Int16Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunInt32Test : Int32Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestToString ();
+                       TestCustomToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunInt64Test : Int64Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestRoundTripGeneral ();
+                       TestRoundTripHex ();
+                       TestParseNull ();
+                       TestParse ();
+                       TestToString ();
+                       TestUserCurrency ();
+                       TestUserPercent ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunObjectTest : ObjectTest
+       {
+               protected override void RunTest ()
+               {
+                       TestCtor ();
+                       TestEquals1 ();
+                       TestEquals2 ();
+                       TestGetHashCode ();
+                       TestGetType ();
+                       TestReferenceEquals ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunResolveEventArgsTest : ResolveEventArgsTest
+       {
+               protected override void RunTest ()
+               {
+                       TestTheWholeThing ();
+
                }
        }
 }
@@ -147,42 +348,43 @@ namespace MonoTests.System
        {
                protected override void RunTest ()
                {
-                       try { TestLength (); } catch { }\r
-                       try { TestCompare (); } catch { }\r
-                       try { TestCompareOrdinal (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestConcat (); } catch { }\r
-                       try { TestCopy (); } catch { }\r
-                       try { TestCopyTo (); } catch { }\r
-                       try { TestEndsWith (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestFormat (); } catch { }\r
-                       try { TestGetEnumerator (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestGetType (); } catch { }\r
-                       try { TestGetTypeCode (); } catch { }\r
-                       try { TestIndexOf (); } catch { }\r
-                       try { TestIndexOfAny (); } catch { }\r
-                       try { TestInsert (); } catch { }\r
-                       try { TestIntern (); } catch { }\r
-                       try { TestIsInterned (); } catch { }\r
-                       try { TestJoin (); } catch { }\r
-                       try { TestLastIndexOf (); } catch { }\r
-                       try { TestLastIndexOfAny (); } catch { }\r
-                       try { TestPadLeft (); } catch { }\r
-                       try { TestPadRight (); } catch { }\r
-                       try { TestRemove (); } catch { }\r
-                       try { TestReplace (); } catch { }\r
-                       try { TestSplit (); } catch { }\r
-                       try { TestStartsWith (); } catch { }\r
-                       try { TestSubstring (); } catch { }\r
-                       try { TestToCharArray (); } catch { }\r
-                       try { TestToLower (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-                       try { TestToUpper (); } catch { }\r
-                       try { TestTrim (); } catch { }\r
-                       try { TestTrimEnd (); } catch { }\r
-                       try { TestTrimStart (); } catch { }\r
+                       TestLength ();
+                       TestCompare ();
+                       TestCompareOrdinal ();
+                       TestCompareTo ();
+                       TestConcat ();
+                       TestCopy ();
+                       TestCopyTo ();
+                       TestEndsWith ();
+                       TestEquals ();
+                       TestFormat ();
+                       TestGetEnumerator ();
+                       TestGetHashCode ();
+                       TestGetType ();
+                       TestGetTypeCode ();
+                       TestIndexOf ();
+                       TestIndexOfAny ();
+                       TestInsert ();
+                       TestIntern ();
+                       TestIsInterned ();
+                       TestJoin ();
+                       TestLastIndexOf ();
+                       TestLastIndexOfAny ();
+                       TestPadLeft ();
+                       TestPadRight ();
+                       TestRemove ();
+                       TestReplace ();
+                       TestSplit ();
+                       TestStartsWith ();
+                       TestSubstring ();
+                       TestToCharArray ();
+                       TestToLower ();
+                       TestToString ();
+                       TestToUpper ();
+                       TestTrim ();
+                       TestTrimEnd ();
+                       TestTrimStart ();
+
                }
        }
 }
@@ -193,49 +395,69 @@ namespace MonoTests.System
        {
                protected override void RunTest ()
                {
-                       try { TestCtors (); } catch { }\r
-                       try { TestProperties (); } catch { }\r
-                       try { TestAdd (); } catch { }\r
-                       try { TestCompare (); } catch { }\r
-                       try { TestNegateAndDuration (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestFromXXXX (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestSubstract (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunUInt16Test : UInt16Test\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestMinMax (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-               }\r
-       }\r
-}\r
-\r
-namespace MonoTests.System\r
-{\r
-       public class RunUInt64Test : UInt64Test\r
-       {\r
-               protected override void RunTest ()\r
-               {\r
-                       try { TestMinMax (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestGetHashCode (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
+                       TestCtors ();
+                       TestProperties ();
+                       TestAdd ();
+                       TestCompare ();
+                       TestNegateAndDuration ();
+                       TestEquals ();
+                       TestFromXXXX ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestSubstract ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunUInt16Test : UInt16Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunUInt32Test : UInt32Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestToString ();
+
+               }
+       }
+}
+
+namespace MonoTests.System
+{
+       public class RunUInt64Test : UInt64Test
+       {
+               protected override void RunTest ()
+               {
+                       TestMinMax ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestGetHashCode ();
+                       TestParse ();
+                       TestToString ();
+
                }
        }
 }
@@ -246,16 +468,17 @@ namespace MonoTests.System
        {
                protected override void RunTest ()
                {
-                       try { TestPublicFields (); } catch { }\r
-                       try { TestCompareTo (); } catch { }\r
-                       try { TestEquals (); } catch { }\r
-                       try { TestTypeCode (); } catch { }\r
-                       try { TestIsInfinity (); } catch { }\r
-                       try { TestIsNan (); } catch { }\r
-                       try { TestIsNegativeInfinity (); } catch { }\r
-                       try { TestIsPositiveInfinity (); } catch { }\r
-                       try { TestParse (); } catch { }\r
-                       try { TestToString (); } catch { }\r
+                       TestPublicFields ();
+                       TestCompareTo ();
+                       TestEquals ();
+                       TestTypeCode ();
+                       TestIsInfinity ();
+                       TestIsNan ();
+                       TestIsNegativeInfinity ();
+                       TestIsPositiveInfinity ();
+                       TestParse ();
+                       TestToString ();
+
                }
        }
 }
@@ -266,7 +489,8 @@ namespace MonoTests.System
        {
                protected override void RunTest ()
                {
-                       try { TestCtors (); } catch { }\r
+                       TestCtors ();
+
                }
        }
 }
@@ -277,10 +501,11 @@ namespace MonoTests.System
        {
                protected override void RunTest ()
                {
-                       try { TestCtors (); } catch { }\r
-                       try { TestToString (); } catch { }\r
-                       try { TestParseExact (); } catch { }\r
-                       try { TestParse (); } catch { }\r
+                       TestCtors ();
+                       TestToString ();
+                       TestParseExact ();
+                       TestParse ();
+
                }
        }
 }
@@ -291,18 +516,26 @@ namespace MonoTests
        {
                public static void AddAllTests (TestSuite suite)
                {
-                       suite.AddTest (new MonoTests.System.RunBitConverterTest ());\r
+                       suite.AddTest (new MonoTests.System.RunArrayTest ());
+                       suite.AddTest (new MonoTests.System.RunBitConverterTest ());
                        suite.AddTest (new MonoTests.System.RunBooleanTest ());
-                       suite.AddTest (new MonoTests.System.RunByteTest ());\r
-                       suite.AddTest (new MonoTests.System.RunConsoleTest ());\r
-                       suite.AddTest (new MonoTests.System.RunGuidTest ());\r
-                       suite.AddTest (new MonoTests.System.RunInt32Test ());\r
-                       suite.AddTest (new MonoTests.System.RunObjectTest ());\r
-                       suite.AddTest (new MonoTests.System.RunResolveEventArgsTest ());\r
+                       suite.AddTest (new MonoTests.System.RunByteTest ());
+                       suite.AddTest (new MonoTests.System.RunCharTest ());
+                       suite.AddTest (new MonoTests.System.RunConsoleTest ());
+                       suite.AddTest (new MonoTests.System.RunEnumTest ());
+                       suite.AddTest (new MonoTests.System.RunDecimalTest ());
+                       suite.AddTest (new MonoTests.System.RunDecimalTest2 ());
+                       suite.AddTest (new MonoTests.System.RunGuidTest ());
+                       suite.AddTest (new MonoTests.System.RunInt16Test ());
+                       suite.AddTest (new MonoTests.System.RunInt32Test ());
+                       suite.AddTest (new MonoTests.System.RunInt64Test ());
+                       suite.AddTest (new MonoTests.System.RunObjectTest ());
+                       suite.AddTest (new MonoTests.System.RunResolveEventArgsTest ());
                        suite.AddTest (new MonoTests.System.RunStringTest ());
                        suite.AddTest (new MonoTests.System.RunTimeSpanTest ());
-                       suite.AddTest (new MonoTests.System.RunUInt16Test ());\r
-                       suite.AddTest (new MonoTests.System.RunUInt64Test ());\r
+                       suite.AddTest (new MonoTests.System.RunUInt16Test ());
+                       suite.AddTest (new MonoTests.System.RunUInt32Test ());
+                       suite.AddTest (new MonoTests.System.RunUInt64Test ());
                        suite.AddTest (new MonoTests.System.RunDoubleTest ());
                        suite.AddTest (new MonoTests.System.RunTimeZoneTest ());
                        suite.AddTest (new MonoTests.System.RunDateTimeTest ());