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 {
22
22
file: StaticString = #file,
23
23
line: UInt = #line,
24
24
@RegexComponentBuilder _ content: ( ) -> Content
25
- ) throws {
25
+ ) throws where Content . RegexOutput == MatchType {
26
26
let regex = content ( )
27
27
for (input, maybeExpectedCaptures) in tests {
28
28
let maybeMatch = input. wholeMatch ( of: regex)
@@ -44,13 +44,7 @@ class RegexDSLTests: XCTestCase {
44
44
XCTFail ( " Unexpectedly matched " , file: file, line: line)
45
45
continue
46
46
}
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
54
48
XCTAssertTrue (
55
49
equivalence ( captures, expectedCaptures) ,
56
50
" ' \( captures) ' is not equal to the expected ' \( expectedCaptures) '. " ,
You can’t perform that action at this time.
0 commit comments