1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Attempt to fix floating point test failure

The previous behavior depending on exact float values, it seemed
to work OK on amd64 and i386, but other CI platforms are
experiencing non-deterministic test failures with it. Relax test
slightly to hopefully pass on such platforms.
This commit is contained in:
Jeremy Evans 2021-05-29 14:08:24 -07:00
parent 9bb76201dd
commit fd65ef2a5a

View file

@ -898,7 +898,7 @@ class TestFloat < Test::Unit::TestCase
a = rand
b = a+rand*1000
s = (b - a) / 10
b = a + s*10
b = a + s*9.999999
seq = (a...b).step(s)
assert_equal(10, seq.to_a.length, seq.inspect)
end