Don't try to calculate a time over the conservative failure boundary.
[p5sagit/p5-mst-13.2.git] / lib / Time / gmtime.t
index 9c77f81..b784096 100644 (file)
@@ -9,10 +9,10 @@ BEGIN {
 
 my(@times, @methods);
 BEGIN {
-    @times   = (-2**62, -2**50, -2**33, -2**31-1, -1, 0, 1, 2**31-1, 2**33, 2**50, 2**62, time);
+    @times   = (-2**55, -2**50, -2**33, -2**31-1, -1, 0, 1, 2**31-1, 2**33, 2**50, 2**55, time);
     @methods = qw(sec min hour mday mon year wday yday isdst);
 
-    plan tests => (@times * @methods) + 1;
+    plan tests => (@times * (@methods + 1)) + 1;
 
     use_ok Time::gmtime;
 }
@@ -21,6 +21,7 @@ for my $time (@times) {
     my $gmtime = gmtime $time;          # This is the OO gmtime.
     my @gmtime = CORE::gmtime $time;    # This is the gmtime function
 
+    is @gmtime, 9, "gmtime($time)";
     for my $method (@methods) {
         is $gmtime->$method, shift @gmtime, "gmtime($time)->$method";
     }