summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/mac/framework/TestFramework
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/mac/framework/TestFramework')
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings2
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/Info.plist28
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h28
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm63
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h9
-rw-r--r--third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch7
6 files changed, 137 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings b/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000000..88f65cf6ea
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist b/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist
new file mode 100644
index 0000000000..a791b3ee48
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/Info.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h
new file mode 100644
index 0000000000..c2450960cd
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <Cocoa/Cocoa.h>
+
+#ifdef __cplusplus
+struct ObjCVectorImp;
+#else
+typedef struct _ObjCVectorImpT ObjCVectorImp;
+#endif
+
+@interface ObjCVector : NSObject {
+ @private
+ ObjCVectorImp* imp_;
+}
+
+- (id)init;
+
+- (void)addObject:(id)obj;
+- (void)addObject:(id)obj atIndex:(NSUInteger)index;
+
+- (void)removeObject:(id)obj;
+- (void)removeObjectAtIndex:(NSUInteger)index;
+
+- (id)objectAtIndex:(NSUInteger)index;
+
+@end
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm
new file mode 100644
index 0000000000..cbf431f28d
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVector.mm
@@ -0,0 +1,63 @@
+// Copyright (c) 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ObjCVectorInternal.h"
+#import "ObjCVector.h"
+
+#include <vector>
+
+@interface ObjCVector (Private)
+- (std::vector<id>::iterator)makeIterator:(NSUInteger)index;
+@end
+
+@implementation ObjCVector
+
+- (id)init {
+ if ((self = [super init])) {
+ imp_ = new ObjCVectorImp();
+ }
+ return self;
+}
+
+- (void)dealloc {
+ delete imp_;
+ [super dealloc];
+}
+
+- (void)addObject:(id)obj {
+ imp_->v.push_back([obj retain]);
+}
+
+- (void)addObject:(id)obj atIndex:(NSUInteger)index {
+ imp_->v.insert([self makeIterator:index], [obj retain]);
+}
+
+- (void)removeObject:(id)obj {
+ for (std::vector<id>::iterator it = imp_->v.begin();
+ it != imp_->v.end();
+ ++it) {
+ if ([*it isEqual:obj]) {
+ [*it autorelease];
+ imp_->v.erase(it);
+ return;
+ }
+ }
+}
+
+- (void)removeObjectAtIndex:(NSUInteger)index {
+ [imp_->v[index] autorelease];
+ imp_->v.erase([self makeIterator:index]);
+}
+
+- (id)objectAtIndex:(NSUInteger)index {
+ return imp_->v[index];
+}
+
+- (std::vector<id>::iterator)makeIterator:(NSUInteger)index {
+ std::vector<id>::iterator it = imp_->v.begin();
+ it += index;
+ return it;
+}
+
+@end
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h
new file mode 100644
index 0000000000..fb6c98258b
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h
@@ -0,0 +1,9 @@
+// Copyright (c) 2011 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <vector>
+
+struct ObjCVectorImp {
+ std::vector<id> v;
+};
diff --git a/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch b/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch
new file mode 100644
index 0000000000..394f41d957
--- /dev/null
+++ b/third_party/python/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'TestFramework' target in the 'TestFramework' project.
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif