test_benchmark.rb: use assert_in_epsilon
* test/benchmark/test_benchmark.rb (test_realtime_output): use assert_in_epsilon which compares in relative range, instead of assert_in_delta which compares in absolute range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3bfd894ad7
commit
d723b93038
@ -156,6 +156,6 @@ BENCH
|
|||||||
def test_realtime_output
|
def test_realtime_output
|
||||||
sleeptime = 1.0
|
sleeptime = 1.0
|
||||||
realtime = Benchmark.realtime { sleep sleeptime }
|
realtime = Benchmark.realtime { sleep sleeptime }
|
||||||
assert_in_delta sleeptime, realtime
|
assert_in_epsilon sleeptime, realtime
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user