diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-25 12:38:16 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-25 12:38:16 +0000 |
commit | b143a1fb697ae595f369559cf6c5cdc61ba45f9e (patch) | |
tree | e7f7016860baaf5b2f792d3159f86ccbbd7f082f | |
parent | 4bcbf77c8d34bd59c0d6f59f52ca31418d22dec4 (diff) | |
download | ruby-b143a1fb697ae595f369559cf6c5cdc61ba45f9e.tar.gz ruby-b143a1fb697ae595f369559cf6c5cdc61ba45f9e.tar.xz ruby-b143a1fb697ae595f369559cf6c5cdc61ba45f9e.zip |
add tests.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_time.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 42153c9a1..cf2d51c92 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -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 |