mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
.. | ||
address.wast | ||
align.wast | ||
block.wast | ||
br_if.wast | ||
br_table.wast | ||
br.wast | ||
break_drop.wast | ||
call_indirect.wast | ||
call.wast | ||
const_.wast | ||
conversions.wast | ||
data.wast | ||
endianness.wast | ||
exports.wast | ||
f32_.wast | ||
f32_bitwise.wast | ||
f32_cmp.wast | ||
f64_.wast | ||
f64_bitwise.wast | ||
f64_cmp.wast | ||
float_literals.wast | ||
func_ptrs.wast | ||
get_local.wast | ||
globals.wast | ||
i32_.wast | ||
i64_.wast | ||
if_.wast | ||
labels.wast | ||
left_to_right.wast | ||
loop_.wast | ||
memory_redundancy.wast | ||
memory.wast | ||
README.md | ||
return_.wast | ||
select.wast | ||
set_local.wast | ||
stack.wast | ||
start.wast | ||
switch.wast | ||
tee_local.wast | ||
types.wast |
This directory contains tests for the core WebAssembly semantics, as described in Semantics.md and specified by the spec interpreter.
This files should be a direct copy of the original WebAssembly spec tests.
Tests are written in the S-Expression script format defined by the interpreter.
Autogenerated Rust test cases
This files will serve as base for autogenerating Rust testcases
when WASM_GENERATE_SPECTESTS=1 cargo build
is executed
(src/build_spectests.rs).
The result autogenerated spectests live in the src/spectests directory.
Testcases
Currently supported command assertions:
- Module mostly implemented (it should support named modules
(module $Xx)
). - AssertReturn mostly implemented (it should support calls to named modules
(invoke $Xx "call")
). - AssertReturnCanonicalNan not implemented yet
- AssertReturnArithmeticNan not implemented yet
- AssertTrap not implemented yet
- AssertInvalid Fully implemented (it should not require to do validation separate from compilation)
- AssertMalformed Fully implemented
- AssertUninstantiable not implemented yet
- AssertExhaustion not implemented yet
- Register not implemented yet
- PerformAction partially implemented, only function invokations for now
Covered spectests
This spectests are currently covered:
- address.wast ✅
- align.wast ✅
- binary.wast
- block.wast ✅
- br.wast ✅
- br_if.wast ✅
- br_table.wast ✅
- break-drop.wast ✅
- call.wast ✅
- call_indirect.wast ✅
- comments.wast
- const.wast ✅
- conversions.wast ✅
- custom.wast
- data.wast ✅
- elem.wast
- endianness.wast ✅
- exports.wast ✅
- f32.wast ✅
- f32_bitwise.wast ✅
- f32_cmp.wast ✅
- f64.wast ✅
- f64_bitwise.wast ✅
- f64_cmp.wast ✅
- fac.wast
- float_exprs.wast
- float_literals.wast ✅
- float_memory.wast
- float_misc.wast
- forward.wast
- func.wast
- func_ptrs.wast ✅
- get_local.wast ✅
- globals.wast ✅
- i32.wast ✅
- i64.wast ✅
- if.wast ✅
- imports.wast
- inline-module.wast
- int_exprs.wast
- int_literals.wast
- labels.wast ✅
- left-to-right.wast ✅
- linking.wast
- loop.wast ✅
- memory.wast ✅
- memory_grow.wast
- memory_redundancy.wast ✅
- memory_trap.wast
- names.wast ✅
- nop.wast
- return.wast ✅
- select.wast ✅
- set_local.wast ✅
- skip-stack-guard-page.wast
- stack.wast
- start.wast ✅
- store_retval.wast
- switch.wast ✅
- tee_local.wast ✅
- token.wast
- traps.wast
- type.wast ✅
- typecheck.wast
- unreachable.wast
- unreached-invalid.wast
- unwind.wast
- utf8-custom-section-id.wast
- utf8-import-field.wast
- utf8-import-module.wast
- utf8-invalid-encoding.wast
Specific non-supported cases
There are some cases that we decided to skip for now to fasten the time to release:
SKIP_NAN_BITS
: Cases like invokations with params such as:(f32.const nan:0x200000)
are currently not well supported in tests. Spectests affected:conversions.wast
SKIP_MEMORY_GROW
: When accessing to the context memories multiple times, the mutable access to a memory index raises an error. For this reason we decied to skip the tests (for now) until this issue is resolved. Spectests affected:block.wast
call_indirect.wast
call.wast
globals.wast
loop.wast
if.wast
SKIP_MUTABLE_GLOBALS
: Right now the WASM parser can't validate a module with imported/exported mut globals. We decided to skip the tests until Cranelift and wasmparser can handle this (original spec proposal: https://github.com/WebAssembly/mutable-global). Spectests affected:globals.wast