1// TEST_CONFIG MEM=mrc,gc
2
3#include "test.h"
4
5#import <Foundation/NSObject.h>
6
7@interface Sub : NSObject { } @end
8@implementation Sub 
9+(id)allocWithZone:(NSZone *)zone { 
10    testprintf("in +[Sub alloc]\n");
11    return [super allocWithZone:zone];
12    }
13-(void)dealloc { 
14    testprintf("in -[Sub dealloc]\n");
15    [super dealloc];
16}
17@end
18
19int main()
20{
21    PUSH_POOL {
22        [[Sub new] autorelease];
23    } POP_POOL;
24
25    succeed(__FILE__);
26}
27