Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/test_mutex_m.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,12 @@ def test_alias_included_class
assert object.respond_to?(:try_lock)
assert object.respond_to?(:synchronize)
end

def test_try_lock_starts_unlocked
object = Object.new
object.extend(Mutex_m)

assert_equal true, object.try_lock
assert_equal false, object.try_lock
end
end