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:
parent
dbb14e218a
commit
cbfdacdd36
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue