Skip to content

Commit

Permalink
skipping macos tests that are failing due to Swift/macOS 14 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Oct 3, 2024
1 parent 90b54a2 commit 6409318
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ final class ValidationConvenienceTests: XCTestCase {
)
}

func test_subject_unwrapAndlookup() {
func test_subject_unwrapAndlookup() throws {
let v = Validation<OpenAPI.Parameter>(
description: "parameter is named test",
check: \.name == "test"
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ final class ValidationConvenienceTests: XCTestCase {
)
}

func test_subject_unwrapAndlookup() {
func test_subject_unwrapAndlookup() throws {
let v = Validation<OpenAPI.Parameter>(
description: "parameter is named test",
check: \.name == "test"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6409318

Please sign in to comment.