Skip to content

Commit 165f55b

Browse files
committed
Update TestNSRegularExpression for SE-0099.
1 parent 173304d commit 165f55b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TestFoundation/TestNSRegularExpression.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class TestNSRegularExpression : XCTestCase {
218218
let rangeCount = result.numberOfRanges
219219
XCTAssertEqual(captureCount + 1, rangeCount, "Complex regex \(patternString) in \(searchString) mismatch \(captureCount) groups but \(result) has \(rangeCount) ranges", file: file, line: line)
220220
}
221-
if let first = firstResult where matches.count > 0 {
221+
if let first = firstResult, matches.count > 0 {
222222
XCTAssertTrue(NSEqualRanges(first.range, firstMatchOverallRange), "Complex regex \(patternString) in \(searchString) match range \(NSStringFromRange(first.range)) should be \(NSStringFromRange(firstMatchOverallRange))", file: file, line: line)
223223
if captureCount > 0 {
224224
XCTAssertTrue(NSEqualRanges(first.range(at: 1), firstMatchFirstCaptureRange), "Complex regex \(patternString) in \(searchString) match range \(first.range(at: 1)) should be \(NSStringFromRange(firstMatchFirstCaptureRange))", file: file, line: line)

0 commit comments

Comments
 (0)