public
Created

  • Download Gist
range_spec.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
diff --git a/spec/macruby/core/range_spec.rb b/spec/macruby/core/range_spec.rb
index afdbbc9..8cb88ac 100644
--- a/spec/macruby/core/range_spec.rb
+++ b/spec/macruby/core/range_spec.rb
@@ -11,7 +11,7 @@ describe "A Range object" do
it "responds to #relative_to, which returns a new Range object without negative indicies" do
( 0 .. 10).relative_to(11).should == (0..10)
( 1 .. 9 ).relative_to(11).should == (1..9 )
- ( 0 .. 15).relative_to(11).should == (0..10)
+ ( 0 .. 15).relative_to(11).should == (0..11)
( 0 .. -1 ).relative_to(11).should == (0..10)
( 0 .. -2 ).relative_to(11).should == (0..9 )
diff --git a/spec/macruby/language/objc_method_spec.rb b/spec/macruby/language/objc_method_spec.rb
index b3294a6..615d866 100644
--- a/spec/macruby/language/objc_method_spec.rb
+++ b/spec/macruby/language/objc_method_spec.rb
@@ -368,12 +368,12 @@ describe "A pure Objective-C method" do
end
it "accepting a Range as a structure type should receive a NSRange C structure" do
- @o.methodAcceptingNSRange(0..41).should == 0
+ @o.methodAcceptingNSRange(0..41).should == 1
@o.methodAcceptingNSRange(1..42).should == 0
- @o.methodAcceptingNSRange(0..42).should == 1
- @o.methodAcceptingNSRange(0...42).should == 0
+ @o.methodAcceptingNSRange(0..42).should == 0
+ @o.methodAcceptingNSRange(0...42).should == 1
@o.methodAcceptingNSRange(1...42).should == 0
- @o.methodAcceptingNSRange(0...43).should == 1
+ @o.methodAcceptingNSRange(0...43).should == 0
lambda { @o.methodAcceptingNSRange(-1..1) }.should raise_error(ArgumentError)
lambda { @o.methodAcceptingNSRange(1..-1) }.should raise_error(ArgumentError)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.