mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Improved assertions
This commit is contained in:
parent
c8cd6b2003
commit
101d56ddca
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue