From b88771821a3393a44c44e26225a8726943b4e99a Mon Sep 17 00:00:00 2001 From: Marius Ursache Date: Fri, 26 Feb 2016 22:00:40 +1100 Subject: Converted tests to XCTest Converted the unit tests from SenTestingKit to XCTest as SenTestingKit was deprecated a couple of SDK versions ago. --- .../xcshareddata/xcschemes/QueryKit.xcscheme | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Frameworks/QueryKit') diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme index fcff0831..57ddcc56 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme @@ -23,10 +23,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -39,24 +39,36 @@ + + + + + + Date: Mon, 29 Feb 2016 10:41:07 +1100 Subject: Revert Xcode xcscheme shuffling --- .../QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Frameworks/QueryKit') diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme index 57ddcc56..365be9e5 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme @@ -23,10 +23,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> @@ -43,11 +43,11 @@ Date: Mon, 29 Feb 2016 21:51:25 +1100 Subject: Updated project specs, per Xcode 7 suggestions --- .../QueryKit/QueryKit.xcodeproj/project.pbxproj | 23 +++++++++++++++++----- .../xcshareddata/xcschemes/QueryKit.xcscheme | 2 +- Frameworks/QueryKit/Resources/Info.plist | 2 +- Frameworks/QueryKit/Resources/Tests-Info.plist | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) (limited to 'Frameworks/QueryKit') diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj index 62059d07..f81e4a45 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj @@ -330,7 +330,7 @@ name = Tests; productName = Tests; productReference = 17E5969E14F307CE0054EE08 /* Tests.octest */; - productType = "com.apple.product-type.bundle"; + productType = "com.apple.product-type.bundle.ocunit-test"; }; 8DC2EF4F0486A6940098B216 /* QueryKit */ = { isa = PBXNativeTarget; @@ -357,7 +357,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0510; + LastUpgradeCheck = 0720; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "QueryKit" */; compatibilityVersion = "Xcode 3.2"; @@ -436,7 +436,6 @@ 17E5952D14F302740054EE08 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; @@ -444,8 +443,11 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; @@ -498,6 +500,7 @@ GCC_WARN_UNUSED_VALUE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit; PRODUCT_NAME = QueryKit; SKIP_INSTALL = YES; WARNING_CFLAGS = "-Wmost"; @@ -526,6 +529,7 @@ "-framework", SenTestingKit, ); + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; TEST_AFTER_BUILD = YES; WRAPPER_EXTENSION = octest; @@ -552,6 +556,7 @@ "-framework", SenTestingKit, ); + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; TEST_AFTER_BUILD = YES; WRAPPER_EXTENSION = octest; @@ -577,6 +582,7 @@ "-framework", SenTestingKit, ); + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; TEST_AFTER_BUILD = YES; WRAPPER_EXTENSION = octest; @@ -623,6 +629,7 @@ GENERATE_PKGINFO_FILE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit; PRODUCT_NAME = QueryKit; SKIP_INSTALL = YES; WARNING_CFLAGS = "-Wmost"; @@ -666,6 +673,7 @@ GCC_WARN_UNUSED_VALUE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit; PRODUCT_NAME = QueryKit; SKIP_INSTALL = YES; WARNING_CFLAGS = "-Wmost"; @@ -676,7 +684,6 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; @@ -684,8 +691,12 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; @@ -707,7 +718,6 @@ 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; @@ -715,8 +725,11 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme index 365be9e5..bbe02bce 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme @@ -1,6 +1,6 @@ CFBundleExecutable QueryKit CFBundleIdentifier - com.sequelpro.querykit + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/Frameworks/QueryKit/Resources/Tests-Info.plist b/Frameworks/QueryKit/Resources/Tests-Info.plist index add26ae7..ddbc4bf7 100644 --- a/Frameworks/QueryKit/Resources/Tests-Info.plist +++ b/Frameworks/QueryKit/Resources/Tests-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable Tests CFBundleIdentifier - com.sequelpro.querykit.tests + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType -- cgit v1.2.3 From 16831b8eb9e1947deb82118411acf0b8fd9862c8 Mon Sep 17 00:00:00 2001 From: Marius Ursache Date: Mon, 29 Feb 2016 21:55:05 +1100 Subject: Converted QueryKit tests from SenTestingKit to XCTest --- .../QueryKit/QueryKit.xcodeproj/project.pbxproj | 26 ++++++---------------- .../xcshareddata/xcschemes/QueryKit.xcscheme | 2 +- Frameworks/QueryKit/Tests/QKDeleteQueryTests.h | 4 ++-- Frameworks/QueryKit/Tests/QKDeleteQueryTests.m | 16 ++++++------- Frameworks/QueryKit/Tests/QKQueryTests.m | 24 ++++++++++---------- .../QueryKit/Tests/QKSelectQueryGroupByTests.h | 4 ++-- .../QueryKit/Tests/QKSelectQueryGroupByTests.m | 12 +++++----- .../QueryKit/Tests/QKSelectQueryOrderByTests.h | 4 ++-- .../QueryKit/Tests/QKSelectQueryOrderByTests.m | 16 ++++++------- Frameworks/QueryKit/Tests/QKSelectQueryTests.h | 4 ++-- Frameworks/QueryKit/Tests/QKSelectQueryTests.m | 16 ++++++------- Frameworks/QueryKit/Tests/QKTestCase.h | 4 ++-- Frameworks/QueryKit/Tests/QKUpdateQueryTests.h | 4 ++-- Frameworks/QueryKit/Tests/QKUpdateQueryTests.m | 14 ++++++------ 14 files changed, 69 insertions(+), 81 deletions(-) (limited to 'Frameworks/QueryKit') diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj index f81e4a45..4d1c2ef7 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj @@ -87,7 +87,7 @@ 17E5951E14F301DF0054EE08 /* QueryKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QueryKit.h; sourceTree = ""; }; 17E595F114F3058F0054EE08 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 17E5969814F307B70054EE08 /* QKSelectQueryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKSelectQueryTests.m; sourceTree = ""; }; - 17E5969E14F307CE0054EE08 /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 17E5969E14F307CE0054EE08 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 17E5969F14F307CE0054EE08 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Tests-Info.plist"; path = "Resources/Tests-Info.plist"; sourceTree = ""; }; 17F48BA615B27F6400C6455B /* QKQueryOrderBy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryOrderBy.h; sourceTree = ""; }; 17F48BA715B27F6400C6455B /* QKQueryOrderBy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQueryOrderBy.m; sourceTree = ""; }; @@ -123,7 +123,7 @@ isa = PBXGroup; children = ( 8DC2EF5B0486A6940098B216 /* QueryKit.framework */, - 17E5969E14F307CE0054EE08 /* Tests.octest */, + 17E5969E14F307CE0054EE08 /* Tests.xctest */, ); name = Products; sourceTree = ""; @@ -329,8 +329,8 @@ ); name = Tests; productName = Tests; - productReference = 17E5969E14F307CE0054EE08 /* Tests.octest */; - productType = "com.apple.product-type.bundle.ocunit-test"; + productReference = 17E5969E14F307CE0054EE08 /* Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; 8DC2EF4F0486A6940098B216 /* QueryKit */ = { isa = PBXNativeTarget; @@ -514,7 +514,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_MODEL_TUNING = G5; @@ -526,13 +526,9 @@ OTHER_LDFLAGS = ( "-framework", Cocoa, - "-framework", - SenTestingKit, ); PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; - TEST_AFTER_BUILD = YES; - WRAPPER_EXTENSION = octest; }; name = Debug; }; @@ -543,7 +539,7 @@ COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -553,13 +549,9 @@ OTHER_LDFLAGS = ( "-framework", Cocoa, - "-framework", - SenTestingKit, ); PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; - TEST_AFTER_BUILD = YES; - WRAPPER_EXTENSION = octest; ZERO_LINK = NO; }; name = Release; @@ -569,7 +561,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -579,13 +571,9 @@ OTHER_LDFLAGS = ( "-framework", Cocoa, - "-framework", - SenTestingKit, ); PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.querykit.tests; PRODUCT_NAME = Tests; - TEST_AFTER_BUILD = YES; - WRAPPER_EXTENSION = octest; }; name = Distribution; }; diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme index bbe02bce..b5c97922 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/xcshareddata/xcschemes/QueryKit.xcscheme @@ -33,7 +33,7 @@ diff --git a/Frameworks/QueryKit/Tests/QKDeleteQueryTests.h b/Frameworks/QueryKit/Tests/QKDeleteQueryTests.h index ef0e26ca..379fdaf4 100644 --- a/Frameworks/QueryKit/Tests/QKDeleteQueryTests.h +++ b/Frameworks/QueryKit/Tests/QKDeleteQueryTests.h @@ -29,10 +29,10 @@ #import "QKTestCase.h" #import -#import +#import @interface QKDeleteQueryTests : QKTestCase -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite; ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite; @end diff --git a/Frameworks/QueryKit/Tests/QKDeleteQueryTests.m b/Frameworks/QueryKit/Tests/QKDeleteQueryTests.m index 438f45dd..8862fee5 100644 --- a/Frameworks/QueryKit/Tests/QKDeleteQueryTests.m +++ b/Frameworks/QueryKit/Tests/QKDeleteQueryTests.m @@ -36,7 +36,7 @@ + (id)defaultTestSuite { - SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; [self addTestForDatabase:QKDatabaseUnknown withIdentifierQuote:EMPTY_STRING toTestSuite:testSuite]; [self addTestForDatabase:QKDatabaseMySQL withIdentifierQuote:QKMySQLIdentifierQuote toTestSuite:testSuite]; @@ -45,11 +45,11 @@ return [testSuite autorelease]; } -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite { for (NSInvocation *invocation in [self testInvocations]) { - SenTestCase *test = [[QKDeleteQueryTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; + XCTestCase *test = [[QKDeleteQueryTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; [testSuite addTest:test]; @@ -77,14 +77,14 @@ - (void)testDeleteQueryTypeIsCorrect { - STAssertTrue([[[self query] query] hasPrefix:@"DELETE"], nil); + XCTAssertTrue([[[self query] query] hasPrefix:@"DELETE"]); } - (void)testDeleteQueryFromTableIsCorrect { NSString *query = [NSString stringWithFormat:@"DELETE FROM %1$@%2$@%1$@", [self identifierQuote], QKTestTableName]; - STAssertTrue([[[self query] query] isEqualToString:query], nil); + XCTAssertTrue([[[self query] query] isEqualToString:query]); } - (void)testDeleteQueryFromDatabaseTableIsCorrect @@ -93,7 +93,7 @@ NSString *query = [NSString stringWithFormat:@"DELETE FROM %1$@%2$@%1$@.%1$@%3$@%1$@", [self identifierQuote], QKTestDatabaseName, QKTestTableName]; - STAssertTrue([[[self query] query] isEqualToString:query] , nil); + XCTAssertTrue([[[self query] query] isEqualToString:query] ); } - (void)testDeleteQueryWithSingleConstraintIsCorrect @@ -102,7 +102,7 @@ NSString *query = [NSString stringWithFormat:@"DELETE FROM %1$@%2$@%1$@ WHERE %1$@%3$@%1$@ %4$@ %5$@", [self identifierQuote], QKTestTableName, QKTestFieldOne, [QKQueryUtilities stringRepresentationOfQueryOperator:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]]; - STAssertTrue([[[self query] query] isEqualToString:query] , nil); + XCTAssertTrue([[[self query] query] isEqualToString:query] ); } - (void)testDeleteQueryWithMultipleConstraintsIsCorrect @@ -115,7 +115,7 @@ NSString *query = [NSString stringWithFormat:@"DELETE FROM %1$@%2$@%1$@ WHERE %1$@%3$@%1$@ %4$@ %5$@ AND %1$@%6$@%1$@ %7$@ '%8$@'", [self identifierQuote], QKTestTableName, QKTestFieldOne, opOne, [NSNumber numberWithUnsignedInteger:QKTestParameterOne], QKTestFieldTwo, opTwo, QKTestParameterTwo]; - STAssertTrue([[[self query] query] isEqualToString:query] , nil); + XCTAssertTrue([[[self query] query] isEqualToString:query] ); } @end diff --git a/Frameworks/QueryKit/Tests/QKQueryTests.m b/Frameworks/QueryKit/Tests/QKQueryTests.m index 0043e607..2064fad6 100644 --- a/Frameworks/QueryKit/Tests/QKQueryTests.m +++ b/Frameworks/QueryKit/Tests/QKQueryTests.m @@ -30,7 +30,7 @@ #import "QKTestCase.h" #import -#import +#import @interface QKQueryTests : QKTestCase @end @@ -68,19 +68,19 @@ { [[self query] clear]; - STAssertNil([[self query] table], @"query table"); - STAssertNil([[self query] database], @"query database"); + XCTAssertNil([[self query] table], @"query table"); + XCTAssertNil([[self query] database], @"query database"); - STAssertTrue([[self query] useQuotedIdentifiers], @"query use quoted identifiers"); - STAssertTrue([[[self query] identifierQuote] isEqualToString:EMPTY_STRING], @"query identifier quote"); - STAssertTrue([[[self query] fields] count] == 0, @"query fields"); - STAssertTrue([[[self query] parameters] count] == 0, @"query parameters"); - STAssertTrue([[[self query] updateParameters] count] == 0, @"query update parameters"); - STAssertTrue([[[self query] groupByFields] count] == 0, @"query group by fields"); - STAssertTrue([[[self query] orderByFields] count] == 0, @"query order by fields"); + XCTAssertTrue([[self query] useQuotedIdentifiers], @"query use quoted identifiers"); + XCTAssertTrue([[[self query] identifierQuote] isEqualToString:EMPTY_STRING], @"query identifier quote"); + XCTAssertTrue([[[self query] fields] count] == 0, @"query fields"); + XCTAssertTrue([[[self query] parameters] count] == 0, @"query parameters"); + XCTAssertTrue([[[self query] updateParameters] count] == 0, @"query update parameters"); + XCTAssertTrue([[[self query] groupByFields] count] == 0, @"query group by fields"); + XCTAssertTrue([[[self query] orderByFields] count] == 0, @"query order by fields"); - STAssertEquals([[self query] queryType], QKUnknownQuery, @"query type"); - STAssertEquals([[self query] queryDatabase], QKDatabaseUnknown, @"query database"); + XCTAssertEqual([[self query] queryType], QKUnknownQuery, @"query type"); + XCTAssertEqual([[self query] queryDatabase], QKDatabaseUnknown, @"query database"); } @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h index 9a1349d8..f7966a66 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h @@ -29,10 +29,10 @@ #import "QKTestCase.h" #import -#import +#import @interface QKSelectQueryGroupByTests : QKTestCase -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite; ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite; @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m index d8e627bc..76aa1a80 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m @@ -36,7 +36,7 @@ + (id)defaultTestSuite { - SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; [self addTestForDatabase:QKDatabaseUnknown withIdentifierQuote:EMPTY_STRING toTestSuite:testSuite]; [self addTestForDatabase:QKDatabaseMySQL withIdentifierQuote:QKMySQLIdentifierQuote toTestSuite:testSuite]; @@ -45,11 +45,11 @@ return [testSuite autorelease]; } -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite { for (NSInvocation *invocation in [self testInvocations]) { - SenTestCase *test = [[QKSelectQueryGroupByTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; + XCTestCase *test = [[QKSelectQueryGroupByTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; [testSuite addTest:test]; @@ -78,7 +78,7 @@ - (void)testSelectQueryTypeIsCorrect { - STAssertTrue([[[self query] query] hasPrefix:@"SELECT"], nil); + XCTAssertTrue([[[self query] query] hasPrefix:@"SELECT"]); } - (void)testSelectQueryGroupByIsCorrect @@ -87,7 +87,7 @@ NSString *query = [NSString stringWithFormat:@"GROUP BY %1$@%2$@%1$@", [self identifierQuote], QKTestFieldOne]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } - (void)testSelectQueryGroupByMultipleFieldsIsCorrect @@ -96,7 +96,7 @@ NSString *query = [NSString stringWithFormat:@"GROUP BY %1$@%2$@%1$@, %1$@%3$@%1$@", [self identifierQuote], QKTestFieldOne, QKTestFieldTwo]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h index efd7eb2f..ffca6929 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h @@ -29,10 +29,10 @@ #import "QKTestCase.h" #import -#import +#import @interface QKSelectQueryOrderByTests : QKTestCase -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite; ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite; @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m index b6847d11..a1be1d0c 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m @@ -36,7 +36,7 @@ + (id)defaultTestSuite { - SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; [self addTestForDatabase:QKDatabaseUnknown withIdentifierQuote:EMPTY_STRING toTestSuite:testSuite]; [self addTestForDatabase:QKDatabaseMySQL withIdentifierQuote:QKMySQLIdentifierQuote toTestSuite:testSuite]; @@ -45,11 +45,11 @@ return [testSuite autorelease]; } -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite { for (NSInvocation *invocation in [self testInvocations]) { - SenTestCase *test = [[QKSelectQueryOrderByTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; + XCTestCase *test = [[QKSelectQueryOrderByTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; [testSuite addTest:test]; @@ -78,7 +78,7 @@ - (void)testSelectQueryTypeIsCorrect { - STAssertTrue([[[self query] query] hasPrefix:@"SELECT"], nil); + XCTAssertTrue([[[self query] query] hasPrefix:@"SELECT"]); } - (void)testSelectQueryOrderByAscendingIsCorrect @@ -87,7 +87,7 @@ NSString *query = [NSString stringWithFormat:@"ORDER BY %1$@%2$@%1$@ ASC", [self identifierQuote], QKTestFieldOne]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } - (void)testSelectQueryOrderByMultipleFieldsAscendingIsCorrect @@ -97,7 +97,7 @@ NSString *query = [NSString stringWithFormat:@"ORDER BY %1$@%2$@%1$@ ASC, %1$@%3$@%1$@ ASC", [self identifierQuote], QKTestFieldOne, QKTestFieldTwo]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } - (void)testSelectQueryOrderByDescendingIsCorrect @@ -106,7 +106,7 @@ NSString *query = [NSString stringWithFormat:@"ORDER BY %1$@%2$@%1$@ DESC", [self identifierQuote], QKTestFieldOne]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } - (void)testSelectQueryOrderByMultipleFieldsDescendingIsCorrect @@ -116,7 +116,7 @@ NSString *query = [NSString stringWithFormat:@"ORDER BY %1$@%2$@%1$@ DESC, %1$@%3$@%1$@ DESC", [self identifierQuote], QKTestFieldOne, QKTestFieldTwo]; - STAssertTrue([[[self query] query] hasSuffix:query], nil); + XCTAssertTrue([[[self query] query] hasSuffix:query]); } @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryTests.h index 5845ad06..43eda806 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryTests.h @@ -29,10 +29,10 @@ #import "QKTestCase.h" #import -#import +#import @interface QKSelectQueryTests : QKTestCase -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite; ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite; @end diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryTests.m index 0f1153c6..ec5328be 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryTests.m @@ -36,7 +36,7 @@ + (id)defaultTestSuite { - SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; [self addTestForDatabase:QKDatabaseUnknown withIdentifierQuote:EMPTY_STRING toTestSuite:testSuite]; [self addTestForDatabase:QKDatabaseMySQL withIdentifierQuote:QKMySQLIdentifierQuote toTestSuite:testSuite]; @@ -45,11 +45,11 @@ return [testSuite autorelease]; } -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite { for (NSInvocation *invocation in [self testInvocations]) { - SenTestCase *test = [[QKSelectQueryTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; + XCTestCase *test = [[QKSelectQueryTests alloc] initWithInvocation:invocation database:database identifierQuote:quote]; [testSuite addTest:test]; @@ -82,14 +82,14 @@ - (void)testSelectQueryTypeIsCorrect { - STAssertTrue([[[self query] query] hasPrefix:@"SELECT"], nil); + XCTAssertTrue([[[self query] query] hasPrefix:@"SELECT"]); } - (void)testSelectQueryFieldIsCorrect { NSString *query = [NSString stringWithFormat:@"SELECT %1$@%2$@%1$@", [self identifierQuote], QKTestFieldOne]; - STAssertTrue([[[self query] query] hasPrefix:query], nil); + XCTAssertTrue([[[self query] query] hasPrefix:query]); } - (void)testSelectQueryFromDatabaseAndTableIsCorrect @@ -98,21 +98,21 @@ NSString *query = [NSString stringWithFormat:@"FROM %1$@%2$@%1$@.%1$@%3$@%1$@", [self identifierQuote], QKTestDatabaseName, QKTestTableName]; - STAssertTrue([[[self query] query] rangeOfString:query].location != NSNotFound, nil); + XCTAssertTrue([[[self query] query] rangeOfString:query].location != NSNotFound); } - (void)testSelectQueryMultipleFieldsAreCorrect { NSString *query = [NSString stringWithFormat:@"SELECT %1$@%2$@%1$@, %1$@%3$@%1$@, %1$@%4$@%1$@, %1$@%5$@%1$@", [self identifierQuote], QKTestFieldOne, QKTestFieldTwo, QKTestFieldThree, QKTestFieldFour]; - STAssertTrue([[[self query] query] hasPrefix:query], nil); + XCTAssertTrue([[[self query] query] hasPrefix:query]); } - (void)testSelectQueryConstraintsAreCorrect { NSString *query = [NSString stringWithFormat:@"WHERE %1$@%2$@%1$@ %3$@ %4$@", [self identifierQuote], QKTestFieldOne, [QKQueryUtilities stringRepresentationOfQueryOperator:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]]; - STAssertTrue(([[[self query] query] rangeOfString:query].location != NSNotFound), nil); + XCTAssertTrue(([[[self query] query] rangeOfString:query].location != NSNotFound)); } @end diff --git a/Frameworks/QueryKit/Tests/QKTestCase.h b/Frameworks/QueryKit/Tests/QKTestCase.h index 47efec04..baa4f050 100644 --- a/Frameworks/QueryKit/Tests/QKTestCase.h +++ b/Frameworks/QueryKit/Tests/QKTestCase.h @@ -27,9 +27,9 @@ // OTHER DEALINGS IN THE SOFTWARE. #import -#import +#import -@interface QKTestCase : SenTestCase +@interface QKTestCase : XCTestCase { @private QKQuery *_query; diff --git a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h index aede8979..7c3ea7c5 100644 --- a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h +++ b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h @@ -29,10 +29,10 @@ #import "QKTestCase.h" #import -#import +#import @interface QKUpdateQueryTests : QKTestCase -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite; ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite; @end diff --git a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m index 1beff6d5..039840bb 100644 --- a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m +++ b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m @@ -36,7 +36,7 @@ + (id)defaultTestSuite { - SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; [self addTestForDatabase:QKDatabaseUnknown withIdentifierQuote:EMPTY_STRING toTestSuite:testSuite]; [self addTestForDatabase:QKDatabaseMySQL withIdentifierQuote:QKMySQLIdentifierQuote toTestSuite:testSuite]; @@ -45,11 +45,11 @@ return [testSuite autorelease]; } -+ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(SenTestSuite *)testSuite ++ (void)addTestForDatabase:(QKQueryDatabase)database withIdentifierQuote:(NSString *)quote toTestSuite:(XCTestSuite *)testSuite { for (NSInvocation *invocation in [self testInvocations]) { - SenTestCase *test = [[NSClassFromString(@"QKUpdateQueryTests") alloc] initWithInvocation:invocation database:database identifierQuote:quote]; + XCTestCase *test = [[NSClassFromString(@"QKUpdateQueryTests") alloc] initWithInvocation:invocation database:database identifierQuote:quote]; [testSuite addTest:test]; @@ -81,7 +81,7 @@ - (void)testUpdateQueryTypeIsCorrect { - STAssertTrue([[[self query] query] hasPrefix:@"UPDATE"], nil); + XCTAssertTrue([[[self query] query] hasPrefix:@"UPDATE"]); } - (void)testUpdateQueryUsingDatabaseAndTableIsCorrect @@ -90,21 +90,21 @@ NSString *query = [NSString stringWithFormat:@"UPDATE %1$@%2$@%1$@.%1$@%3$@%1$@", [self identifierQuote], QKTestDatabaseName, QKTestTableName]; - STAssertTrue([[[self query] query] hasPrefix:query], nil); + XCTAssertTrue([[[self query] query] hasPrefix:query]); } - (void)testUpdateQueryFieldsAreCorrect { NSString *query = [NSString stringWithFormat:@"UPDATE %1$@%2$@%1$@ SET %1$@%3$@%1$@ = '%4$@', %1$@%5$@%1$@ = '%6$@'", [self identifierQuote], QKTestTableName, QKTestFieldOne, QKTestUpdateValueOne, QKTestFieldTwo, QKTestUpdateValueTwo]; - STAssertTrue([[[self query] query] hasPrefix:query], nil); + XCTAssertTrue([[[self query] query] hasPrefix:query]); } - (void)testUpdateQueryConstraintIsCorrect { NSString *query = [NSString stringWithFormat:@"WHERE %1$@%2$@%1$@ %3$@ %4$@", [self identifierQuote], QKTestFieldOne, [QKQueryUtilities stringRepresentationOfQueryOperator:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]]; - STAssertTrue(([[[self query] query] rangeOfString:query].location != NSNotFound), nil); + XCTAssertTrue(([[[self query] query] rangeOfString:query].location != NSNotFound)); } @end -- cgit v1.2.3 From 722a7a0438224fed3d9a711c211608503d956a2e Mon Sep 17 00:00:00 2001 From: Marius Ursache Date: Mon, 29 Feb 2016 21:59:39 +1100 Subject: Restored archs flag to build settings --- Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Frameworks/QueryKit') diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj index 4d1c2ef7..52ef1774 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj @@ -436,6 +436,7 @@ 17E5952D14F302740054EE08 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; @@ -672,6 +673,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; @@ -706,6 +708,7 @@ 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_STATIC_ANALYZER_MODE = deep; CLANG_WARN_BOOL_CONVERSION = YES; -- cgit v1.2.3