 
 internal let DefaultDelta = 0.0001
 
-internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool {
-    failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))"
-    failureMessage.actualValue = "<\(stringify(actualValue))>"
-    return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta
+internal func isCloseTo(_ actualValue: NMBDoubleConvertible?,
+                        expectedValue: NMBDoubleConvertible,
+                        delta: Double)
+    -> (Satisfiability, ExpectationMessage) {
+        let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))"
+        return (
+            Satisfiability(bool: actualValue != nil &&
+                abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta),
+            .ExpectedValueTo(errorMessage, "<\(stringify(actualValue))>")
+        )
 }
 
 /// A Nimble matcher that succeeds when a value is close to another. This is used for floating

///
/// @see equal
public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> Predicate<NMBDoubleConvertible> {
    return Predicate.fromBoolResult { actualExpression, failureMessage in
        return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage)
    }.requireNonNil
}

#if _runtime(_ObjC)

///
/// @see equal
public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> Predicate<Double> {
    return Predicate.define { actualExpression -> (Satisfiability, ExpectationMessage) in
        return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta)
    }
}

/// A Nimble matcher that succeeds when a value is close to another. This is used for floating
