1 //===-- main.m ------------------------------------------------*- ObjC -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #import <Foundation/Foundation.h>
11 int main (int argc, const char * argv[])
14 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
17 NSArray* keys = @[@"foo",@"bar",@"baz"];
18 NSArray* values = @[@"hello",@[@"X",@"Y"],@{@1 : @"one",@2 : @"two"}];
19 NSDictionary* dictionary = [NSDictionary dictionaryWithObjects:values forKeys:keys];
20 NSMutableDictionary* mutabledict = [NSMutableDictionary dictionaryWithCapacity:5];
21 [mutabledict setObject:@"123" forKey:@23];
22 [mutabledict setObject:[NSURL URLWithString:@"http://www.apple.com"] forKey:@"foobar"];
23 [mutabledict setObject:@[@"a",@12] forKey:@57];
24 [mutabledict setObject:dictionary forKey:@"sourceofstuff"];
26 [pool drain];// Set break point at this line.