Skip to content

Commit a243f60

Browse files
committed
Include some more logging in strange test?
1 parent b58c24c commit a243f60

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/RegexBuilderTests/RegexDSLTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ import XCTest
1414
import RegexBuilder
1515
import TestSupport
1616

17+
extension Bool {
18+
var baseValue: UInt8 { withUnsafeBytes(of: self) { $0.load(as: UInt8.self) } }
19+
}
20+
1721
@available(SwiftStdlib 5.7, *)
1822
class RegexDSLTests: XCTestCase {
1923
func _testDSLCaptures<MatchType>(
@@ -991,7 +995,17 @@ class RegexDSLTests: XCTestCase {
991995
} else {
992996
XCTAssertFalse(regex.program.loweredProgram.canOnlyMatchAtStart, file: file, line: line)
993997
}
998+
999+
XCTAssertTrue(expectation == regex.program.loweredProgram.canOnlyMatchAtStart, file: file, line: line)
1000+
9941001
XCTAssertEqual(regex.program.loweredProgram.canOnlyMatchAtStart, expectation, file: file, line: line)
1002+
XCTAssertEqual(
1003+
regex.program.loweredProgram.canOnlyMatchAtStart.baseValue,
1004+
expectation.baseValue,
1005+
file: file, line: line)
1006+
print(
1007+
regex.program.loweredProgram.canOnlyMatchAtStart.baseValue,
1008+
expectation.baseValue)
9951009
}
9961010

9971011
expectCanOnlyMatchAtStart(true) {

0 commit comments

Comments
 (0)