From 1ad1d8cc9cb6821711b7c9c2d3cdc48194177185 Mon Sep 17 00:00:00 2001 From: Chris Dillard Date: Wed, 26 Sep 2018 11:39:08 -0600 Subject: [PATCH] Swift 4.2 / Xcode 10 travis changes --- .ruby-version | 2 +- .travis.yml | 6 +-- MetovaTestKit.xcodeproj/project.pbxproj | 7 +++- .../ExceptionTestingTests.swift | 40 +++++++++---------- Podfile.lock | 2 +- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/.ruby-version b/.ruby-version index 276cbf9..2bf1c1c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.0 +2.3.1 diff --git a/.travis.yml b/.travis.yml index 51cdd23..7c0ee0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ language: objective-c -osx_image: xcode9 +osx_image: xcode10 env: global: - LC_CTYPE=en_US.UTF-8 - LANG=en_US.UTF-8 - WORKSPACE=MetovaTestKit.xcworkspace - IOS_FRAMEWORK_SCHEME="MetovaTestKit" - - IOS_SDK=iphonesimulator11.0 + - IOS_SDK=iphonesimulator12.0 matrix: - - DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES" + - DESTINATION="OS=12.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES" before_install: - bundle install --without=documentation - bundle exec pod repo update diff --git a/MetovaTestKit.xcodeproj/project.pbxproj b/MetovaTestKit.xcodeproj/project.pbxproj index 639d8d8..a6c8b2b 100644 --- a/MetovaTestKit.xcodeproj/project.pbxproj +++ b/MetovaTestKit.xcodeproj/project.pbxproj @@ -612,13 +612,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MetovaTestKit-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -849,6 +852,7 @@ 4A3CFF0F1CDD5F37003EF6F0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = YES; INFOPLIST_FILE = MetovaTestKitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = metova.MetovaTestKitTests; @@ -860,6 +864,7 @@ 4A3CFF101CDD5F37003EF6F0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = YES; INFOPLIST_FILE = MetovaTestKitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = metova.MetovaTestKitTests; diff --git a/MetovaTestKitTests/ExceptionTestingTests.swift b/MetovaTestKitTests/ExceptionTestingTests.swift index 09e69f4..2c7cc59 100644 --- a/MetovaTestKitTests/ExceptionTestingTests.swift +++ b/MetovaTestKitTests/ExceptionTestingTests.swift @@ -40,8 +40,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertNoException(message: "TEST MESSAGE") { didReachEnd = false - let arr: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] - arr.object(at: 3) + let array: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] + array.object(at: 3) didReachEnd = true } @@ -61,8 +61,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertNoException { didReachEnd = false - let arr: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] - arr.object(at: 3) + let array: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] + array.object(at: 3) didReachEnd = true } @@ -87,8 +87,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertNoException(message: message) { didReachEnd = false - let arr: NSArray = [] - arr.object(at: 3) + let array: NSArray = [] + array.object(at: 3) didReachEnd = true } @@ -114,8 +114,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertNoException { didReachEnd = false - let arr: NSArray = [] - arr.object(at: 3) + let array: NSArray = [] + array.object(at: 3) didReachEnd = true } @@ -132,8 +132,8 @@ class ExceptionTestingTests: MTKBaseTestCase { func testAssertNoExceptionReturnsNilWhenPassing() { let exception = MTKAssertNoException { - let arr: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] - arr.object(at: 3) + let array: NSArray = [0, 1, 3, 4, 5, 6, 7, 8, 9, 10] + array.object(at: 3) } XCTAssertNil(exception) @@ -146,8 +146,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertException(message: "TEST MESSAGE") { didReachEnd = false - let arr = NSArray() - arr.object(at: 3) + let array = NSArray() + array.object(at: 3) didReachEnd = true } @@ -167,8 +167,8 @@ class ExceptionTestingTests: MTKBaseTestCase { MTKAssertException { didReachEnd = false - let arr = NSArray() - arr.object(at: 3) + let array = NSArray() + array.object(at: 3) didReachEnd = true } @@ -194,8 +194,8 @@ class ExceptionTestingTests: MTKBaseTestCase { didReachEnd = false - let arr: NSArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - arr.object(at: 3) + let array: NSArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + array.object(at: 3) didReachEnd = true } @@ -222,8 +222,8 @@ class ExceptionTestingTests: MTKBaseTestCase { didReachEnd = false - let arr: NSArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - arr.object(at: 3) + let array: NSArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + array.object(at: 3) didReachEnd = true } @@ -240,8 +240,8 @@ class ExceptionTestingTests: MTKBaseTestCase { func testAssertExceptionCatchesCorrectException() { let throwingBlock = { - let arr = NSArray() - arr.object(at: 3) + let array = NSArray() + array.object(at: 3) } guard let exception = MTKAssertException(testBlock: throwingBlock) else { diff --git a/Podfile.lock b/Podfile.lock index cc4d70f..b32a2a8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -9,4 +9,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: d5607466d3d3e3deae872088ea7e172451978d1e -COCOAPODS: 1.2.1 +COCOAPODS: 1.4.0