summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 13:10:54 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 13:10:54 +0000
commit079ac1e1358eb91b2a6790b7229075d0659663fd (patch)
treee59bac107ba2db327ac8cb79d51ae9e9093ec80b /test
parent652d1c2638ebc5600427987d31118b14c1f93545 (diff)
downloadruby-079ac1e1358eb91b2a6790b7229075d0659663fd.tar.gz
ruby-079ac1e1358eb91b2a6790b7229075d0659663fd.tar.xz
ruby-079ac1e1358eb91b2a6790b7229075d0659663fd.zip
* prec.c: removed. Precision will be redesigned and be back again.
c.f. [ruby-dev:36352]. * common.mk (COMMON_OBJS): removed prec.o. * inits.c (rb_call_inits): removed Init_Precision. * numeric.c (Init_Numeric): removed inclusion of Precision. removed #induced_from from each class. * rational.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * lib/rdoc/knwon_classes.rb: removed the entry for Precision. * test/ruby/test_prec.rb: removed. * test/ruby/test_integer.rb: removed tests for Precision. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_rational.rb: ditto. * test/ruby/test_complex.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb7
-rw-r--r--test/ruby/test_complex.rb4
-rw-r--r--test/ruby/test_fixnum.rb9
-rw-r--r--test/ruby/test_float.rb7
-rw-r--r--test/ruby/test_integer.rb6
-rw-r--r--test/ruby/test_prec.rb21
-rw-r--r--test/ruby/test_rational.rb10
7 files changed, 0 insertions, 64 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index e9d1d0bdb..99ce10845 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -245,13 +245,6 @@ class TestBigDecimal < Test::Unit::TestCase
assert_operator(BigDecimal.new((2**100).to_s), :==, d)
end
- def test_induced_from
- assert_instance_of(BigDecimal, BigDecimal.induced_from(1))
- assert_raise(TypeError) do
- BigDecimal.induced_from(Time.now)
- end
- end
-
def test_precs
a = BigDecimal.new("1").precs
assert_instance_of(Array, a)
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index 5aa741065..7c29920b4 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -882,10 +882,6 @@ class Complex_Test < Test::Unit::TestCase
assert_equal([1, 2], [c.real, c.image])
end
- def test_prec
- assert_equal(nil, Complex < Precision)
- end
-
def test_supp
assert_equal(true, 1.real?)
assert_equal(true, 1.1.real?)
diff --git a/test/ruby/test_fixnum.rb b/test/ruby/test_fixnum.rb
index 8fa751ba9..e55e324bd 100644
--- a/test/ruby/test_fixnum.rb
+++ b/test/ruby/test_fixnum.rb
@@ -119,15 +119,6 @@ class TestFixnum < Test::Unit::TestCase
assert_equal(0x4000000000000000, (-0x4000000000000000).abs)
end
- def test_induced_from
- assert_equal(1, Fixnum.induced_from(1))
- assert_raise(RangeError) do
- Fixnum.induced_from(2**31-1)
- Fixnum.induced_from(2**63-1)
- end
- assert_equal(1, Fixnum.induced_from((2**32).coerce(1).first))
- end
-
def test_to_s
assert_equal("1010", 10.to_s(2))
assert_equal("a", 10.to_s(36))
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index d4bbd688d..5d7bbb178 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -275,13 +275,6 @@ class TestFloat < Test::Unit::TestCase
assert_equal(11100.0, 11111.1.round(-2))
end
- def test_induced_from
- assert_equal(1.0, Float.induced_from(1))
- assert_equal(1.0, Float.induced_from(1.0))
- assert_raise(TypeError) { Float.induced_from(nil) }
- end
-
-
VS = [
18446744073709551617.0,
18446744073709551616.0,
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index e31fb1880..232a7fae3 100644
--- a/test/ruby/test_integer.rb
+++ b/test/ruby/test_integer.rb
@@ -122,12 +122,6 @@ class TestInteger < Test::Unit::TestCase
assert_raise(RangeError) { 0x100.chr }
end
- def test_induced_from
- assert_equal(1, Integer.induced_from(1))
- assert_equal(1, Integer.induced_from(1.0))
- assert_raise(TypeError) { Integer.induced_from(nil) }
- end
-
def test_upto
a = []
1.upto(3) {|x| a << x }
diff --git a/test/ruby/test_prec.rb b/test/ruby/test_prec.rb
deleted file mode 100644
index d872242c1..000000000
--- a/test/ruby/test_prec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require 'test/unit'
-
-class TestPrecision < Test::Unit::TestCase
- def test_prec_i
- assert_same(1, 1.0.prec(Integer))
- assert_same(1, 1.0.prec_i)
- assert_same(1, Integer.induced_from(1.0))
- end
-
- def test_prec_f
- assert_equal(1.0, 1.prec(Float))
- assert_equal(1.0, 1.prec_f)
- assert_equal(1.0, Float.induced_from(1))
- end
-
- def test_induced_from
- m = Module.new
- m.instance_eval { include(Precision) }
- assert_raise(TypeError) { m.induced_from(0) }
- end
-end
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index a35157592..949098e5d 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -1028,16 +1028,6 @@ class Rational_Test < Test::Unit::TestCase
end
end
- def test_prec
- assert_equal(true, Rational < Precision)
-
- c = Rational(3,2)
-
- assert_eql(1, c.prec(Integer))
- assert_eql(1.5, c.prec(Float))
- assert_eql(c, c.prec(Rational))
- end
-
def test_gcdlcm
assert_equal(7, 91.gcd(-49))
assert_equal(5, 5.gcd(0))