mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Refined assertions for better failure messages
This commit is contained in:
parent
eef12cdc06
commit
1d3024da26
1 changed files with 4 additions and 4 deletions
|
@ -11,10 +11,10 @@ class TestFiberMutex < Test::Unit::TestCase
|
||||||
Thread.current.scheduler = scheduler
|
Thread.current.scheduler = scheduler
|
||||||
|
|
||||||
Fiber.schedule do
|
Fiber.schedule do
|
||||||
refute Thread.current.blocking?
|
assert_not_predicate Thread.current, :blocking?
|
||||||
|
|
||||||
mutex.synchronize do
|
mutex.synchronize do
|
||||||
refute Thread.current.blocking?
|
assert_not_predicate Thread.current, :blocking?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -136,7 +136,7 @@ class TestFiberMutex < Test::Unit::TestCase
|
||||||
|
|
||||||
thread.join
|
thread.join
|
||||||
|
|
||||||
assert signalled > 1
|
assert_operator signalled, :>, 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_queue
|
def test_queue
|
||||||
|
@ -167,7 +167,7 @@ class TestFiberMutex < Test::Unit::TestCase
|
||||||
|
|
||||||
thread.join
|
thread.join
|
||||||
|
|
||||||
assert processed == 3
|
assert_equal 3, processed
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_queue_pop_waits
|
def test_queue_pop_waits
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue