This directory holds watgo's end-to-end and integration-style test corpora.
The corpora are chosen to be self-testing - the WAT modules compiled by watgo
get executed and results are compared to expected results. Broad compatibility
coverage uses Node.js, and selected suites also run through wasmvm.
When applicable, the test harnesses also use the WAT code in these corpora to
run roundtrip printing tests (where the functionality of the printer package
is exercised).
-
wasmspec/- Upstream source: WebAssembly spec
test/core - Repo: https://github.com/WebAssembly/spec
- Content:
.wastspec scripts - Harness:
tests/wasmspec/wasmspec_test.go
- Upstream source: WebAssembly spec
-
wabt-interp/- Upstream source: WABT
test/interp - Repo: https://github.com/WebAssembly/wabt
- Content:
scripts/*.txtfixtures - Harness:
tests/wabt-interp/wabt_test.go
- Upstream source: WABT
-
wasm-wat-samples/- Upstream source:
wasm-wat-samples - Repo: https://github.com/eliben/wasm-wat-samples
- Content: sample directories with
.wat,test.js, and related assets - Harness:
tests/wasm-wat-samples/wat_samples_test.go
- Upstream source:
Use:
tests/update-upstream-tests.shThis script clones the upstream repositories into /tmp and syncs their tracked
test assets into this tree. It is intended to be run manually once in a while,
not automatically as part of normal go test runs.