diff options
Diffstat (limited to 'tests/testdata/run/no_validate_asm.js')
-rw-r--r-- | tests/testdata/run/no_validate_asm.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/testdata/run/no_validate_asm.js b/tests/testdata/run/no_validate_asm.js new file mode 100644 index 000000000..ef999e080 --- /dev/null +++ b/tests/testdata/run/no_validate_asm.js @@ -0,0 +1,20 @@ +// V8 logs any asmjs validation errors to stdout, but it shows line numbers that +// are non-existent in the source. + +const _asmJsModule = function () { + "use asm"; + + function func( + x, + ) { + x = +x; // cast to float + + ~x; + // asmjs error: `~` is only valid on integers + // should not log to stdout with --no-validate-asm + } + + return { + f: func, + }; +}(); |