2010-04-12 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 13 Apr 2010 04:38:43 +0000 (04:38 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 13 Apr 2010 04:38:43 +0000 (04:38 -0000)
* TimeSpanTest.cs: Remove "NotWorking" from our custom formats parse
methods, as well as augmenting the test with some new assertions, and
changing a pair to properly reflect what they are testing.

svn path=/trunk/mcs/; revision=155282

mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/TimeSpanTest.cs

index de3b87a86a7895ce55ff268b336de983a6b9b8cd..01ce961d8b941e1fc5f40004144e50d19e53a435 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-12  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TimeSpanTest.cs: Remove "NotWorking" from our custom formats parse
+       methods, as well as augmenting the test with some new assertions, and
+       changing a pair to properly reflect what they are testing.
+
 2010-04-06  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * TimeSpanTest.cs: Augment our ParseExactCustomFormats test - still
index 90459d5eb9174502be2e1223525f3b1d54fe188c..95c837443513655825a5066bc6ba74834c05c63f 100644 (file)
@@ -1127,7 +1127,6 @@ public class TimeSpanTest {
        }
 
        [Test]
-       [Category ("NotWorking")]
        public void ParseExactCustomFormats ()
        {
                // Days
@@ -1149,7 +1148,7 @@ public class TimeSpanTest {
                // Hours
                ParseExactHelper ("12", new string [] { "%h" }, false, false, "12:00:00");
                ParseExactHelper ("00", new string [] { "%h" }, false, false, "00:00:00");
-               ParseExactHelper ("000", new string [] { "%h" }, true, false, "dontcare"); // Too many zeroes
+               ParseExactHelper ("012", new string [] { "%h" }, true, false, "dontcare"); // more than 2 digits
                ParseExactHelper ("00012", new string [] { "%hhhhh" }, true, false, "dontcare");
                ParseExactHelper ("15", new string [] { "%h" }, false, false, "15:00:00");
                ParseExactHelper ("24", new string [] { "%h" }, true, false, "dontcare");
@@ -1203,8 +1202,7 @@ public class TimeSpanTest {
 
                // Fractions of second - F
                ParseExactHelper ("3", new string [] { "%F" }, false, false, "00:00:00.3000000");
-               ParseExactHelper ("333", new string [] { "%FFFF" }, false, false, "00:00:00.3330000");
-               ParseExactHelper ("", new string [] { "%F" }, true, false, "00:00:00"); // Optional only with other elements
+               ParseExactHelper ("333", new string [] { "%FFFFF" }, false, false, "00:00:00.3330000");
                ParseExactHelper ("1234567", new string [] { "%FFFFFFF" }, false, false, "00:00:00.1234567");
 
                // Multiple symbols
@@ -1219,6 +1217,8 @@ public class TimeSpanTest {
                ParseExactHelper ("9:10:11:6", new string [] { @"h\:m\:s\:f" }, false, false, "09:10:11.6000000");
                ParseExactHelper ("9:10:11:666", new string [] { @"h\:m\:s\:f" }, true, false, "dontcare"); // fff with 1 digit
                ParseExactHelper ("9:10:11:", new string [] { @"h\:m\:s\:F" }, false, false, "09:10:11"); // optional frac of seconds
+               ParseExactHelper ("9:10:11:", new string [] { @"h\:m\:s\:FF" }, false, false, "09:10:11");
+               ParseExactHelper ("9:10:11::", new string [] { @"h\:m\:s\:F\:" }, false, false, "09:10:11");
                ParseExactHelper ("8:9:10:11:6666666", new string [] { @"d\:h\:m\:s\:fffffff" }, false, false, "8.09:10:11.6666666");
                ParseExactHelper ("8:9:10:11:6666666", new string [] { @"d\:h\:m\:s\:fffffff" }, false, false, "-8.09:10:11.6666666", 
                                null, TimeSpanStyles.AssumeNegative);