test/test_{string,sprintf}.rb: updated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-03-01 01:22:45 +00:00
Родитель 79f1b9e93b
Коммит 840723e523
2 изменённых файлов: 5 добавлений и 5 удалений

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

@ -31,22 +31,22 @@ class TestSprintf < Test::Unit::TestCase
assert_equal(" 0010", sprintf("%6.4b", 2))
assert_equal(" ..11", sprintf("%6.4b", -1))
assert_equal(" 0b0", sprintf("%#4b", 0))
assert_equal(" 0", sprintf("%#4b", 0))
assert_equal(" 0b1", sprintf("%#4b", 1))
assert_equal("0b10", sprintf("%#4b", 2))
assert_equal("0b..1", sprintf("%#4b", -1))
assert_equal("0b00", sprintf("%#04b", 0))
assert_equal("0000", sprintf("%#04b", 0))
assert_equal("0b01", sprintf("%#04b", 1))
assert_equal("0b10", sprintf("%#04b", 2))
assert_equal("0b..1", sprintf("%#04b", -1))
assert_equal("0b0000", sprintf("%#.4b", 0))
assert_equal("0000", sprintf("%#.4b", 0))
assert_equal("0b0001", sprintf("%#.4b", 1))
assert_equal("0b0010", sprintf("%#.4b", 2))
assert_equal("0b..11", sprintf("%#.4b", -1))
assert_equal("0b0000", sprintf("%#6.4b", 0))
assert_equal(" 0000", sprintf("%#6.4b", 0))
assert_equal("0b0001", sprintf("%#6.4b", 1))
assert_equal("0b0010", sprintf("%#6.4b", 2))
assert_equal("0b..11", sprintf("%#6.4b", -1))

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

@ -207,7 +207,7 @@ class TestString < Test::Unit::TestCase
171,
171]
assert_equal(S(' hi 123 %foo 456 0x0A3.1 1011 ab AB 0b1011 0xab 0XAB'), x)
assert_equal(S(' hi 123 %foo 456 0A3.1 1011 ab AB 0b1011 0xab 0XAB'), x)
end
def test_MUL # '*'