Move bsearch test with Bigdecimal under the test_bigdecimal.rb

When we extract bigdecimal as bundled gems, this test will be failed
  with `make test-all`.
This commit is contained in:
Hiroshi SHIBATA 2023-07-13 12:51:35 +09:00
parent 5dd969892f
commit 3ef6364a98
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
2 changed files with 6 additions and 4 deletions

View File

@ -2275,6 +2275,12 @@ class TestBigDecimal < Test::Unit::TestCase
end
end
def test_bsearch_for_bigdecimal
assert_raise(TypeError) {
(BigDecimal('0.5')..BigDecimal('2.25')).bsearch
}
end
def assert_no_memory_leak(code, *rest, **opt)
code = "8.times {20_000.times {begin #{code}; rescue NoMemoryError; end}; GC.start}"
super(["-rbigdecimal"],

View File

@ -2,7 +2,6 @@
require 'test/unit'
require 'delegate'
require 'timeout'
require 'bigdecimal'
require 'rbconfig/sizeof'
class TestRange < Test::Unit::TestCase
@ -852,9 +851,6 @@ class TestRange < Test::Unit::TestCase
assert_raise(TypeError) {
(Rational(-1,2)..Rational(9,4)).bsearch
}
assert_raise(TypeError) {
(BigDecimal('0.5')..BigDecimal('2.25')).bsearch
}
end
def test_bsearch_for_fixnum