diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-02 14:53:22 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-02 14:53:22 +0000 |
commit | 54c3b1ba19793f8735f1b99dbc964995bb903e17 (patch) | |
tree | c28abffd667fdee551f01e66970775d80676a594 /test | |
parent | 7c9a3d19fcacb57463d823d06f579129fa836820 (diff) |
* bignum.c (power_cache_get_power): Appry bigtrunc to the result of
bigsq.
(big2str_karatsuba): Fix number of leading zero characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_bignum.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 95c5dd784a..c2f8738246 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -106,6 +106,8 @@ class TestBignum < Test::Unit::TestCase assert_equal("nd075ib45k86g" ,18446744073709551616.to_s(31), "[ruby-core:10686]") assert_equal("1777777777777777777777" ,18446744073709551615.to_s(8)) assert_equal("-1777777777777777777777" ,-18446744073709551615.to_s(8)) + assert_match(/\A10{99}1\z/, (10**100+1).to_s) + assert_match(/\A10{900}9{100}\z/, (10**1000+(10**100-1)).to_s) end b = 2**64 |