From c166a8de9cbd73a2bac9a370656f203c257f0e5f Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Thu, 3 Oct 2024 10:27:24 -0500 Subject: [PATCH] skipping macos tests that are failing due to Swift/macOS 14 bug --- .../Validator/Validation+ConvenienceTests.swift | 9 ++++++++- .../Validator/Validation+ConvenienceTests.swift | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) 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