Skip to content

Commit

Permalink
Fix wasm build (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Apr 17, 2023
1 parent a873511 commit 8d739b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/NimbleTests/Helpers/BackgroundThreadObject.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if !os(WASI)

import Foundation
import Nimble

Expand All @@ -12,3 +14,5 @@ class BackgroundThreadObject: CustomDebugStringConvertible {
return "BackgroundThreadObject"
}
}

#endif // #if !os(WASI)
2 changes: 2 additions & 0 deletions Tests/NimbleTests/Matchers/SatisfyAllOfTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ final class SatisfyAllOfTest: XCTestCase {
expect(true).toNot(beTruthy() && beFalsy())
}

#if !os(WASI)
func testSatisfyAllOfCachesExpressionBeforePassingToPredicates() {
// This is not a great example of assertion writing - functions being asserted on in Expressions should not have side effects.
// But we should still handle those cases anyway.
Expand All @@ -63,4 +64,5 @@ final class SatisfyAllOfTest: XCTestCase {

expect(testFunction()).toEventually(satisfyAllOf(equal(1), equal(1)))
}
#endif
}
2 changes: 2 additions & 0 deletions Tests/NimbleTests/Matchers/SatisfyAnyOfTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ final class SatisfyAnyOfTest: XCTestCase {
expect(true).to(beTruthy() || beFalsy())
}

#if !os(WASI)
func testSatisfyAllOfCachesExpressionBeforePassingToPredicates() {
// This is not a great example of assertion writing - functions being asserted on in Expressions should not have side effects.
// But we should still handle those cases anyway.
Expand All @@ -63,4 +64,5 @@ final class SatisfyAnyOfTest: XCTestCase {
// Next time, it'll return 2, which doesn't pass the `equal(1)`.
expect(testFunction()).toEventually(satisfyAnyOf(equal(0), equal(1)))
}
#endif
}

0 comments on commit 8d739b2

Please sign in to comment.