Skip to content

Commit 43c5955

Browse files
committed
[XCTestCase] Don't check equality with boolean
Rather than checking equality with false, this condition could be expressed more succinctly with if `!failure.expected`.
1 parent 3bab9bd commit 43c5955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

XCTest/XCTestCase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extension XCTestCase {
5858
for failure in XCTCurrentFailures {
5959
failure.emit(method)
6060
totalFailures++
61-
if failure.expected == false {
61+
if !failure.expected {
6262
unexpectedFailures++
6363
}
6464
}

0 commit comments

Comments
 (0)