From bc500e06a7363f8fae4a7b4cceafdb4c96df8809 Mon Sep 17 00:00:00 2001 From: Andrey Ostanin Date: Wed, 3 Apr 2019 09:21:21 +0300 Subject: [PATCH] Fixes build for Xcode 10.1 and Swift 4.x --- Sources/Nimble/Matchers/BeResult.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Nimble/Matchers/BeResult.swift b/Sources/Nimble/Matchers/BeResult.swift index c095273c4..a74fd2859 100644 --- a/Sources/Nimble/Matchers/BeResult.swift +++ b/Sources/Nimble/Matchers/BeResult.swift @@ -5,6 +5,7 @@ import Foundation /// /// You can pass a closure to do any arbitrary custom matching /// to the value inside result. The closure only gets called when result is success. +#if swift(>=5) @available(swift 5) public func beSuccess(test: ((T) -> Void)? = nil) -> Predicate> { return Predicate.define("be ") { expression, message in @@ -33,3 +34,4 @@ public func beFailure(test: ((Error) -> Void)? = nil) -> Predicate