[test] add spec for RM-583

This commit is contained in:
Watson
2014-09-03 18:34:22 +09:00
parent 84e0a10df0
commit 20e7030905
3 changed files with 50 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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