File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class RegexDSLTests: XCTestCase {
2222 file: StaticString = #file,
2323 line: UInt = #line,
2424 @RegexComponentBuilder _ content: ( ) -> Content
25- ) throws {
25+ ) throws where Content . RegexOutput == MatchType {
2626 let regex = content ( )
2727 for (input, maybeExpectedCaptures) in tests {
2828 let maybeMatch = input. wholeMatch ( of: regex)
@@ -33,13 +33,7 @@ class RegexDSLTests: XCTestCase {
3333 XCTFail ( " Unexpectedly matched " , file: file, line: line)
3434 continue
3535 }
36- XCTAssertTrue (
37- type ( of: regex) . RegexOutput. self == MatchType . self,
38- """
39- Expected match type: \( MatchType . self)
40- Actual match type: \( type ( of: regex) . RegexOutput. self)
41- """ )
42- let captures = try XCTUnwrap ( match. output as? MatchType , file: file, line: line)
36+ let captures = match. output
4337 XCTAssertTrue (
4438 equivalence ( captures, expectedCaptures) ,
4539 " ' \( captures) ' is not equal to the expected ' \( expectedCaptures) '. " ,
You can’t perform that action at this time.
0 commit comments