summaryrefslogtreecommitdiff
path: root/test/-ext-/bignum/test_big2str.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/bignum/test_big2str.rb')
-rw-r--r--test/-ext-/bignum/test_big2str.rb38
1 files changed, 18 insertions, 20 deletions
diff --git a/test/-ext-/bignum/test_big2str.rb b/test/-ext-/bignum/test_big2str.rb
index f8d6320338..88e35a7294 100644
--- a/test/-ext-/bignum/test_big2str.rb
+++ b/test/-ext-/bignum/test_big2str.rb
@@ -2,29 +2,27 @@
require 'test/unit'
require "-test-/bignum"
-class Test_Bignum < Test::Unit::TestCase
- class TestBig2str < Test::Unit::TestCase
+class TestBignum_Big2str < Test::Unit::TestCase
- SIZEOF_BDIGIT = Bug::Bignum::SIZEOF_BDIGIT
- BITSPERDIG = Bug::Bignum::BITSPERDIG
- BDIGMAX = (1 << BITSPERDIG) - 1
+ 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, Bug::Bignum.big2str_generic(x, 10))
- end
-
- def test_big2str_poweroftwo
- e = BITSPERDIG*2
- x = 0b10**e
- assert_equal("1" + "0" * e, Bug::Bignum.big2str_poweroftwo(x, 2))
- end
+ def test_big2str_generic
+ x = 10**1000
+ assert_equal("1" + "0" * 1000, Bug::Bignum.big2str_generic(x, 10))
+ end
- def test_big2str_gmp
- x = 10**1000
- assert_equal("1" + "0" * 1000, Bug::Bignum.big2str_gmp(x, 10))
- rescue NotImplementedError
- end
+ def test_big2str_poweroftwo
+ e = BITSPERDIG*2
+ x = 0b10**e
+ assert_equal("1" + "0" * e, Bug::Bignum.big2str_poweroftwo(x, 2))
+ end
+ def test_big2str_gmp
+ x = 10**1000
+ assert_equal("1" + "0" * 1000, Bug::Bignum.big2str_gmp(x, 10))
+ rescue NotImplementedError
end
+
end