Skip to content

Commit

Permalink
Fixed Dispatch::Semaphore specs and tags
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3116 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
drernie committed Dec 15, 2009
1 parent 933c7e1 commit 09efc03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 3 additions & 5 deletions spec/macruby/core/gcd/semaphore_spec.rb
Expand Up @@ -44,27 +44,25 @@
q.async { @sema0.signal }
@sema0.wait(Dispatch::TIME_FOREVER).should == true
end

end

describe :signal do
it "returns true if it does NOT wake a thread" do
@sema0.signal.should == true
@sema1.signal.should == true
end

it "returns false if it DOES wake a thread" do
@q.async do
sleep 0.1
@sema0.signal.should == false
@sema1.signal.should == true
@sema1.signal.should == false
end
@sema0.wait(Dispatch::TIME_FOREVER)
@sema1.wait(Dispatch::TIME_FOREVER)
end

end


end
end
end
7 changes: 1 addition & 6 deletions spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt
@@ -1,7 +1,2 @@
critical:Dispatch::Semaphore raises an ArgumentError if the count isn't specified
fails:Dispatch::Semaphore raises an ArgumentError if the width isn't specified
fails:Dispatch::Semaphore raises an TypeError if a non-integer width is provided
fails:Dispatch::Semaphore returns nil object if the specified width is less than zero
fails:Dispatch::Semaphore returns non-zero from 'signal' if it does wake a thread
fails:Dispatch::Semaphore returns zero from wait if explicit timeout does NOT expire
fails:Dispatch::Semaphore always returns zero from wait with default timeout FOREVER
fails:Dispatch::Semaphore wait returns false if explicit timeout DOES expire

0 comments on commit 09efc03

Please sign in to comment.