Skip to content

Commit

Permalink
Merge pull request #446 from Quick/xcode9-beta
Browse files Browse the repository at this point in the history
Xcode 9 Support (Swift 3.2)
  • Loading branch information
ikesyo authored Aug 3, 2017
2 parents 70279be + 74558cb commit 0c79c4e
Show file tree
Hide file tree
Showing 36 changed files with 93 additions and 65 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ matrix:
env: TYPE=tvos NIMBLE_RUNTIME_TVOS_SDK_VERSION=10.0
- os: osx
env: TYPE=macos
- os: osx
env: TYPE=macos
osx_image: xcode9
- os: osx
env: TYPE=swiftpm
- os: osx
env: TYPE=swiftpm
osx_image: xcode9
- os: linux
dist: trusty
sudo: required
Expand Down
38 changes: 25 additions & 13 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
1F5DF1851BDCA0F500C3A531 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1C1968AB07008ED995 /* Equal.swift */; };
1F5DF1861BDCA0F500C3A531 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1341B9E085700C7B8DA /* HaveCount.swift */; };
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EC19FE43C200E9D9FE /* Match.swift */; };
1F5DF1881BDCA0F500C3A531 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
1F5DF1891BDCA0F500C3A531 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
1F5DF18A1BDCA0F500C3A531 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; };
1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD251968AB07008ED995 /* Functional.swift */; };
Expand Down Expand Up @@ -296,8 +295,6 @@
1FD8CD591968AB07008ED995 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1B1968AB07008ED995 /* EndWith.swift */; };
1FD8CD5A1968AB07008ED995 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1C1968AB07008ED995 /* Equal.swift */; };
1FD8CD5B1968AB07008ED995 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1C1968AB07008ED995 /* Equal.swift */; };
1FD8CD5C1968AB07008ED995 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
1FD8CD5D1968AB07008ED995 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
1FD8CD5E1968AB07008ED995 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
1FD8CD5F1968AB07008ED995 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
1FD8CD6A1968AB07008ED995 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Async.swift */; };
Expand Down Expand Up @@ -386,6 +383,9 @@
CD79C9B51D2CC848004B6F9A /* ObjCUserDescriptionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 965B0D081B62B8ED0005AE66 /* ObjCUserDescriptionTest.m */; };
CD79C9B61D2CC848004B6F9A /* ObjCAllPassTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DDEFAEB31A93CBE6005CA37A /* ObjCAllPassTest.m */; };
CD79C9B71D2CC848004B6F9A /* ObjCSatisfyAnyOfTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B5358C11C39155600A23FAA /* ObjCSatisfyAnyOfTest.m */; };
CDD80B831F2030790002CD65 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
CDD80B841F20307A0002CD65 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
CDD80B851F20307B0002CD65 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
DA9E8C821A414BB9002633C2 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */; };
DA9E8C831A414BB9002633C2 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */; };
DD72EC641A93874A002F7651 /* AllPassTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD72EC631A93874A002F7651 /* AllPassTest.swift */; };
Expand Down Expand Up @@ -1170,33 +1170,33 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Jeff Hui";
TargetAttributes = {
1F1A74281940169200FFFC47 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
1F1A74331940169200FFFC47 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
TestTargetID = 1F1A74281940169200FFFC47;
};
1F5DF1541BDCA0CE00C3A531 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
1F5DF15D1BDCA0CE00C3A531 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
1F925EAC195C0D6300ED456B = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
1F925EB6195C0D6300ED456B = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
TestTargetID = 1F925EAC195C0D6300ED456B;
};
A8F2B2541E79A4AB005BDD17 = {
Expand Down Expand Up @@ -1332,6 +1332,7 @@
1F12BEE01E7791B9006952EC /* CwlCatchException.m in Sources */,
AE7ADE451C80BF8000B94CD3 /* MatchError.swift in Sources */,
1FC494AA1C29CBA40010975C /* NimbleEnvironment.swift in Sources */,
CDD80B841F20307A0002CD65 /* MatcherProtocols.swift in Sources */,
1FD8CD5E1968AB07008ED995 /* RaisesException.swift in Sources */,
1FD8CD561968AB07008ED995 /* Contain.swift in Sources */,
1FD8CD481968AB07008ED995 /* BeGreaterThanOrEqualTo.swift in Sources */,
Expand All @@ -1345,7 +1346,6 @@
1FD8CD521968AB07008ED995 /* BeNil.swift in Sources */,
1FD8CD6A1968AB07008ED995 /* Async.swift in Sources */,
1FD8CD581968AB07008ED995 /* EndWith.swift in Sources */,
1FD8CD5C1968AB07008ED995 /* MatcherProtocols.swift in Sources */,
1FD8CD341968AB07008ED995 /* DSL.swift in Sources */,
1F12BEDD1E7791B9006952EC /* CwlCatchException.swift in Sources */,
7B5358BE1C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
Expand Down Expand Up @@ -1432,7 +1432,6 @@
1F5DF1791BDCA0F500C3A531 /* BeCloseTo.swift in Sources */,
1F5DF16C1BDCA0F500C3A531 /* AssertionRecorder.swift in Sources */,
1F1871D71CA89EEF00A34BF2 /* NMBExceptionCapture.m in Sources */,
1F5DF1881BDCA0F500C3A531 /* MatcherProtocols.swift in Sources */,
1F5DF16E1BDCA0F500C3A531 /* NimbleXCTestHandler.swift in Sources */,
7A6AB2C61E7F628A00A2F694 /* ToSucceed.swift in Sources */,
1F5DF1751BDCA0F500C3A531 /* FailureMessage.swift in Sources */,
Expand Down Expand Up @@ -1478,6 +1477,7 @@
1F5DF1841BDCA0F500C3A531 /* EndWith.swift in Sources */,
1F5DF18D1BDCA0F500C3A531 /* SourceLocation.swift in Sources */,
1F5DF1701BDCA0F500C3A531 /* DSL.swift in Sources */,
CDD80B851F20307B0002CD65 /* MatcherProtocols.swift in Sources */,
1F5DF1721BDCA0F500C3A531 /* Expectation.swift in Sources */,
7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
7B13BA0C1DD361D300C9098C /* ContainElementSatisfying.swift in Sources */,
Expand Down Expand Up @@ -1598,6 +1598,7 @@
AE7ADE461C80BF8000B94CD3 /* MatchError.swift in Sources */,
1FC494AB1C29CBA40010975C /* NimbleEnvironment.swift in Sources */,
1FD8CD5F1968AB07008ED995 /* RaisesException.swift in Sources */,
CDD80B831F2030790002CD65 /* MatcherProtocols.swift in Sources */,
1FD8CD571968AB07008ED995 /* Contain.swift in Sources */,
7A0A26231E7F52360092A34E /* ToSucceed.swift in Sources */,
1FD8CD491968AB07008ED995 /* BeGreaterThanOrEqualTo.swift in Sources */,
Expand All @@ -1612,7 +1613,6 @@
1FD8CD6B1968AB07008ED995 /* Async.swift in Sources */,
964CFEFE1C4FF48900513336 /* ThrowAssertion.swift in Sources */,
1FD8CD591968AB07008ED995 /* EndWith.swift in Sources */,
1FD8CD5D1968AB07008ED995 /* MatcherProtocols.swift in Sources */,
1FD8CD351968AB07008ED995 /* DSL.swift in Sources */,
7B5358BF1C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
1F12BE9B1E778F70006952EC /* CwlDarwinDefinitions.swift in Sources */,
Expand Down Expand Up @@ -1751,14 +1751,20 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_MODULES_AUTOLINK = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -1807,14 +1813,20 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_MODULES_AUTOLINK = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
4 changes: 3 additions & 1 deletion Nimble.xcodeproj/xcshareddata/xcschemes/Nimble-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand All @@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand All @@ -46,6 +47,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 3 additions & 1 deletion Nimble.xcodeproj/xcshareddata/xcschemes/Nimble-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE
__attribute__((visibility("hidden")))
#endif
NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()) {
NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)) {
@try {
inBlock();
} @catch (NSException *exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[];
#if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE
__attribute__((visibility("hidden")))
#endif
NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)());
NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void));

6 changes: 3 additions & 3 deletions Sources/Nimble/Adapters/NMBExpectation.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE

fileprivate func from(objcPredicate: NMBPredicate) -> Predicate<NSObject> {
return Predicate { actualExpression in
Expand Down Expand Up @@ -36,7 +36,7 @@ public class NMBExpectation: NSObject {
internal let _line: UInt
internal var _timeout: TimeInterval = 1.0

public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) {
@objc public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) {
self._actualBlock = actualBlock
self._negative = negative
self._file = file
Expand Down Expand Up @@ -175,7 +175,7 @@ public class NMBExpectation: NSObject {

public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription }

public class func failWithMessage(_ message: String, file: FileString, line: UInt) {
@objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) {
fail(message, location: SourceLocation(file: file, line: line))
}
}
Expand Down
7 changes: 6 additions & 1 deletion Sources/Nimble/Adapters/NimbleXCTestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ private func recordFailure(_ message: String, location: SourceLocation) {
XCTFail("\(message)", file: location.file, line: location.line)
#else
if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase {
testCase.recordFailure(withDescription: message, inFile: location.file, atLine: location.line, expected: true)
#if swift(>=4)
let line = Int(location.line)
#else
let line = location.line
#endif
testCase.recordFailure(withDescription: message, inFile: location.file, atLine: line, expected: true)
} else {
let msg = "Attempted to report a test failure to XCTest while no test case was running. " +
"The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/AllPass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private func createPredicate<S>(_ elementMatcher: Predicate<S.Iterator.Element>)

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate {
@objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate {
return NMBPredicate { actualExpression in
let location = actualExpression.location
let actualValue = try! actualExpression.evaluate()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeAKindOf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public func beAKindOf(_ expectedClass: AnyClass) -> Predicate<NSObject> {
}

extension NMBObjCMatcher {
public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher {
@objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeAnInstanceOf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate<NSObject> {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher {
@objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Nimble/Matchers/BeCloseTo.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

internal let DefaultDelta = 0.0001
public let DefaultDelta = 0.0001

internal func isCloseTo(_ actualValue: NMBDoubleConvertible?,
expectedValue: NMBDoubleConvertible,
Expand Down Expand Up @@ -69,7 +69,7 @@ public class NMBObjCBeCloseToMatcher: NSObject, NMBMatcher {
}

extension NMBObjCMatcher {
public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher {
@objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher {
return NMBObjCBeCloseToMatcher(expected: expected, within: within)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeEmpty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public func beEmpty() -> Predicate<NMBCollection> {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beEmptyMatcher() -> NMBPredicate {
@objc public class func beEmptyMatcher() -> NMBPredicate {
return NMBPredicate { actualExpression in
let location = actualExpression.location
let actualValue = try! actualExpression.evaluate()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeGreaterThan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public func > (lhs: Expectation<NMBComparable>, rhs: NMBComparable?) {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
@objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
let expr = actualExpression.cast { $0 as? NMBComparable }
return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public func >=<T: NMBComparable>(lhs: Expectation<T>, rhs: T) {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
@objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
let expr = actualExpression.cast { $0 as? NMBComparable }
return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeIdenticalTo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public func be(_ expected: Any?) -> Predicate<Any> {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher {
@objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
let aExpr = actualExpression.cast { $0 as Any? }
return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nimble/Matchers/BeLessThan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public func < (lhs: Expectation<NMBComparable>, rhs: NMBComparable?) {

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
extension NMBObjCMatcher {
public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
@objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher {
return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in
let expr = actualExpression.cast { $0 as? NMBComparable }
return try! beLessThan(expected).matches(expr, failureMessage: failureMessage)
Expand Down
Loading

0 comments on commit 0c79c4e

Please sign in to comment.