1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add test for minimum 32bit signed time_t for Time.utc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2004-03-30 11:53:00 +00:00
parent 85000ef0be
commit a66ee49d2c

View file

@ -24,7 +24,7 @@ class TestTime < Test::Unit::TestCase
-Time.utc(2000, 3, 21, 3, 30), -3*3600) -Time.utc(2000, 3, 21, 3, 30), -3*3600)
end end
def test_negative def test_timegm_negative
begin begin
Time.at(-1) Time.at(-1)
rescue ArgumentError rescue ArgumentError
@ -32,5 +32,6 @@ class TestTime < Test::Unit::TestCase
end end
assert_equal(-1, Time.utc(1969, 12, 31, 23, 59, 59).tv_sec) assert_equal(-1, Time.utc(1969, 12, 31, 23, 59, 59).tv_sec)
assert_equal(-2, Time.utc(1969, 12, 31, 23, 59, 58).tv_sec) assert_equal(-2, Time.utc(1969, 12, 31, 23, 59, 58).tv_sec)
assert_equal(-0x80000000, Time.utc(1901, 12, 13, 20, 45, 52).tv_sec)
end end
end end