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

Improved assertions

This commit is contained in:
Nobuyoshi Nakada 2020-06-09 21:42:06 +09:00
parent c8cd6b2003
commit 101d56ddca
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -14,7 +14,7 @@ class TestFiberSleep < Test::Unit::TestCase
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
thread.join
assert(seconds >= 2, "actual: %p" % seconds)
assert_operator seconds, :>=, 2, "actual: %p" % seconds
end
end