diff --git a/Sources/Exercises/Participants/HandWrittenParticipant.swift b/Sources/Exercises/Participants/HandWrittenParticipant.swift index e7228b333..ef11d5e2b 100644 --- a/Sources/Exercises/Participants/HandWrittenParticipant.swift +++ b/Sources/Exercises/Participants/HandWrittenParticipant.swift @@ -60,7 +60,8 @@ private func graphemeBreakPropertyData( } // For testing our framework - if forceFailure, lower == Unicode.Scalar(0x07FD) { + let failureSigil = Unicode.Scalar(0x07FD as UInt32)! + if forceFailure, lower == failureSigil { return nil } diff --git a/Sources/_StringProcessing/Regex/Match.swift b/Sources/_StringProcessing/Regex/Match.swift index c0a3aca3c..82ed2c257 100644 --- a/Sources/_StringProcessing/Regex/Match.swift +++ b/Sources/_StringProcessing/Regex/Match.swift @@ -41,6 +41,8 @@ extension Regex.Match { from: anyRegexOutput.input ) guard let output = typeErasedMatch as? Output else { + print(typeErasedMatch) + print(Output.self) fatalError("Internal error: existential cast failed") } return output diff --git a/Tests/RegexBuilderTests/RegexDSLTests.swift b/Tests/RegexBuilderTests/RegexDSLTests.swift index 1cb53b83d..3a0c63a98 100644 --- a/Tests/RegexBuilderTests/RegexDSLTests.swift +++ b/Tests/RegexBuilderTests/RegexDSLTests.swift @@ -1845,8 +1845,8 @@ extension RegexDSLTests { } func testLabeledCaptures_labeledCapture() throws { - guard #available(macOS 13, *) else { - throw XCTSkip("Fix only exists on macOS 13") + guard #available(macOS 14.0, *) else { + throw XCTSkip("Fix only exists on macOS 14") } // The output type of a regex with a labeled capture is dropped. let dslWithLabeledCapture = Regex { @@ -1884,8 +1884,8 @@ extension RegexDSLTests { } func testLabeledCaptures_bothCapture() throws { - guard #available(macOS 13, *) else { - throw XCTSkip("Fix only exists on macOS 13") + guard #available(macOS 14.0, *) else { + throw XCTSkip("Fix only exists on macOS 14") } // Only the output type of a regex with a labeled capture is dropped, // outputs of other regexes in the same DSL are concatenated. @@ -1910,9 +1910,8 @@ extension RegexDSLTests { } func testLabeledCaptures_tooManyCapture() throws { - return - guard #available(macOS 13, *) else { - throw XCTSkip("Fix only exists on macOS 13") + guard #available(macOS 14.0, *) else { + throw XCTSkip("Fix only exists on macOS 14") } // The output type of a regex with too many captures is dropped. // "Too many" means the left and right output types would add up to >= 10.