aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_complex.rb32
-rw-r--r--test/ruby/test_rational.rb15
2 files changed, 4 insertions, 43 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index bfa9859199..c1a2cfa662 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -413,30 +413,6 @@ class Complex_Test < Test::Unit::TestCase
end
end
- def test_rdiv
- if defined?(Rational) && !Rational.instance_variable_get('@RCS_ID')
- c = Complex(1,2)
- c2 = Complex(2,3)
-
- assert_equal(Complex(Rational(8,13),Rational(1,13)), c.rdiv(c2))
-
- c = Complex(1.0,2.0)
- c2 = Complex(2.0,3.0)
-
- r = c.rdiv(c2)
- assert_in_delta(0.615, r.real, 0.001)
- assert_in_delta(0.076, r.image, 0.001)
-
- c = Complex(1,2)
- c2 = Complex(2,3)
-
- assert_equal(Complex(Rational(1,2),1), c.rdiv(2))
-
- assert_equal(Complex(Rational(1,2),Rational(1)), c / Rational(2))
- assert_equal(Complex(Rational(3,2),Rational(3)), c / Rational(2,3))
- end
- end
-
def test_fdiv
c = Complex(1,2)
c2 = Complex(2,3)
@@ -880,10 +856,10 @@ class Complex_Test < Test::Unit::TestCase
end
if defined?(Rational) && !Rational.instance_variable_get('@RCS_ID')
- assert_equal(Rational(1,2), 1.rdiv(2))
- assert_equal(Rational(5000000000), 10000000000.rdiv(2))
- assert_equal(Rational(1,2), 1.0.rdiv(2))
- assert_equal(Rational(1,4), Rational(1,2).rdiv(2))
+ assert_equal(Rational(1,2), 1.quo(2))
+ assert_equal(Rational(5000000000), 10000000000.quo(2))
+ assert_equal(Rational(1,2), 1.0.quo(2))
+ assert_equal(Rational(1,4), Rational(1,2).quo(2))
assert_equal(Complex(Rational(1,2),Rational(1)), Complex(1,2).quo(2))
end
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index 899ecf5022..a40d6c6d76 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -502,16 +502,6 @@ class Rational_Test < Test::Unit::TestCase
assert_equal(Rational(0.25), c.quo(2.0))
end
- def test_rdiv
- c = Rational(1,2)
- c2 = Rational(2,3)
-
- assert_equal(Rational(3,4), c.rdiv(c2))
-
- assert_equal(Rational(1,4), c.rdiv(2))
- assert_equal(Rational(0.25), c.rdiv(2.0))
- end
-
def test_fdiv
c = Rational(1,2)
c2 = Rational(2,3)
@@ -946,11 +936,6 @@ class Rational_Test < Test::Unit::TestCase
assert_equal(Rational(1,2), 1.0.quo(2))
assert_equal(Rational(1,4), Rational(1,2).quo(2))
- assert_equal(Rational(1,2), 1.rdiv(2))
- assert_equal(Rational(5000000000), 10000000000.rdiv(2))
- assert_equal(Rational(1,2), 1.0.rdiv(2))
- assert_equal(Rational(1,4), Rational(1,2).rdiv(2))
-
assert_equal(0.5, 1.fdiv(2))
assert_equal(5000000000.0, 10000000000.fdiv(2))
assert_equal(0.5, 1.0.fdiv(2))