25 lines · plain
1#import <Foundation/Foundation.h>2 3// Tests to run:4 5// Breakpoint 16// --7// (lldb) expr (int)[str compare:@"hello"]8// (int) $0 = 09// (lldb) expr (int)[str compare:@"world"]10// (int) $1 = -111// (lldb) expr (int)[@"" length]12// (int) $2 = 013 14int main ()15{16 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];17 18 NSString *str = [NSString stringWithCString:"hello" encoding:NSASCIIStringEncoding];19 20 NSLog(@"String \"%@\" has length %lu", str, [str length]); // Set breakpoint here.21 22 [pool drain];23 return 0;24}25