1 //===-- main.m ------------------------------------------------*- ObjC -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #import <Foundation/Foundation.h> 11 12 int main (int argc, const char * argv[]) 13 { 14 15 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 16 17 NSSet* set = [NSSet setWithArray:@[@1,@"hello",@2,@"world"]]; 18 NSMutableSet* mutable = [NSMutableSet setWithCapacity:5]; 19 [mutable addObject:@1]; 20 [mutable addObject:@2]; 21 [mutable addObject:@3]; 22 [mutable addObject:@4]; 23 [mutable addObject:@5]; 24 [mutable addObject:[NSURL URLWithString:@"www.apple.com"]]; 25 [mutable addObject:@[@1,@2,@3]]; 26 [mutable unionSet:set]; 27 [mutable removeAllObjects]; // Set break point at this line. 28 [mutable unionSet:set]; 29 [mutable addObject:@1]; 30 31 [pool drain]; 32 return 0; 33 } 34 35