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

* test/ruby/test_rational.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-12-02 17:58:17 +00:00
parent 181ffea5e0
commit 7fd3ac4895
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Dec 3 02:56:34 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_rational.rb: add a test.
Wed Dec 3 02:53:24 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_range.rb: add a test.

View file

@ -129,6 +129,9 @@ class Rational_Test < Test::Unit::TestCase
assert_raise(ArgumentError){Rational(Object.new)}
assert_raise(ArgumentError){Rational()}
assert_raise(ArgumentError){Rational(1,2,3)}
assert_equal(Complex(Rational(1, 2), Rational(1, 2)), Rational(Complex(1, 1), Complex(2, 0)))
assert_instance_of(Numeric, Rational.class_eval { convert(Numeric.new) })
end
def test_attr