зеркало из https://github.com/github/ruby.git
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:
Родитель
85000ef0be
Коммит
a66ee49d2c
|
@ -24,7 +24,7 @@ class TestTime < Test::Unit::TestCase
|
|||
-Time.utc(2000, 3, 21, 3, 30), -3*3600)
|
||||
end
|
||||
|
||||
def test_negative
|
||||
def test_timegm_negative
|
||||
begin
|
||||
Time.at(-1)
|
||||
rescue ArgumentError
|
||||
|
@ -32,5 +32,6 @@ class TestTime < Test::Unit::TestCase
|
|||
end
|
||||
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(-0x80000000, Time.utc(1901, 12, 13, 20, 45, 52).tv_sec)
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче