mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-24 04:46:05 +08:00
[test] add spec for RM-518
This commit is contained in:
@@ -113,6 +113,14 @@ describe 'CFTypeRefs' do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe "Typedef'ed argument" do
|
||||
# RM-518
|
||||
it "should be accepted" do
|
||||
TestMethod.testTypedefArgument('foo').should == 'foo'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'RUBY_ENGINE' do
|
||||
it "should be 'rubymotion'" do
|
||||
RUBY_ENGINE.should == 'rubymotion'
|
||||
|
||||
2
test/test/vendor/code/code.h
vendored
2
test/test/vendor/code/code.h
vendored
@@ -79,6 +79,8 @@ typedef id (^MyBlock)(void);
|
||||
|
||||
+ (BOOL)isReturnValueRetained:(id)object forSelector:(SEL)sel;
|
||||
|
||||
typedef NSString RMString;
|
||||
+ (id)testTypedefArgument:(RMString*)string;
|
||||
@end
|
||||
|
||||
@interface TestIterator : NSObject <NSFastEnumeration>
|
||||
|
||||
5
test/test/vendor/code/code.m
vendored
5
test/test/vendor/code/code.m
vendored
@@ -144,6 +144,11 @@
|
||||
return [count intValue] == 1;
|
||||
}
|
||||
|
||||
+ (id)testTypedefArgument:(RMString*)string
|
||||
{
|
||||
return string;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation TestIterator
|
||||
|
||||
Reference in New Issue
Block a user