1 //===-- fmts_tester.cpp -----------------------------------------*- C++ -*-===// 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 11 #import <Cocoa/Cocoa.h> 12 #include <vector> 13 #include <list> 14 #include <map> 15 #include <string> 16 17 int main() 18 { 19 NSArray* nsarray = @[@1,@2,@"hello world",@3,@4,@"foobar"]; 20 NSMutableArray* nsmutablearray = [[NSMutableArray alloc] initWithCapacity:5]; 21 [nsmutablearray addObject:@1]; 22 [nsmutablearray addObject:@2]; 23 [nsmutablearray addObject:@"hello world"]; 24 [nsmutablearray addObject:@3]; 25 [nsmutablearray addObject:@4]; 26 [nsmutablearray addObject:@"foobar"]; 27 NSDictionary* nsdictionary = @{@1 : @1, @2 : @2, @"hello" : @"world", @3 : @3}; 28 NSMutableDictionary* nsmutabledictionary = [[NSMutableDictionary alloc] initWithCapacity:5]; 29 [nsmutabledictionary setObject:@1 forKey:@1]; 30 [nsmutabledictionary setObject:@2 forKey:@2]; 31 [nsmutabledictionary setObject:@"hello" forKey:@"world"]; 32 [nsmutabledictionary setObject:@3 forKey:@3]; 33 NSString* str0 = @"Hello world"; 34 NSString* str1 = @"Hello "; 35 NSString* str2 = @"Hello world"; 36 NSString* str3 = @"Hello "; 37 NSString* str4 = @"Hello world"; 38 NSDate* me = [NSDate dateWithNaturalLanguageString:@"April 10, 1985"]; 39 NSDate* cutie = [NSDate dateWithNaturalLanguageString:@"January 29, 1983"]; 40 NSDate* mom = [NSDate dateWithNaturalLanguageString:@"May 24, 1959"]; 41 NSDate* dad = [NSDate dateWithNaturalLanguageString:@"October 29, 1954"]; 42 NSDate* today = [NSDate dateWithNaturalLanguageString:@"March 14, 2013"]; 43 NSArray* bundles = [NSBundle allBundles]; 44 NSArray* frameworks = [NSBundle allFrameworks]; 45 NSSet* nsset = [NSSet setWithArray:nsarray]; 46 NSMutableSet* nsmutableset = [NSMutableSet setWithCapacity:5]; 47 [nsmutableset addObject:@1]; 48 [nsmutableset addObject:@2]; 49 [nsmutableset addObject:@"hello world"]; 50 [nsmutableset addObject:@3]; 51 [nsmutableset addObject:@4]; 52 [nsmutableset addObject:@"foobar"]; 53 std::vector<int> vector; 54 vector.push_back(1); 55 vector.push_back(2); 56 vector.push_back(3); 57 vector.push_back(4); 58 vector.push_back(5); 59 std::list<int> list; 60 list.push_back(1); 61 list.push_back(2); 62 list.push_back(3); 63 list.push_back(4); 64 list.push_back(5); 65 std::map<int,int> map; 66 map[1] = 1; 67 map[2] = 2; 68 map[3] = 3; 69 map[4] = 4; 70 map[5] = 5; 71 std::string sstr0("Hello world"); 72 std::string sstr1("Hello world"); 73 std::string sstr2("Hello world"); 74 std::string sstr3("Hello world"); 75 std::string sstr4("Hello world"); 76 int x = 0; 77 for (;;) 78 x++; 79 }