ruby-changes:35247
From: nobu <ko1@a...>
Date: Sun, 31 Aug 2014 11:50:00 +0900 (JST)
Subject: [ruby-changes:35247] nobu:r47329 (trunk): test_benchmark.rb: use assert_in_epsilon
nobu 2014-08-31 11:49:50 +0900 (Sun, 31 Aug 2014) New Revision: 47329 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47329 Log: 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. Modified files: trunk/test/benchmark/test_benchmark.rb Index: test/benchmark/test_benchmark.rb =================================================================== --- test/benchmark/test_benchmark.rb (revision 47328) +++ test/benchmark/test_benchmark.rb (revision 47329) @@ -156,6 +156,6 @@ BENCH https://github.com/ruby/ruby/blob/trunk/test/benchmark/test_benchmark.rb#L156 def test_realtime_output sleeptime = 1.0 realtime = Benchmark.realtime { sleep sleeptime } - assert_in_delta sleeptime, realtime + assert_in_epsilon sleeptime, realtime end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/