diff --git a/Tests/OpenAPIKit30Tests/Validator/Validation+ConvenienceTests.swift b/Tests/OpenAPIKit30Tests/Validator/Validation+ConvenienceTests.swift index efc75ff38..91f154145 100644 --- a/Tests/OpenAPIKit30Tests/Validator/Validation+ConvenienceTests.swift +++ b/Tests/OpenAPIKit30Tests/Validator/Validation+ConvenienceTests.swift @@ -318,7 +318,7 @@ final class ValidationConvenienceTests: XCTestCase { ) } - func test_subject_unwrapAndlookup() { + func test_subject_unwrapAndlookup() throws { let v = Validation( description: "parameter is named test", check: \.name == "test" @@ -358,6 +358,13 @@ final class ValidationConvenienceTests: XCTestCase { XCTAssertFalse( unwrapAndLookup(\OpenAPI.Document.paths["/test"]?.pathItemValue?.parameters[2], thenApply: v)(context).isEmpty ) + #if os(macOS) + if #available(macOS 15.0, *) { + // this is just here because if #unavailable inside this block causes a compilation failure prior to Swift 5.6 on Linux :/ + } else { + throw XCTSkip("Skipping due to Swift/macOS bug resulting in error (line 368): throwing \"std::bad_alloc: std::bad_alloc\"") + } + #endif // nil keypath XCTAssertFalse( unwrapAndLookup(\OpenAPI.Document.paths["/test2"]?.pathItemValue?.parameters.first, thenApply: v)(context).isEmpty diff --git a/Tests/OpenAPIKitTests/Validator/Validation+ConvenienceTests.swift b/Tests/OpenAPIKitTests/Validator/Validation+ConvenienceTests.swift index f8102b83b..61f028303 100644 --- a/Tests/OpenAPIKitTests/Validator/Validation+ConvenienceTests.swift +++ b/Tests/OpenAPIKitTests/Validator/Validation+ConvenienceTests.swift @@ -318,7 +318,7 @@ final class ValidationConvenienceTests: XCTestCase { ) } - func test_subject_unwrapAndlookup() { + func test_subject_unwrapAndlookup() throws { let v = Validation( description: "parameter is named test", check: \.name == "test" @@ -358,6 +358,13 @@ final class ValidationConvenienceTests: XCTestCase { XCTAssertFalse( unwrapAndLookup(\OpenAPI.Document.paths["/test"]?.pathItemValue?.parameters[2], thenApply: v)(context).isEmpty ) + #if os(macOS) + if #available(macOS 15.0, *) { + // this is just here because if #unavailable inside this block causes a compilation failure prior to Swift 5.6 on Linux :/ + } else { + throw XCTSkip("Skipping due to Swift/macOS bug resulting in error (line 368): throwing \"std::bad_alloc: std::bad_alloc\"") + } + #endif // nil keypath XCTAssertFalse( unwrapAndLookup(\OpenAPI.Document.paths["/test2"]?.pathItemValue?.parameters.first, thenApply: v)(context).isEmpty