Files
clang-p2996/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m
Kuba Mracek c40ca13519 [lldb] Add a testcase for MainThreadCheckerRuntime plugin
This adds a simple testcase for MainThreadCheckerRuntime. The tool (Main Thread Checker) is only available on Darwin, so the test also detects the presence of libMainThreadChecker.dylib and is skipped if the tool is not available.

llvm-svn: 307170
2017-07-05 16:29:36 +00:00

16 lines
368 B
Objective-C

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
int main() {
NSView *view = [[NSView alloc] init];
dispatch_group_t g = dispatch_group_create();
dispatch_group_enter(g);
[NSThread detachNewThreadWithBlock:^{
@autoreleasepool {
[view superview];
}
dispatch_group_leave(g);
}];
dispatch_group_wait(g, DISPATCH_TIME_FOREVER);
}