diff options
author | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:34:34 +0900 |
---|---|---|
committer | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:34:34 +0900 |
commit | cc1a12d36421addf6726f86a5b24f913024d8b3a (patch) | |
tree | 253958b9b8d3ffe9120c78cf3bd5389b8e4a0ea0 /Tests/ObjC++/objc++.mm | |
download | cmake-tizen_2.3.tar.gz cmake-tizen_2.3.tar.bz2 cmake-tizen_2.3.zip |
Initialize Tizen 2.3tizen_2.3_releasesubmit/tizen_2.3/20150202.102300submit/tizen_2.3/20140531.0637312.3a_releasetizen_2.3
Diffstat (limited to 'Tests/ObjC++/objc++.mm')
-rw-r--r-- | Tests/ObjC++/objc++.mm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/ObjC++/objc++.mm b/Tests/ObjC++/objc++.mm new file mode 100644 index 0000000..b7ec4b5 --- /dev/null +++ b/Tests/ObjC++/objc++.mm @@ -0,0 +1,22 @@ +#import <iostream.h> +#import <Cocoa/Cocoa.h> + +int main() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSMutableSet *mySet = [NSMutableSet set]; + cout<<"Adding values to the set."<<endl; + [mySet addObject:[NSNumber numberWithInt:356]]; + [mySet addObject:[NSNumber numberWithInt:550]]; + [mySet addObject:[NSNumber numberWithInt:914]]; + + cout<<"The set contains "<<[mySet count]<<" objects."<<endl; + if ([mySet containsObject:[NSNumber numberWithInt:911]]) + cout<<"It's there!"<<endl; + else + cout<<"It's not there."<<endl; + + [pool release]; + return 0; +} |