Modified: MacRuby/branches/experimental/spec/macruby/fixtures/method.m (1483 => 1484)
--- MacRuby/branches/experimental/spec/macruby/fixtures/method.m 2009-04-24 03:45:14 UTC (rev 1483)
+++ MacRuby/branches/experimental/spec/macruby/fixtures/method.m 2009-04-24 04:28:43 UTC (rev 1484)
@@ -292,6 +292,16 @@
return r.location == 0 && r.length == 42;
}
+- (BOOL)methodAcceptingInt:(int)a1 float:(float)a2 double:(double)a3
+ short:(short)a4 NSPoint:(NSPoint)a5 NSRect:(NSRect)a6 char:(char)a7
+{
+ return a1 == 42 && a2 == 42.0 && a3 == 42.0 && a4 == 42
+ && a5.x == 42.0 && a5.y == 42.0
+ && a6.origin.x == 42.0 && a6.origin.y == 42.0
+ && a6.size.width == 42.0 && a6.size.height == 42.0
+ && a7 == 42;
+}
+
@end
void
Modified: MacRuby/branches/experimental/spec/macruby/method_spec.rb (1483 => 1484)
--- MacRuby/branches/experimental/spec/macruby/method_spec.rb 2009-04-24 03:45:14 UTC (rev 1483)
+++ MacRuby/branches/experimental/spec/macruby/method_spec.rb 2009-04-24 04:28:43 UTC (rev 1484)
@@ -424,4 +424,9 @@
lambda { @o.methodAcceptingNSRect([[1, 2], [3]]) }.should raise_error(ArgumentError)
lambda { @o.methodAcceptingNSRect([[1, 2], [3, 4, 5]]) }.should raise_error(ArgumentError)
end
+
+ it "accepting various C types should receive these types as expected" do
+ @o.methodAcceptingInt(42, float:42, double:42, short:42, NSPoint:[42, 42],
+ NSRect:[42, 42, 42, 42], char:42).should == 1
+ end
end