6 #include <Foundation/Foundation.h>
7 #include <dispatch/dispatch.h>
9 #include "dispatch_test.h"
11 @interface MYOperation : NSOperation
16 @implementation MYOperation
34 test_start("NSOperation");
36 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
38 NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
39 test_ptr_notnull("NSOperationQueue", queue);
41 MYOperation *operation = [[MYOperation alloc] init];
42 test_ptr_notnull("NSOperation", operation);
44 [queue addOperation:operation];
47 [[NSRunLoop mainRunLoop] run];