Author: gert
Date: 2007-09-22 07:01:28 -0400 (Sat, 22 Sep 2007)
New Revision: 86203
Modified:
trunk/gert/standalone/bug74936/test.cs
Log:
Fixed test.
Modified: trunk/gert/standalone/bug74936/test.cs
===================================================================
--- trunk/gert/standalone/bug74936/test.cs 2007-09-22 10:55:12 UTC (rev
86202)
+++ trunk/gert/standalone/bug74936/test.cs 2007-09-22 11:01:28 UTC (rev
86203)
@@ -1,24 +1,32 @@
using System;
-public class EntryPoint {
- public static int Main() {
- string msg = "Should've resulted in FormatException";
-
+class Program
+{
+ static int Main()
+ {
try {
DateTime.Parse("1");
- Console.WriteLine("#1: " + msg);
+ Console.WriteLine("#1");
return 1;
} catch (FormatException) {
}
- try {
- DateTime.Parse("8.5");
- Console.WriteLine("#2: " + msg);
- return 1;
- } catch (FormatException) {
- }
-
+ DateTime now = DateTime.Now;
+ DateTime datetime = DateTime.Parse("8.5");
+ if (datetime.Day != 8)
+ return 2;
+ if (datetime.Hour != 0)
+ return 3;
+ if (datetime.Millisecond != 0)
+ return 4;
+ if (datetime.Minute != 0)
+ return 5;
+ if (datetime.Month != 5)
+ return 6;
+ if (datetime.Second != 0)
+ return 7;
+ if (datetime.Year != now.Year)
+ return 8;
return 0;
}
}
-
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches