* Add XCTest Target

* Use xctool
This commit is contained in:
Felix Schulze 2013-11-18 21:36:09 +01:00
parent 36beebc1ac
commit e606ec1e0f
6 changed files with 259 additions and 3 deletions

View File

@ -19,9 +19,24 @@
533ED32C1528C53B0005C6FA /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 533ED32A1528C53B0005C6FA /* libcrypto.a */; };
533ED32D1528C53B0005C6FA /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 533ED32B1528C53B0005C6FA /* libssl.a */; };
534FB2AE180975D700B5F868 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 534FB2AD180975D700B5F868 /* Icons.xcassets */; };
53572A4D183AAFFE00B21832 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53572A4C183AAFFE00B21832 /* XCTest.framework */; };
53572A4E183AAFFE00B21832 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 533ED3011528C4840005C6FA /* Foundation.framework */; };
53572A4F183AAFFE00B21832 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 533ED2FF1528C4840005C6FA /* UIKit.framework */; };
53572A55183AAFFE00B21832 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 53572A53183AAFFE00B21832 /* InfoPlist.strings */; };
53572A57183AAFFE00B21832 /* FSOpenSSLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53572A56183AAFFE00B21832 /* FSOpenSSLTests.m */; };
D1E978031547EE765CD39AD2 /* FSOpenSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = D1E97EE2A904D58DAE4231E2 /* FSOpenSSL.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
53572A59183AAFFE00B21832 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 533ED2F21528C4840005C6FA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 533ED2FA1528C4840005C6FA;
remoteInfo = "OpenSSL-for-iOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
533ED2FB1528C4840005C6FA /* OpenSSL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenSSL.app; sourceTree = BUILT_PRODUCTS_DIR; };
533ED2FF1528C4840005C6FA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@ -40,6 +55,12 @@
533ED32A1528C53B0005C6FA /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = lib/libcrypto.a; sourceTree = "<group>"; };
533ED32B1528C53B0005C6FA /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = lib/libssl.a; sourceTree = "<group>"; };
534FB2AD180975D700B5F868 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = "<group>"; };
53572A4B183AAFFE00B21832 /* OpenSSL-for-iOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OpenSSL-for-iOS_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
53572A4C183AAFFE00B21832 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
53572A52183AAFFE00B21832 /* OpenSSL-for-iOS_Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OpenSSL-for-iOS_Tests-Info.plist"; sourceTree = "<group>"; };
53572A54183AAFFE00B21832 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
53572A56183AAFFE00B21832 /* FSOpenSSLTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSOpenSSLTests.m; sourceTree = "<group>"; };
53572A58183AAFFE00B21832 /* OpenSSL-for-iOS_Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OpenSSL-for-iOS_Tests-Prefix.pch"; sourceTree = "<group>"; };
D1E979D803ACC127411934DC /* FSOpenSSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSOpenSSL.h; sourceTree = "<group>"; };
D1E97EE2A904D58DAE4231E2 /* FSOpenSSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSOpenSSL.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -57,6 +78,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
53572A48183AAFFE00B21832 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
53572A4D183AAFFE00B21832 /* XCTest.framework in Frameworks */,
53572A4F183AAFFE00B21832 /* UIKit.framework in Frameworks */,
53572A4E183AAFFE00B21832 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -64,6 +95,7 @@
isa = PBXGroup;
children = (
533ED3051528C4840005C6FA /* OpenSSL-for-iOS */,
53572A50183AAFFE00B21832 /* OpenSSL-for-iOS_Tests */,
533ED2FE1528C4840005C6FA /* Frameworks */,
533ED2FC1528C4840005C6FA /* Products */,
);
@ -73,6 +105,7 @@
isa = PBXGroup;
children = (
533ED2FB1528C4840005C6FA /* OpenSSL.app */,
53572A4B183AAFFE00B21832 /* OpenSSL-for-iOS_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -85,6 +118,7 @@
533ED2FF1528C4840005C6FA /* UIKit.framework */,
533ED3011528C4840005C6FA /* Foundation.framework */,
533ED3031528C4840005C6FA /* CoreGraphics.framework */,
53572A4C183AAFFE00B21832 /* XCTest.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -117,6 +151,25 @@
name = "Supporting Files";
sourceTree = "<group>";
};
53572A50183AAFFE00B21832 /* OpenSSL-for-iOS_Tests */ = {
isa = PBXGroup;
children = (
53572A56183AAFFE00B21832 /* FSOpenSSLTests.m */,
53572A51183AAFFE00B21832 /* Supporting Files */,
);
path = "OpenSSL-for-iOS_Tests";
sourceTree = "<group>";
};
53572A51183AAFFE00B21832 /* Supporting Files */ = {
isa = PBXGroup;
children = (
53572A52183AAFFE00B21832 /* OpenSSL-for-iOS_Tests-Info.plist */,
53572A53183AAFFE00B21832 /* InfoPlist.strings */,
53572A58183AAFFE00B21832 /* OpenSSL-for-iOS_Tests-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -137,6 +190,24 @@
productReference = 533ED2FB1528C4840005C6FA /* OpenSSL.app */;
productType = "com.apple.product-type.application";
};
53572A4A183AAFFE00B21832 /* OpenSSL-for-iOS_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 53572A5D183AAFFE00B21832 /* Build configuration list for PBXNativeTarget "OpenSSL-for-iOS_Tests" */;
buildPhases = (
53572A47183AAFFE00B21832 /* Sources */,
53572A48183AAFFE00B21832 /* Frameworks */,
53572A49183AAFFE00B21832 /* Resources */,
);
buildRules = (
);
dependencies = (
53572A5A183AAFFE00B21832 /* PBXTargetDependency */,
);
name = "OpenSSL-for-iOS_Tests";
productName = "OpenSSL-for-iOS_Tests";
productReference = 53572A4B183AAFFE00B21832 /* OpenSSL-for-iOS_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -145,6 +216,11 @@
attributes = {
LastUpgradeCheck = 0430;
ORGANIZATIONNAME = Immobilienscout24;
TargetAttributes = {
53572A4A183AAFFE00B21832 = {
TestTargetID = 533ED2FA1528C4840005C6FA;
};
};
};
buildConfigurationList = 533ED2F51528C4840005C6FA /* Build configuration list for PBXProject "OpenSSL-for-iOS" */;
compatibilityVersion = "Xcode 3.2";
@ -159,6 +235,7 @@
projectRoot = "";
targets = (
533ED2FA1528C4840005C6FA /* OpenSSL-for-iOS */,
53572A4A183AAFFE00B21832 /* OpenSSL-for-iOS_Tests */,
);
};
/* End PBXProject section */
@ -175,6 +252,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
53572A49183AAFFE00B21832 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
53572A55183AAFFE00B21832 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -189,8 +274,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
53572A47183AAFFE00B21832 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
53572A57183AAFFE00B21832 /* FSOpenSSLTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
53572A5A183AAFFE00B21832 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 533ED2FA1528C4840005C6FA /* OpenSSL-for-iOS */;
targetProxy = 53572A59183AAFFE00B21832 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
533ED3081528C4840005C6FA /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
@ -216,6 +317,14 @@
name = ViewController_iPad.xib;
sourceTree = "<group>";
};
53572A53183AAFFE00B21832 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
53572A54183AAFFE00B21832 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@ -225,7 +334,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@ -252,7 +360,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
@ -302,6 +409,80 @@
};
name = Release;
};
53572A5B183AAFFE00B21832 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/OpenSSL.app/OpenSSL";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Info.plist";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Debug;
};
53572A5C183AAFFE00B21832 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/OpenSSL.app/OpenSSL";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_NS_ASSERTIONS = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Prefix.pch";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "OpenSSL-for-iOS_Tests/OpenSSL-for-iOS_Tests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -323,6 +504,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
53572A5D183AAFFE00B21832 /* Build configuration list for PBXNativeTarget "OpenSSL-for-iOS_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
53572A5B183AAFFE00B21832 /* Debug */,
53572A5C183AAFFE00B21832 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 533ED2F21528C4840005C6FA /* Project object */;

View File

@ -0,0 +1,33 @@
//
// OpenSSL_for_iOS_Tests.m
// OpenSSL-for-iOS_Tests
//
// Created by Felix Schulze on 18.11.2013.
// Copyright (c) 2013 Felix Schulze . All rights reserved.
// Web: http://www.felixschulze.de
//
#import <XCTest/XCTest.h>
#import "FSOpenSSL.h"
@interface FSOpenSSLTests : XCTestCase
@end
@implementation FSOpenSSLTests
- (void)setUp
{
[super setUp];
}
- (void)tearDown
{
[super tearDown];
}
- (void)testMD5
{
XCTAssertEqualObjects([FSOpenSSL md5FromString:@"test string"], @"6f8db599de986fab7a21625b7916589c");
}
@end

View File

@ -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>de.felixschulze.${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 File

@ -0,0 +1,10 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View File

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@ -1,4 +1,4 @@
#!/bin/sh
echo "Build"
xcodebuild -project OpenSSL-for-iOS.xcodeproj
xctool -project OpenSSL-for-iOS.xcodeproj -scheme OpenSSL-for-iOS -sdk iphonesimulator clean build