Fix tests to work with `MRB_USE_FLOAT32`; fix #5329

parent 70b7ebd7
......@@ -10,11 +10,11 @@ assert('String#%') do
assert_equal 15, ("%b" % (1<<14)).size
skip unless Object.const_defined?(:Float)
assert_equal "1.0", "%3.1f" % 1.01
assert_equal " 123456789.12", "% 4.2f" % 123456789.123456789
assert_equal "123456789.12", "%-4.2f" % 123456789.123456789
assert_equal "+123456789.12", "%+4.2f" % 123456789.123456789
assert_equal "123456789.12", "%04.2f" % 123456789.123456789
assert_equal "00000000123456789.12", "%020.2f" % 123456789.123456789
assert_equal " 1234567.12", "% 4.2f" % 1234567.123456789
assert_equal "1234567.12", "%-4.2f" % 1234567.123456789
assert_equal "+1234567.12", "%+4.2f" % 1234567.123456789
assert_equal "1234567.12", "%04.2f" % 1234567.123456789
assert_equal "00000000001234567.12", "%020.2f" % 1234567.123456789
end
assert('String#% with inf') do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment