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)
@@ -44,13 +44,7 @@ class RegexDSLTests: XCTestCase {
4444 XCTFail ( " Unexpectedly matched " , file: file, line: line)
4545 continue
4646 }
47- XCTAssertTrue (
48- type ( of: regex) . RegexOutput. self == MatchType . self,
49- """
50- Expected match type: \( MatchType . self)
51- Actual match type: \( type ( of: regex) . RegexOutput. self)
52- """ )
53- let captures = try XCTUnwrap ( match. output as? MatchType , file: file, line: line)
47+ let captures = match. output
5448 XCTAssertTrue (
5549 equivalence ( captures, expectedCaptures) ,
5650 " ' \( captures) ' is not equal to the expected ' \( expectedCaptures) '. " ,
You can’t perform that action at this time.
0 commit comments