diff --git a/.github/workflows/swift-wasm.yml b/.github/workflows/swift-wasm.yml new file mode 100644 index 0000000..7809c3d --- /dev/null +++ b/.github/workflows/swift-wasm.yml @@ -0,0 +1,14 @@ +name: SwiftWASM +on: [push] +jobs: + test: + name: Test + runs-on: ubuntu-latest + container: ghcr.io/swiftwasm/carton:latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Swift Version + run: swift --version + - name: Test + run: carton test diff --git a/Tests/PredicateTests/PredicateTests.swift b/Tests/PredicateTests/PredicateTests.swift index 8809f7a..f134ef0 100644 --- a/Tests/PredicateTests/PredicateTests.swift +++ b/Tests/PredicateTests/PredicateTests.swift @@ -151,7 +151,9 @@ final class PredicateTests: XCTestCase { && "speakers.name".all(in: ["John Apple", "Alsey Coleman Miller"]) XCTAssertEqual(try events.filter(with: predicate), events) + #if !os(WASI) XCTAssertEqual(predicate.description, #"(((name MATCHES[c] "\w+ event" AND start < 4001-01-01 00:00:00 +0000) AND (ANY speakers.name IN {"Alsey Coleman Miller"} OR speakers.name CONTAINS "John Apple")) AND ANY speakers.name IN {"Alsey Coleman Miller", "John Apple", "Test"}) AND ALL speakers.name IN {"John Apple", "Alsey Coleman Miller"}"#) + #endif } func testPredicate6() { @@ -235,7 +237,9 @@ final class PredicateTests: XCTestCase { ] XCTAssertEqual(try events.filter(with: predicate), events) + #if !os(WASI) XCTAssertEqual(predicate.description, #"name MATCHES[c] "event \d" AND start < 4001-01-01 00:00:00 +0000 AND speakers.@count > 0"#) + #endif } }