Skip to content

Commit

Permalink
Fix compilation error on linux/windows because XCTExpectFailure is no…
Browse files Browse the repository at this point in the history
…t available
  • Loading branch information
younata committed Oct 14, 2024
1 parent 90d77ba commit af883cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/NimbleTests/SwiftTestingSupportTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import XCTest
}
}

#if canImport(Darwin)
// XCTExpectFailure is only available on the closed-source implementation
// of XCTest.
// https://github.com/swiftlang/swift-corelibs-xctest/issues/438
class MixedSwiftTestingXCTestSupport: XCTestCase {
func testAlsoRecordsErrorsToXCTest() {
XCTExpectFailure("This should fail")
Expand All @@ -29,5 +33,6 @@ class MixedSwiftTestingXCTestSupport: XCTestCase {
try require(false).to(beTrue())
}
}
#endif

#endif

0 comments on commit af883cd

Please sign in to comment.