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

add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-12-25 12:38:16 +00:00
parent dbb14e218a
commit cbfdacdd36

View file

@ -365,6 +365,10 @@ class TestTime < Test::Unit::TestCase
assert_raise(TypeError) { t0 + nil }
assert_raise(TypeError) { t0 + "1" }
assert_raise(TypeError) { t0 + SimpleDelegator.new("1") }
assert_equal(0.5, (t0 + 1.5).subsec)
assert_equal(Rational(1,3), (t0 + Rational(4,3)).subsec)
assert_equal(0.5, (t0 + SimpleDelegator.new(1.5)).subsec)
assert_equal(Rational(1,3), (t0 + SimpleDelegator.new(Rational(4,3))).subsec)
end
def test_readers