summaryrefslogtreecommitdiff
path: root/test/ruby/test_bignum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r--test/ruby/test_bignum.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index c238337db5..48e8d9a92c 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -84,4 +84,15 @@ class TestBignum < Test::Unit::TestCase
shift_test(-4518325415524767873)
shift_test(-0xfffffffffffffffff)
end
+
+ def test_to_s # [ruby-core:10686]
+ assert_equal("fvvvvvvvvvvvv" ,18446744073709551615.to_s(32))
+ assert_equal("g000000000000" ,18446744073709551616.to_s(32))
+ assert_equal("3w5e11264sgsf" ,18446744073709551615.to_s(36))
+ assert_equal("3w5e11264sgsg" ,18446744073709551616.to_s(36))
+ assert_equal("nd075ib45k86f" ,18446744073709551615.to_s(31))
+ assert_equal("nd075ib45k86g" ,18446744073709551616.to_s(31))
+ assert_equal("1777777777777777777777" ,18446744073709551615.to_s(8))
+ assert_equal("-1777777777777777777777" ,-18446744073709551615.to_s(8))
+ end
end