diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-01 13:48:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-01 13:48:15 +0900 |
commit | 1d3024da26b2d1c48a04864024a5ed51a8ba3139 (patch) | |
tree | 43558f7f4a5c00426da24c5539e0589184657102 /test | |
parent | eef12cdc0665a882b0f324f30e4f46768b8d7860 (diff) | |
download | ruby-1d3024da26b2d1c48a04864024a5ed51a8ba3139.tar.gz |
Refined assertions for better failure messages
Diffstat (limited to 'test')
-rw-r--r-- | test/fiber/test_mutex.rb | 8 |
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 |