diff --git a/test/test/spec/module_spec.rb b/test/test/spec/module_spec.rb index 357c5a9b..a238c066 100644 --- a/test/test/spec/module_spec.rb +++ b/test/test/spec/module_spec.rb @@ -18,3 +18,24 @@ describe "Module" do end end =end + +describe "Module" do + module BaseModule + def testMethod1(obj) + super + end + def testMethod2(obj) + super + end + end + + class TestRM583 < TestModuleInclude + include BaseModule + end + + # RM-583 + it "included module method should be call correctly from Objc" do + TestRM583.new.run_testMethod2.should == 456 + TestRM583.new.run_testMethod1.should == 123 + end +end diff --git a/test/test/vendor/code/code.h b/test/test/vendor/code/code.h index 65d9f38d..36f6dc57 100644 --- a/test/test/vendor/code/code.h +++ b/test/test/vendor/code/code.h @@ -130,3 +130,11 @@ typedef struct MyUnionHasBool { + (id)methodWithObjectVoidPointer:(void *)object; + (int)methodWithCTypeVoidPointer:(void *)val; @end + +@interface TestModuleInclude : NSObject +- (int)testMethod1:(bool)value; +- (int)testMethod2:(bool)value; +- (int)run_testMethod1; +- (int)run_testMethod2; +@end + diff --git a/test/test/vendor/code/code.m b/test/test/vendor/code/code.m index 6c82ef7e..98048d32 100644 --- a/test/test/vendor/code/code.m +++ b/test/test/vendor/code/code.m @@ -227,3 +227,24 @@ ReturnsIntBlock KreateGlobalBlock() } @end + +@implementation TestModuleInclude +- (int)testMethod1:(bool)value +{ + return 123; +} +- (int)testMethod2:(bool)value +{ + return 456; +} +- (int)run_testMethod1 +{ + return [self testMethod1:true]; +} +- (int)run_testMethod2 +{ + return [self testMethod2:true]; +} + +@end +