Skip to content

Commit

Permalink
Merge pull request #431 from Quick/as-swift-4-swift-3-compat
Browse files Browse the repository at this point in the history
Test in Swift 3 compatibility mode
  • Loading branch information
jeffh authored Jun 3, 2017
2 parents 40e892c + 10eaf54 commit 4cfe93e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode8
osx_image: xcode8.3
language: generic
matrix:
include:
Expand Down
8 changes: 2 additions & 6 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1352,13 +1352,7 @@
1FD8CD381968AB07008ED995 /* Expression.swift in Sources */,
1FD8CD3A1968AB07008ED995 /* FailureMessage.swift in Sources */,
472FD1351B9E085700C7B8DA /* HaveCount.swift in Sources */,
9630C0301C6D139F000693EE /* CwlDarwinDefinitions.swift in Sources */,
1FA0C4001E30B14500623165 /* Predicate.swift in Sources */,
9630C0231C6D0B82000693EE /* mach_excServer.c in Sources */,
9630C01F1C6D0B2F000693EE /* CwlCatchException.swift in Sources */,
9630C0131C6D0B18000693EE /* CwlCatchBadInstruction.swift in Sources */,
9630C01C1C6D0B2F000693EE /* CwlCatchException.m in Sources */,
9630C02C1C6D125F000693EE /* CwlBadInstructionException.swift in Sources */,
964CFEFD1C4FF48900513336 /* ThrowAssertion.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1794,6 +1788,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.9;
METAL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
Expand Down Expand Up @@ -1842,6 +1837,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
METAL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "$(inherited) -swift-version 3";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
Expand Down
8 changes: 5 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// swift-tools-version:3.0

import PackageDescription

let package = Package(
name: "Nimble",
exclude: [
"Sources/Lib",
"Sources/NimbleObjectiveC",
"Tests/NimbleTests/objc",
"Sources/Lib",
"Sources/NimbleObjectiveC",
"Tests/NimbleTests/objc",
]
)
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/AllPass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension NMBObjCMatcher {

var collectionIsUsable = true
if let value = actualValue as? NSFastEnumeration {
let generator = NSFastEnumerationIterator(value)
var generator = NSFastEnumerationIterator(value)
while let obj = generator.next() {
if let nsObject = obj as? NSObject {
nsObjects.append(nsObject)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/ContainElementSatisfying.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public func containElementSatisfying<S: Sequence, T>(_ predicate: @escaping ((T)
return false
}

let iterator = NSFastEnumerationIterator(enumeration)
var iterator = NSFastEnumerationIterator(enumeration)
while let item = iterator.next() {
guard let object = item as? NSObject else {
continue
Expand Down

0 comments on commit 4cfe93e

Please sign in to comment.