Create an NSAutoreleasePool correctly in a test

case so that the Objective-C runtime doesn't
complain about lack of one, causing the test case
to fail.

llvm-svn: 155503
This commit is contained in:
Sean Callanan 2012-04-24 23:18:47 +00:00
parent 47c6c9de50
commit 72546f01d3
1 changed files with 2 additions and 0 deletions

View File

@ -22,9 +22,11 @@
int main ()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Simple *my_simple = [[Simple alloc] init];
my_simple.value = 20;
// Set a breakpoint here.
NSLog (@"Object has value: %d.", my_simple.value);
[pool drain];
return 0;
}