You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically for each command in json file we need to do one of the following:
module - instantiate module from file (it is then used in the following commands)
when instantiate failed, skip following tests
provide imports to instantiate when required (link exports of registered modules)
spectest module provided by test harness for importing in tests
register - register module to be used in the following commands for linking exports-imports of several modules (used in linking.wast, imports.wast, elem.wast)
actions
invoke an exported function (by name)
get exported global value (by name)
choosing module for action by name (many cases in linking.json)
assertions - check result of an action or module instantiation
assert_return
support case when no returned value expected (see break-drop.wast)
assert_trap
assert_exhaustion
assert_malformed (support needed only for "module_type": "binary")
assert_invalid
assert_unlinkable
assert_uninstantiable (in start.json and linking.json; in original wast it's assert_trap with module inside)
action without assert (see memory_redundancy.wast)
Spec test suite: https://github.com/WebAssembly/spec/tree/master/test/core
Converting *.wast files with a wast2json tool produces wasm files + json files like these:
https://gist.github.com/gumb0/a826ed24a6f16e5a6e88c7a9a88a8b3b
https://gist.github.com/gumb0/f7f3e443ced081fd1902c67881d0ac31
Basically for each command in json file we need to do one of the following:
module
- instantiate module from file (it is then used in the following commands)instantiate
when required (link exports of registered modules)spectest
module provided by test harness for importing in testsregister
- register module to be used in the following commands for linking exports-imports of several modules (used in linking.wast, imports.wast, elem.wast)invoke
an exported function (by name)get
exported global value (by name)assert_return
assert_trap
assert_exhaustion
assert_malformed
(support needed only for"module_type": "binary"
)assert_invalid
assert_unlinkable
assert_uninstantiable
(in start.json and linking.json; in original wast it'sassert_trap
withmodule
inside)action
without assert (see memory_redundancy.wast)The spec for all possible asserts/actions/commands is at https://github.com/WebAssembly/spec/tree/master/interpreter#scripts
(all of the assertions mentioned there are used in test suite)
The text was updated successfully, but these errors were encountered: