1 | #import <Foundation/Foundation.h> |
2 | |
3 | @protocol MyProtocol |
4 | -(void)aMethod; |
5 | @end |
6 | |
7 | @interface MyClass : NSObject { |
8 | id <MyProtocol> myId; |
9 | NSObject <MyProtocol> *myObject; |
10 | }; |
11 | |
12 | -(void)doSomething; |
13 | |
14 | @end |
15 | |
16 | @implementation MyClass |
17 | |
18 | -(void)doSomething |
19 | { |
20 | NSLog(@"Hello" ); //% self.expect("expression -- myId", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["id"]); |
21 | //% self.expect("expression -- myObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["NSObject"]); |
22 | } |
23 | |
24 | @end |
25 | |
26 | int main () |
27 | { |
28 | @autoreleasepool |
29 | { |
30 | MyClass *c = [MyClass alloc]; |
31 | [c doSomething]; |
32 | } |
33 | } |
34 | |