* 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:
usa 2007-03-22 01:28:23 +00:00
Родитель 0d16b614bf
Коммит 4be1dfb9fa
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -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>
* 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(-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