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 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