summaryrefslogtreecommitdiff
path: root/test/-ext-/bignum/test_big2str.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-08 19:07:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-09 22:38:06 +0900
commit590dc06e3840cc7b00d80ccaac9fbf42573428f8 (patch)
treee5f6aa316246401b8d89e7419ddf0976238c04b5 /test/-ext-/bignum/test_big2str.rb
parent161a20df28dd09ff35a32a7e2b7ce6cab7079707 (diff)
Get rid of defining methods for tests in core classes
Not to interfere in other tests.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4043
Diffstat (limited to 'test/-ext-/bignum/test_big2str.rb')
-rw-r--r--test/-ext-/bignum/test_big2str.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/-ext-/bignum/test_big2str.rb b/test/-ext-/bignum/test_big2str.rb
index cc28d97..f8d6320 100644
--- a/test/-ext-/bignum/test_big2str.rb
+++ b/test/-ext-/bignum/test_big2str.rb
@@ -5,24 +5,24 @@ require "-test-/bignum"
class Test_Bignum < Test::Unit::TestCase
class TestBig2str < Test::Unit::TestCase
- SIZEOF_BDIGIT = Integer::SIZEOF_BDIGIT
- BITSPERDIG = Integer::BITSPERDIG
+ SIZEOF_BDIGIT = Bug::Bignum::SIZEOF_BDIGIT
+ BITSPERDIG = Bug::Bignum::BITSPERDIG
BDIGMAX = (1 << BITSPERDIG) - 1
def test_big2str_generic
x = 10**1000
- assert_equal("1" + "0" * 1000, x.big2str_generic(10))
+ assert_equal("1" + "0" * 1000, Bug::Bignum.big2str_generic(x, 10))
end
def test_big2str_poweroftwo
e = BITSPERDIG*2
x = 0b10**e
- assert_equal("1" + "0" * e, x.big2str_poweroftwo(2))
+ assert_equal("1" + "0" * e, Bug::Bignum.big2str_poweroftwo(x, 2))
end
def test_big2str_gmp
x = 10**1000
- assert_equal("1" + "0" * 1000, x.big2str_gmp(10))
+ assert_equal("1" + "0" * 1000, Bug::Bignum.big2str_gmp(x, 10))
rescue NotImplementedError
end