Skip to content

Commit b58c24c

Browse files
committed
Refactor DSL test to explore XCTest issue
1 parent b384858 commit b58c24c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tests/RegexBuilderTests/RegexDSLTests.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,17 @@ class RegexDSLTests: XCTestCase {
980980
@RegexComponentBuilder _ content: () -> some RegexComponent
981981
) {
982982
let regex = content().regex
983+
print("""
984+
canOnlyMatchAtStart: \(regex.program.loweredProgram.canOnlyMatchAtStart)
985+
expectation: \(expectation)
986+
equal? \(regex.program.loweredProgram.canOnlyMatchAtStart == expectation)
987+
""")
988+
989+
if expectation {
990+
XCTAssertTrue(regex.program.loweredProgram.canOnlyMatchAtStart, file: file, line: line)
991+
} else {
992+
XCTAssertFalse(regex.program.loweredProgram.canOnlyMatchAtStart, file: file, line: line)
993+
}
983994
XCTAssertEqual(regex.program.loweredProgram.canOnlyMatchAtStart, expectation, file: file, line: line)
984995
}
985996

0 commit comments

Comments
 (0)