Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from EmbeddedSources/UrlBuilderLib

Added a library and a unit test target for URL builder
  • Loading branch information...
commit 3d928e1293506342e91e0be1dcf88064956878ed 2 parents adf5cf0 + f55748e
@davedelong authored
View
6 .gitignore
@@ -1,3 +1,9 @@
+
+*xcworkspace*
+*xcuserdata*
+._*
+.svn
+
**/build
**/**/*.pbxuser
**/**/*.perspectivev3
View
4 DDURLBuilder/DDURLBuilder.m
@@ -11,8 +11,8 @@
NSString *ddurlbuilder_percentEncode(NSString *string) {
NSMutableString * output = [NSMutableString string];
const unsigned char * source = (const unsigned char *)[string UTF8String];
- int sourceLen = strlen((const char *)source);
- for (int i = 0; i < sourceLen; ++i) {
+ size_t sourceLen = strlen((const char *)source);
+ for (size_t i = 0; i < sourceLen; ++i) {
const unsigned char thisChar = source[i];
if (thisChar == ' '){
[output appendString:@"+"];
View
423 DDURLBuilder/DDUrlBuilder/DDUrlBuilder.xcodeproj/project.pbxproj
@@ -0,0 +1,423 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 7E54C1DC157F8687007D89F1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E54C1DB157F8687007D89F1 /* Foundation.framework */; };
+ 7E54C1EA157F873D007D89F1 /* DDURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E54C1E8157F873D007D89F1 /* DDURLBuilder.h */; };
+ 7E54C1EB157F873D007D89F1 /* DDURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E54C1E9157F873D007D89F1 /* DDURLBuilder.m */; };
+ 7E54C1F3157F889A007D89F1 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E54C1F2157F889A007D89F1 /* SenTestingKit.framework */; };
+ 7E54C1F5157F889A007D89F1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E54C1F4157F889A007D89F1 /* UIKit.framework */; };
+ 7E54C1F6157F889A007D89F1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E54C1DB157F8687007D89F1 /* Foundation.framework */; };
+ 7E54C1FC157F889A007D89F1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E54C1FA157F889A007D89F1 /* InfoPlist.strings */; };
+ 7E54C1FF157F889A007D89F1 /* DDUrlBuilderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E54C1FE157F889A007D89F1 /* DDUrlBuilderTest.m */; };
+ 7E54C206157F897C007D89F1 /* libDDUrlBuilder.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E54C1D8157F8687007D89F1 /* libDDUrlBuilder.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 7E54C204157F8977007D89F1 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E54C1CF157F8687007D89F1 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7E54C1D7157F8687007D89F1;
+ remoteInfo = DDUrlBuilder;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 7E54C1D8157F8687007D89F1 /* libDDUrlBuilder.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDDUrlBuilder.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E54C1DB157F8687007D89F1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 7E54C1DF157F8687007D89F1 /* DDUrlBuilder-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DDUrlBuilder-Prefix.pch"; sourceTree = "<group>"; };
+ 7E54C1E8157F873D007D89F1 /* DDURLBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDURLBuilder.h; path = ../../DDURLBuilder.h; sourceTree = "<group>"; };
+ 7E54C1E9157F873D007D89F1 /* DDURLBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDURLBuilder.m; path = ../../DDURLBuilder.m; sourceTree = "<group>"; };
+ 7E54C1F1157F889A007D89F1 /* DDUrlBuilderTest.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DDUrlBuilderTest.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E54C1F2157F889A007D89F1 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 7E54C1F4157F889A007D89F1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
+ 7E54C1F9157F889A007D89F1 /* DDUrlBuilderTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DDUrlBuilderTest-Info.plist"; sourceTree = "<group>"; };
+ 7E54C1FB157F889A007D89F1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 7E54C1FD157F889A007D89F1 /* DDUrlBuilderTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DDUrlBuilderTest.h; sourceTree = "<group>"; };
+ 7E54C1FE157F889A007D89F1 /* DDUrlBuilderTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DDUrlBuilderTest.m; sourceTree = "<group>"; };
+ 7E54C200157F889A007D89F1 /* DDUrlBuilderTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DDUrlBuilderTest-Prefix.pch"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 7E54C1D5157F8687007D89F1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C1DC157F8687007D89F1 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E54C1ED157F889A007D89F1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C206157F897C007D89F1 /* libDDUrlBuilder.a in Frameworks */,
+ 7E54C1F3157F889A007D89F1 /* SenTestingKit.framework in Frameworks */,
+ 7E54C1F5157F889A007D89F1 /* UIKit.framework in Frameworks */,
+ 7E54C1F6157F889A007D89F1 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 7E54C1CD157F8687007D89F1 = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1DD157F8687007D89F1 /* DDUrlBuilder */,
+ 7E54C1F7157F889A007D89F1 /* DDUrlBuilderTest */,
+ 7E54C1DA157F8687007D89F1 /* Frameworks */,
+ 7E54C1D9157F8687007D89F1 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 7E54C1D9157F8687007D89F1 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1D8157F8687007D89F1 /* libDDUrlBuilder.a */,
+ 7E54C1F1157F889A007D89F1 /* DDUrlBuilderTest.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 7E54C1DA157F8687007D89F1 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1DB157F8687007D89F1 /* Foundation.framework */,
+ 7E54C1F2157F889A007D89F1 /* SenTestingKit.framework */,
+ 7E54C1F4157F889A007D89F1 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 7E54C1DD157F8687007D89F1 /* DDUrlBuilder */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1E8157F873D007D89F1 /* DDURLBuilder.h */,
+ 7E54C1E9157F873D007D89F1 /* DDURLBuilder.m */,
+ 7E54C1DE157F8687007D89F1 /* Supporting Files */,
+ );
+ path = DDUrlBuilder;
+ sourceTree = "<group>";
+ };
+ 7E54C1DE157F8687007D89F1 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1DF157F8687007D89F1 /* DDUrlBuilder-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 7E54C1F7157F889A007D89F1 /* DDUrlBuilderTest */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1FD157F889A007D89F1 /* DDUrlBuilderTest.h */,
+ 7E54C1FE157F889A007D89F1 /* DDUrlBuilderTest.m */,
+ 7E54C1F8157F889A007D89F1 /* Supporting Files */,
+ );
+ path = DDUrlBuilderTest;
+ sourceTree = "<group>";
+ };
+ 7E54C1F8157F889A007D89F1 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7E54C1F9157F889A007D89F1 /* DDUrlBuilderTest-Info.plist */,
+ 7E54C1FA157F889A007D89F1 /* InfoPlist.strings */,
+ 7E54C200157F889A007D89F1 /* DDUrlBuilderTest-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 7E54C1D6157F8687007D89F1 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C1EA157F873D007D89F1 /* DDURLBuilder.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 7E54C1D7157F8687007D89F1 /* DDUrlBuilder */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E54C1E5157F8687007D89F1 /* Build configuration list for PBXNativeTarget "DDUrlBuilder" */;
+ buildPhases = (
+ 7E54C1D4157F8687007D89F1 /* Sources */,
+ 7E54C1D5157F8687007D89F1 /* Frameworks */,
+ 7E54C1D6157F8687007D89F1 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = DDUrlBuilder;
+ productName = DDUrlBuilder;
+ productReference = 7E54C1D8157F8687007D89F1 /* libDDUrlBuilder.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 7E54C1F0157F889A007D89F1 /* DDUrlBuilderTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E54C201157F889A007D89F1 /* Build configuration list for PBXNativeTarget "DDUrlBuilderTest" */;
+ buildPhases = (
+ 7E54C1EC157F889A007D89F1 /* Sources */,
+ 7E54C1ED157F889A007D89F1 /* Frameworks */,
+ 7E54C1EE157F889A007D89F1 /* Resources */,
+ 7E54C1EF157F889A007D89F1 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 7E54C205157F8977007D89F1 /* PBXTargetDependency */,
+ );
+ name = DDUrlBuilderTest;
+ productName = DDUrlBuilderTest;
+ productReference = 7E54C1F1157F889A007D89F1 /* DDUrlBuilderTest.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7E54C1CF157F8687007D89F1 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ ORGANIZATIONNAME = Sitecore;
+ };
+ buildConfigurationList = 7E54C1D2157F8687007D89F1 /* Build configuration list for PBXProject "DDUrlBuilder" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 7E54C1CD157F8687007D89F1;
+ productRefGroup = 7E54C1D9157F8687007D89F1 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 7E54C1D7157F8687007D89F1 /* DDUrlBuilder */,
+ 7E54C1F0157F889A007D89F1 /* DDUrlBuilderTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 7E54C1EE157F889A007D89F1 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C1FC157F889A007D89F1 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 7E54C1EF157F889A007D89F1 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 7E54C1D4157F8687007D89F1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C1EB157F873D007D89F1 /* DDURLBuilder.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E54C1EC157F889A007D89F1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E54C1FF157F889A007D89F1 /* DDUrlBuilderTest.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 7E54C205157F8977007D89F1 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7E54C1D7157F8687007D89F1 /* DDUrlBuilder */;
+ targetProxy = 7E54C204157F8977007D89F1 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 7E54C1FA157F889A007D89F1 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7E54C1FB157F889A007D89F1 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 7E54C1E3157F8687007D89F1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_PEDANTIC = NO;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 7E54C1E4157F8687007D89F1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_PEDANTIC = NO;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 7E54C1E6157F8687007D89F1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/DDUrlBuilder.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DDUrlBuilder/DDUrlBuilder-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 7E54C1E7157F8687007D89F1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/DDUrlBuilder.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DDUrlBuilder/DDUrlBuilder-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ 7E54C202157F889A007D89F1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DDUrlBuilderTest/DDUrlBuilderTest-Prefix.pch";
+ INFOPLIST_FILE = "DDUrlBuilderTest/DDUrlBuilderTest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 7E54C203157F889A007D89F1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DDUrlBuilderTest/DDUrlBuilderTest-Prefix.pch";
+ INFOPLIST_FILE = "DDUrlBuilderTest/DDUrlBuilderTest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 7E54C1D2157F8687007D89F1 /* Build configuration list for PBXProject "DDUrlBuilder" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E54C1E3157F8687007D89F1 /* Debug */,
+ 7E54C1E4157F8687007D89F1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7E54C1E5157F8687007D89F1 /* Build configuration list for PBXNativeTarget "DDUrlBuilder" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E54C1E6157F8687007D89F1 /* Debug */,
+ 7E54C1E7157F8687007D89F1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ 7E54C201157F889A007D89F1 /* Build configuration list for PBXNativeTarget "DDUrlBuilderTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E54C202157F889A007D89F1 /* Debug */,
+ 7E54C203157F889A007D89F1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7E54C1CF157F8687007D89F1 /* Project object */;
+}
View
7 DDURLBuilder/DDUrlBuilder/DDUrlBuilder/DDUrlBuilder-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'DDUrlBuilder' target in the 'DDUrlBuilder' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
View
22 DDURLBuilder/DDUrlBuilder/DDUrlBuilderTest/DDUrlBuilderTest-Info.plist
@@ -0,0 +1,22 @@
+<?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>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.EmbeddedSources.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
View
8 DDURLBuilder/DDUrlBuilder/DDUrlBuilderTest/DDUrlBuilderTest-Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'DDUrlBuilderTest' target in the 'DDUrlBuilderTest' project
+//
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
5 DDURLBuilder/DDUrlBuilder/DDUrlBuilderTest/DDUrlBuilderTest.h
@@ -0,0 +1,5 @@
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface DDUrlBuilderTest : SenTestCase
+
+@end
View
26 DDURLBuilder/DDUrlBuilder/DDUrlBuilderTest/DDUrlBuilderTest.m
@@ -0,0 +1,26 @@
+#import "DDUrlBuilderTest.h"
+#import "DDURLBuilder.h"
+
+@implementation DDUrlBuilderTest
+
+-(void)testAuthorExample
+{
+
+ NSURL* expected_ = [ NSURL URLWithString: @"http://www.google.com/search?client=safari&rls=en&q=what+is+the+answer+to+the+ultimate+question+of+life+the+universe+and+everything&ie=UTF-8&oe=UTF-8" ];
+
+ DDURLBuilder *builder = [DDURLBuilder URLBuilderWithURL:nil];
+ [builder setHost:@"google.com"];
+ [builder setScheme:@"http"];
+ [builder setPath:@"search"];
+ [builder addQueryValue:@"safari" forKey:@"client"];
+ [builder addQueryValue:@"en" forKey:@"rls"];
+ [builder addQueryValue:@"what is the answer to the ultimate question of life the universe and everything" forKey:@"q"];
+ [builder addQueryValue:@"UTF-8" forKey:@"ie"];
+ [builder addQueryValue:@"UTF-8" forKey:@"oe"];
+
+ NSURL* received_ = [ builder URL ];
+
+ STAssertTrue( [ expected_ isEqual: received_ ], @"result URL mismatch" );
+}
+
+@end
View
2  DDURLBuilder/DDUrlBuilder/DDUrlBuilderTest/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
Please sign in to comment.
Something went wrong with that request. Please try again.