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