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

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

Issue 2011873002: [wasm] Check that type intersections don't yield empty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 7 months 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/typing-asm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index 54d7d7af31b47dd7c9a59adc363a19412c9246eb..4c28b619c306b9b6691e3a8e2a189a372a37de69 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -682,6 +682,7 @@ function TestModDoubleNegative() {
assertWasm(28, TestModDoubleNegative);
+
(function () {
function TestNamedFunctions() {
"use asm";
@@ -707,6 +708,7 @@ module.init();
assertEquals(77.5, module.add());
})();
+
(function () {
function TestGlobalsWithInit() {
"use asm";
@@ -1358,6 +1360,38 @@ assertWasm(1, TestXor);
})();
+(function TestBadAssignDoubleFromIntish() {
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ function func() {
+ var a = 1;
+ var b = 3.0;
+ b = a;
+ }
+ return {func: func};
+ }
+ assertThrows(function() {
+ Wasm.instantiateModuleFromAsm(Module.toString());
+ });
+})();
+
+
+(function TestBadAssignIntFromDouble() {
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ function func() {
+ var a = 1;
+ var b = 3.0;
+ a = b;
+ }
+ return {func: func};
+ }
+ assertThrows(function() {
+ Wasm.instantiateModuleFromAsm(Module.toString());
+ });
+})();
+
+
(function TestBadMultiplyIntish() {
function Module(stdlib, foreign, heap) {
"use asm";
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698