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

Side by Side Diff: test/mjsunit/wasm/wasm-constants.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/verify-module-basic-errors.js ('k') | test/mjsunit/wasm/wasm-object-api.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-wasm
6
5 function bytes() { 7 function bytes() {
6 var buffer = new ArrayBuffer(arguments.length); 8 var buffer = new ArrayBuffer(arguments.length);
7 var view = new Uint8Array(buffer); 9 var view = new Uint8Array(buffer);
8 for (var i = 0; i < arguments.length; i++) { 10 for (var i = 0; i < arguments.length; i++) {
9 var val = arguments[i]; 11 var val = arguments[i];
10 if ((typeof val) == "string") val = val.charCodeAt(0); 12 if ((typeof val) == "string") val = val.charCodeAt(0);
11 view[i] = val | 0; 13 view[i] = val | 0;
12 } 14 }
13 return buffer; 15 return buffer;
14 } 16 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 239 }
238 threwException = false; 240 threwException = false;
239 } catch (e) { 241 } catch (e) {
240 assertEquals("string", typeof e); 242 assertEquals("string", typeof e);
241 assertEquals(kTrapMsgs[trap], e); 243 assertEquals(kTrapMsgs[trap], e);
242 // Success. 244 // Success.
243 return; 245 return;
244 } 246 }
245 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap] ); 247 throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap] );
246 } 248 }
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/verify-module-basic-errors.js ('k') | test/mjsunit/wasm/wasm-object-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698