[macruby-changes] [2823] MacRuby/trunk/spec/macruby/core/pointer_spec.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 15 18:24:03 PDT 2009
Revision: 2823
http://trac.macosforge.org/projects/ruby/changeset/2823
Author: lsansonetti at apple.com
Date: 2009-10-15 18:24:02 -0700 (Thu, 15 Oct 2009)
Log Message:
-----------
added a Pointer + CF type spec
Modified Paths:
--------------
MacRuby/trunk/spec/macruby/core/pointer_spec.rb
Modified: MacRuby/trunk/spec/macruby/core/pointer_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/core/pointer_spec.rb 2009-10-16 01:23:45 UTC (rev 2822)
+++ MacRuby/trunk/spec/macruby/core/pointer_spec.rb 2009-10-16 01:24:02 UTC (rev 2823)
@@ -111,4 +111,11 @@
lambda { pointer[0] = Object.new }.should raise_error(TypeError)
end
end
+
+ it "can assign an retrieve CF type objects" do
+ ptr = Pointer.new('^{__CFError}')
+ ptr[0].should == nil
+ CFURLResourceIsReachable(NSURL.URLWithString('http://doesnotexistomgwtf.be'), ptr).should == false
+ ptr[0].class.should == NSCFError
+ end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091015/9c00c474/attachment-0001.html>
More information about the macruby-changes
mailing list