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