mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_bignum.rb (test_to_s): add tests for Bignum#to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0d16b614bf
commit
4be1dfb9fa
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Mar 22 10:27:58 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_bignum.rb (test_to_s): add tests for Bignum#to_s.
|
||||||
|
|
||||||
Wed Mar 21 20:38:06 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Mar 21 20:38:06 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* marshal.c (w_short, w_long, w_object): get rid of VC++ warnings.
|
* marshal.c (w_short, w_long, w_object): get rid of VC++ warnings.
|
||||||
|
|
|
@ -84,4 +84,15 @@ class TestBignum < Test::Unit::TestCase
|
||||||
shift_test(-4518325415524767873)
|
shift_test(-4518325415524767873)
|
||||||
shift_test(-0xfffffffffffffffff)
|
shift_test(-0xfffffffffffffffff)
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue