Skip to content

Commit

Permalink
Merge pull request #593 from norio-nomura/remove-fixme-sr-2290
Browse files Browse the repository at this point in the history
Remove workaround to SR-2290
  • Loading branch information
ikesyo authored Aug 14, 2018
2 parents 3ec20ed + 94e6bb0 commit f52c57e
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Sources/Nimble/Matchers/BeLogical.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ public func beTruthy<T: ExpressibleByBooleanLiteral & Equatable>() -> Predicate<
return Predicate.simpleNilable("be truthy") { actualExpression in
let actualValue = try actualExpression.evaluate()
if let actualValue = actualValue {
// FIXME: This is a workaround to SR-2290.
// See:
// - https://bugs.swift.org/browse/SR-2290
// - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873
if let number = actualValue as? NSNumber {
return PredicateStatus(bool: number.boolValue == true)
}

return PredicateStatus(bool: actualValue == (true as T))
}
return PredicateStatus(bool: actualValue != nil)
Expand All @@ -120,14 +112,6 @@ public func beFalsy<T: ExpressibleByBooleanLiteral & Equatable>() -> Predicate<T
return Predicate.simpleNilable("be falsy") { actualExpression in
let actualValue = try actualExpression.evaluate()
if let actualValue = actualValue {
// FIXME: This is a workaround to SR-2290.
// See:
// - https://bugs.swift.org/browse/SR-2290
// - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873
if let number = actualValue as? NSNumber {
return PredicateStatus(bool: number.boolValue == false)
}

return PredicateStatus(bool: actualValue == (false as T))
}
return PredicateStatus(bool: actualValue == nil)
Expand Down

0 comments on commit f52c57e

Please sign in to comment.