Add float conversion tests#81
Conversation
|
Confirming that Xuxing Huang is a member of the W3C CG. Thanks! |
|
lgtm |
|
Picked +/-0, +/- INT_MAX, +/-1 to test Int2Float, 0, 1, +/- MOST-POSITIVE-DOUBLE(SINGLE)-FLOAT, +/- LEAST-POSITIVE-DOUBLE(SINGLE)-FLOAT to test reinterpretFloat2Int, some of the results of reinterpretInt2Float will generate NaN so I didn't add them. All tests have one or more random cases :) |
There was a problem hiding this comment.
The wasm parser does recognize hexadecimal constants now, so you can write the constant directly now instead of writing it in decimal and having a comment :-).
|
This looks good! One thing to watch out for: Constants such as 2147483647, 9223372036854775807, and 1234567890 are not exactly representable as f32 values; the wasm parser is silently rounding them. This is obviously not ideal. Eventually we should implement hexadecimal float literal parsing, and then we'll probably convert most of these tests to use it, but if you want to be tidy in the mean time, it'd be nice to avoid values that need rounding. If you're interested in writing more conversion tests, here are some further ideas :-) :
We'll also eventually need to add -0, NaN, Infinity, and trapping cases, though as you noticed these aren't all convenient to do right now. I have some possible ideas for this in this branch, though there's discussion ongoing about them in #70. |
Add float conversion tests
Revert "Update docs to allow import/export mut globals (WebAssembly#81)" This reverts commit 5d2ad6e. Revert "Support import/export mut globals in interpreter (WebAssembly#80)" This reverts commit 07a6fb2.
Fixed a typo
This patch redefines the `switch` instruction such that it only takes a single immediate type (in addition to the tag). Resolves WebAssembly#76.
spec:
WebAssembly@22854975
exception-handling:
WebAssembly/exception-handling@d399b9e0
The `update-testsuite.sh` will not include files under `legacy` as
well as `core`. This is so that the legacy exception handling tests
are now included.
The test updates themselves were automatically generated by
`update-testsuite.sh`
No description provided.