Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: test/mjsunit/wasm/ffi-error.js

Issue 2552123004: [wasm] Fix ToNumber conversion (Closed)
Patch Set: Minor fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/wasm/ffi.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/ffi-error.js
diff --git a/test/mjsunit/wasm/ffi-error.js b/test/mjsunit/wasm/ffi-error.js
index 6d4787e70abba5fd1333a31e0581975e90154f0d..521f62b50261b5bf09b3ceceb57a62c5bc770475 100644
--- a/test/mjsunit/wasm/ffi-error.js
+++ b/test/mjsunit/wasm/ffi-error.js
@@ -115,3 +115,14 @@ assertThrows(function() {
main(13);
}, TypeError);
})();
+
+(function ImportSymbolToNumberThrows() {
+ var builder = new WasmModuleBuilder();
+ var index = builder.addImport("func", kSig_i_v);
+ builder.addFunction("main", kSig_i_v)
+ .addBody([kExprCallFunction, 0])
+ .exportFunc();
+ var func = () => Symbol();
+ var main = builder.instantiate({func: func}).exports.main;
+ assertThrows(() => main(), TypeError);
+})();
« no previous file with comments | « test/mjsunit/wasm/ffi.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698