зеркало из https://github.com/github/ruby.git
Improved assertions
This commit is contained in:
Родитель
c8cd6b2003
Коммит
101d56ddca
|
@ -14,7 +14,7 @@ class TestFiberSleep < Test::Unit::TestCase
|
||||||
|
|
||||||
5.times do |i|
|
5.times do |i|
|
||||||
Fiber do
|
Fiber do
|
||||||
assert(sleep(i/100.0) >= 0)
|
assert_operator sleep(i/100.0), :>=, 0
|
||||||
items << i
|
items << i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -41,7 +41,7 @@ class TestFiberSleep < Test::Unit::TestCase
|
||||||
|
|
||||||
thread.join
|
thread.join
|
||||||
|
|
||||||
assert(seconds >= 2, "actual: %p" % seconds)
|
assert_operator seconds, :>=, 2, "actual: %p" % seconds
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче