Fizzy must be built with the FIZZY_TESTING
option turned on:
mkdir build && cd build
cmake -DFIZZY_TESTING=ON ..
cmake --build .
It can then be executed:
bin/fizzy-spectests <test directory>
Fizzy uses the official WebAssembly "spec tests", albeit not directly.
It requires the Wast files to be translated into a JSON format using wabt's wast2json
tool.
The reason for this is a design decision of Fizzy to not support the WebAssembly text format, and unfortunately the official test cases are in a text format.
In order to prepare the tests, run the following command for each file:
wast2json <file.wast> -o <file.json>
Make sure to disable all WebAssembly extensions when using wast2json
:
wast2json --disable-saturating-float-to-int --disable-sign-extension --disable-multi-value
To convert all files at once:
# Make sure $options here contains the above settings
find test/core -name '*.wast' -exec wast2json $options {} \;
For ease of use, we have placed the JSON files of the spec tests w3c-v1.0 branch here: