* time.c (obj2nsec): fix string argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-05-04 07:05:26 +00:00
parent f587eab23c
commit 04752225a7
3 changed files with 11 additions and 1 deletions

View file

@ -64,6 +64,12 @@ class TestTime < Test::Unit::TestCase
end
end
def test_strtime
t = nil
assert_nothing_raised { t = Time.utc("2000", "1", "2" , "3", "4", "5") }
assert_equal(Time.utc(2000,1,2,3,4,5), t)
end
def test_huge_difference
if negative_time_t?
assert_equal(Time.at(-0x80000000), Time.at(0x7fffffff) - 0xffffffff, "[ruby-dev:22619]")