diff options
Diffstat (limited to 'tests/examplefiles/objc_example.m')
-rw-r--r-- | tests/examplefiles/objc_example.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/examplefiles/objc_example.m b/tests/examplefiles/objc_example.m index c2a1c414..f4f27170 100644 --- a/tests/examplefiles/objc_example.m +++ b/tests/examplefiles/objc_example.m @@ -1,5 +1,19 @@ #import "Somefile.h" +@implementation ABC + +- (id)a:(B)b { + return 1; +} + +@end + +@implementation ABC + +- (void)xyz; + +@end + NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"quattuor", @"four", @"quinque", @"five", @"sex", @"six", nil]; @@ -9,3 +23,13 @@ for (key in dictionary) { NSLog(@"English: %@, Latin: %@", key, [dictionary valueForKey:key]); } +// Literals +NSArray *a = @[ @"1", @"2" ]; + +NSDictionary *d = @{ @"key": @"value" }; + +NSNumber *n1 = @( 1 ); +NSNumber *n2 = @( [a length] ); + ++ (void)f1:(NSString *)s1; ++ (void)f2:(NSString *) s2; |