summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-01 13:48:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-01 13:48:15 +0900
commit1d3024da26b2d1c48a04864024a5ed51a8ba3139 (patch)
tree43558f7f4a5c00426da24c5539e0589184657102 /test
parenteef12cdc0665a882b0f324f30e4f46768b8d7860 (diff)
Refined assertions for better failure messages
Diffstat (limited to 'test')
-rw-r--r--test/fiber/test_mutex.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/fiber/test_mutex.rb b/test/fiber/test_mutex.rb
index c38d45b189..d1fe78cba3 100644
--- a/test/fiber/test_mutex.rb
+++ b/test/fiber/test_mutex.rb
@@ -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