mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Show unmatched sequence on failure
This commit is contained in:
parent
115fec062c
commit
b64b0f3433
1 changed files with 2 additions and 1 deletions
|
@ -892,7 +892,8 @@ class TestFloat < Test::Unit::TestCase
|
|||
a = rand
|
||||
b = a+rand*1000
|
||||
s = (b - a) / 10
|
||||
assert_equal(10, (a...b).step(s).to_a.length)
|
||||
seq = (a...b).step(s)
|
||||
assert_equal(10, seq.to_a.length, seq.inspect)
|
||||
end
|
||||
|
||||
assert_equal([1.0, 2.9, 4.8, 6.699999999999999], (1.0...6.8).step(1.9).to_a)
|
||||
|
|
Loading…
Reference in a new issue