Skip to content

Commit c7cb173

Browse files
Merge pull request #7 from swiftwasm/ubuntu-unit-tests
Run unit tests on Ubuntu
2 parents ee68ab0 + 8b4036e commit c7cb173

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,24 @@ jobs:
2424
name: test-fixtures
2525
path: Fixtures/build
2626

27-
unit-tests:
27+
ubuntu-unit-tests:
28+
runs-on: ubuntu-latest
29+
needs: build-fixtures
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: actions/download-artifact@v2
33+
with:
34+
name: test-fixtures
35+
path: Fixtures/build
36+
- name: Install dependencies
37+
run: |
38+
curl -L -o wabt.tar.gz https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-ubuntu.tar.gz
39+
tar xzvf wabt.tar.gz
40+
sudo cp wabt-*/bin/* /usr/local/bin
41+
- name: Run unit tests
42+
run: swift test --enable-test-discovery
43+
44+
macos-unit-tests:
2845
runs-on: macos-latest
2946
needs: build-fixtures
3047
steps:

Sources/WasmTransformer/I64Transformer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func transformElemSection(input: inout InputByteStream, writer: OutputWriter,
228228
for _ in 0 ..< count {
229229
let tableIndex = input.readVarUInt32()
230230
try writer.writeBytes(encodeULEB128(tableIndex))
231-
try input.consumeI32InitExpr(consumer: writer.writeBytes)
231+
try input.consumeI32InitExpr(consumer: { try writer.writeBytes($0) })
232232
let funcIndicesCount = input.readVarUInt32()
233233
try writer.writeBytes(encodeULEB128(funcIndicesCount))
234234
for _ in 0 ..< funcIndicesCount {

Tests/WasmTransformerTests/IntegrationTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@testable import WasmTransformer
22
import XCTest
3-
import JavaScriptCore
43

54
class IntegrationTests: XCTestCase {
65
func testSwiftFoundationDate() throws {

0 commit comments

Comments
 (0)