From a66ee49d2cb9a6503ff900fcfe8409396b2ca1e1 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 30 Mar 2004 11:53:00 +0000 Subject: [PATCH] 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 --- test/ruby/test_time.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 000fd2e1b8..71cae8a368 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -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