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

Unified Diff: test/mjsunit/asm/asm-validation.js

Issue 2565343002: [wasm][asm.js] Require a number for fround literals. (Closed)
Patch Set: git cl try 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 | « src/asmjs/asm-typer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/asm-validation.js
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js
index 0c9e841fe94ad4b95ac0579b482cf5ed9b41ccb5..b2d701cc7e1ccf522a680d3208119a8bcc6eb336 100644
--- a/test/mjsunit/asm/asm-validation.js
+++ b/test/mjsunit/asm/asm-validation.js
@@ -344,6 +344,21 @@ function assertValidAsm(func) {
assertEquals(4, m.foo(3));
})();
+(function TestBadFroundTrue() {
+ function Module(stdlib) {
+ "use asm";
+ var fround = stdlib.Math.fround;
+ function foo() {
+ var x = fround(true);
+ return +x;
+ }
+ return { foo: foo };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(1, m.foo());
+})();
+
(function TestBadCase() {
function Module() {
"use asm";
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698