Permalink
Browse files

Fixed Dispatch::Semaphore specs and tags

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3116 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 933c7e1 commit 09efc039f00bd9d3609b6cc24a0bda4fc34b0a19 @drernie drernie committed Dec 15, 2009
Showing with 4 additions and 11 deletions.
  1. +3 −5 spec/macruby/core/gcd/semaphore_spec.rb
  2. +1 −6 spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt
@@ -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
@@ -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.