1
0
Fork 0
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:
Nobuyoshi Nakada 2020-10-01 13:48:15 +09:00
parent eef12cdc06
commit 1d3024da26
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -11,10 +11,10 @@ class TestFiberMutex < Test::Unit::TestCase
Thread.current.scheduler = scheduler
Fiber.schedule do
refute Thread.current.blocking?
assert_not_predicate Thread.current, :blocking?
mutex.synchronize do
refute Thread.current.blocking?
assert_not_predicate Thread.current, :blocking?
end
end
end
@ -136,7 +136,7 @@ class TestFiberMutex < Test::Unit::TestCase
thread.join
assert signalled > 1
assert_operator signalled, :>, 1
end
def test_queue
@ -167,7 +167,7 @@ class TestFiberMutex < Test::Unit::TestCase
thread.join
assert processed == 3
assert_equal 3, processed
end
def test_queue_pop_waits