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

Side by Side Diff: test/mjsunit/wasm/divrem-trap.js

Issue 1537643002: Add --enable-wasm to wasm tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/wasm/compile-run-basic.js ('k') | test/mjsunit/wasm/ffi.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-gc --allow-natives-syntax 5 // Flags: --expose-wasm --expose-gc --allow-natives-syntax
6 6
7 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 8
9 function assertTraps(code, msg) { 9 function assertTraps(code, msg) {
10 var threwException = true; 10 var threwException = true;
11 try { 11 try {
12 if (typeof code === 'function') { 12 if (typeof code === 'function') {
13 code(); 13 code();
14 } else { 14 } else {
15 eval(code); 15 eval(code);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 assertEquals( 3, remu(-443, 10)); 88 assertEquals( 3, remu(-443, 10));
89 89
90 assertTraps(kTrapRemByZero, "rems(100, 0);"); 90 assertTraps(kTrapRemByZero, "rems(100, 0);");
91 assertTraps(kTrapRemByZero, "rems(-1009, 0);"); 91 assertTraps(kTrapRemByZero, "rems(-1009, 0);");
92 92
93 assertTraps(kTrapRemByZero, "remu(200, 0);"); 93 assertTraps(kTrapRemByZero, "remu(200, 0);");
94 assertTraps(kTrapRemByZero, "remu(-2009, 0);"); 94 assertTraps(kTrapRemByZero, "remu(-2009, 0);");
95 95
96 assertEquals(-2147483648, remu(0x80000000, -1)); 96 assertEquals(-2147483648, remu(0x80000000, -1));
97 assertEquals(0, rems(0x80000000, -1)); 97 assertEquals(0, rems(0x80000000, -1));
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/compile-run-basic.js ('k') | test/mjsunit/wasm/ffi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698