From 2a8600de517c1e8a3a7a826e6cabddd36430ca12 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Thu, 20 Jul 2023 13:18:33 -0400 Subject: [PATCH] Fix misuse of `XCTSkip()` --- Tests/RegexBuilderTests/RegexDSLTests.swift | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Tests/RegexBuilderTests/RegexDSLTests.swift b/Tests/RegexBuilderTests/RegexDSLTests.swift index 06b6ff1a3..5ef16e37c 100644 --- a/Tests/RegexBuilderTests/RegexDSLTests.swift +++ b/Tests/RegexBuilderTests/RegexDSLTests.swift @@ -1846,8 +1846,7 @@ extension RegexDSLTests { func testLabeledCaptures_labeledCapture() throws { guard #available(macOS 13, *) else { - XCTSkip("Fix only exists on macOS 13") - return + throw XCTSkip("Fix only exists on macOS 13") } // The output type of a regex with a labeled capture is dropped. let dslWithLabeledCapture = Regex { @@ -1886,8 +1885,7 @@ extension RegexDSLTests { func testLabeledCaptures_bothCapture() throws { guard #available(macOS 13, *) else { - XCTSkip("Fix only exists on macOS 13") - return + throw XCTSkip("Fix only exists on macOS 13") } // Only the output type of a regex with a labeled capture is dropped, // outputs of other regexes in the same DSL are concatenated. @@ -1913,8 +1911,7 @@ extension RegexDSLTests { func testLabeledCaptures_tooManyCapture() throws { guard #available(macOS 13, *) else { - XCTSkip("Fix only exists on macOS 13") - return + throw XCTSkip("Fix only exists on macOS 13") } // 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.