Modified: MacRuby/trunk/spec/macruby/core/gcd/semaphore_spec.rb (3115 => 3116)
--- MacRuby/trunk/spec/macruby/core/gcd/semaphore_spec.rb 2009-12-15 01:33:03 UTC (rev 3115)
+++ MacRuby/trunk/spec/macruby/core/gcd/semaphore_spec.rb 2009-12-15 01:33:42 UTC (rev 3116)
@@ -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
\ No newline at end of file
Modified: MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt (3115 => 3116)
--- MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt 2009-12-15 01:33:03 UTC (rev 3115)
+++ MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt 2009-12-15 01:33:42 UTC (rev 3116)
@@ -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