ruby-changes:61642
From: Nobuyoshi <ko1@a...>
Date: Tue, 9 Jun 2020 21:46:39 +0900 (JST)
Subject: [ruby-changes:61642] 101d56ddca (master): Improved assertions
https://git.ruby-lang.org/ruby.git/commit/?id=101d56ddca From 101d56ddca818cad0e3ebe95e5e080fcac957b1b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 9 Jun 2020 21:42:06 +0900 Subject: Improved assertions diff --git a/test/fiber/test_sleep.rb b/test/fiber/test_sleep.rb index 4dadbb5..84e9d27 100644 --- a/test/fiber/test_sleep.rb +++ b/test/fiber/test_sleep.rb @@ -14,7 +14,7 @@ class TestFiberSleep < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_sleep.rb#L14 5.times do |i| Fiber do - assert(sleep(i/100.0) >= 0) + assert_operator sleep(i/100.0), :>=, 0 items << i end end @@ -41,7 +41,7 @@ class TestFiberSleep < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_sleep.rb#L41 thread.join - assert(seconds >= 2, "actual: %p" % seconds) + assert_operator seconds, :>=, 2, "actual: %p" % seconds end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/