65faaeaba09762ca57414f115492c79d3863bf2c
[openbsd] /
1 //===-- main.m ------------------------------------------------*- ObjC -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 #import <Foundation/Foundation.h>
10
11 int main (int argc, const char * argv[])
12 {
13     
14     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
15
16
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"];
25
26     [pool drain];// Set break point at this line.
27     return 0;
28 }
29