Skip to content

Commit f84e8c5

Browse files
committed
Skip some tests on Linux due to the behavior differences (abount description) of some Foundation types
1 parent 845fa72 commit f84e8c5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Tests/NimbleTests/Matchers/BeEmptyTest.swift

+2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider {
5151
expect([1]).to(beEmpty())
5252
}
5353

54+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
5455
failsWithErrorMessage("expected to not be empty, got <{()}>") {
5556
expect(NSSet()).toNot(beEmpty())
5657
}
5758
failsWithErrorMessage("expected to be empty, got <{(1)}>") {
5859
expect(NSSet(object: NSNumber(value: 1))).to(beEmpty())
5960
}
61+
#endif
6062

6163
failsWithErrorMessage("expected to not be empty, got <()>") {
6264
expect(NSIndexSet()).toNot(beEmpty())

Tests/NimbleTests/Matchers/MatchErrorTest.swift

+4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ final class MatchErrorTest: XCTestCase, XCTestCaseProvider {
1919
}
2020

2121
func testMatchNSErrorPositive() {
22+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
2223
let error1 = NSError(domain: "err", code: 0, userInfo: nil)
2324
let error2 = NSError(domain: "err", code: 0, userInfo: nil)
2425

2526
expect(error1).to(matchError(error2))
27+
#endif
2628
}
2729

2830
func testMatchNSErrorNegative() {
@@ -43,11 +45,13 @@ final class MatchErrorTest: XCTestCase, XCTestCaseProvider {
4345
expect(CustomDebugStringConvertibleError.a).to(matchError(CustomDebugStringConvertibleError.b))
4446
}
4547

48+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
4649
failsWithErrorMessage("expected to match error <Error Domain=err Code=1 \"(null)\">, got <Error Domain=err Code=0 \"(null)\">") {
4750
let error1 = NSError(domain: "err", code: 0, userInfo: nil)
4851
let error2 = NSError(domain: "err", code: 1, userInfo: nil)
4952
expect(error1).to(matchError(error2))
5053
}
54+
#endif
5155
}
5256

5357
func testMatchNegativeMessage() {

0 commit comments

Comments
 (0)