[macruby-changes] [3116] MacRuby/trunk/spec/macruby
source_changes at macosforge.org
source_changes at macosforge.org
Mon Dec 14 17:33:43 PST 2009
Revision: 3116
http://trac.macosforge.org/projects/ruby/changeset/3116
Author: ernest.prabhakar at gmail.com
Date: 2009-12-14 17:33:42 -0800 (Mon, 14 Dec 2009)
Log Message:
-----------
Fixed Dispatch::Semaphore specs and tags
Modified Paths:
--------------
MacRuby/trunk/spec/macruby/core/gcd/semaphore_spec.rb
MacRuby/trunk/spec/macruby/tags/macruby/core/gcd/semaphore_tags.txt
Modified: MacRuby/trunk/spec/macruby/core/gcd/semaphore_spec.rb
===================================================================
--- 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
===================================================================
--- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091214/88795edf/attachment-0001.html>
More information about the macruby-changes
mailing list