Revision
522
Author
lsansonetti@apple.com
Date
2008-08-29 19:47:11 -0700 (Fri, 29 Aug 2008)

Log Message

testing Boxed#inspect

Modified Paths

Diff

Modified: MacRuby/trunk/test/ruby/test_objc.rb (521 => 522)


--- MacRuby/trunk/test/ruby/test_objc.rb	2008-08-30 02:46:43 UTC (rev 521)
+++ MacRuby/trunk/test/ruby/test_objc.rb	2008-08-30 02:47:11 UTC (rev 522)
@@ -249,6 +249,16 @@
     assert_raise(ArgumentError) { NSStringFromRect([1, 2, 3, 4, 5]) }
   end
 
+  def test_struct_inspect
+    r = NSRect.new
+    assert_equal("#<NSRect origin=#<NSPoint x=0.0 y=0.0> size=#<NSSize width=0.0 height=0.0>>",
+                 r.inspect)
+    r.origin.x = 42
+    r.size.width = 42
+    assert_equal("#<NSRect origin=#<NSPoint x=42.0 y=0.0> size=#<NSSize width=42.0 height=0.0>>",
+                 r.inspect)
+  end
+
   class TestInitCallInitialize
     attr_reader :foo
     def initialize