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

Side by Side Diff: test/mjsunit/wasm/wasm-constants.js

Issue 2410763002: [wasm] GrowMemory should use maximum size declared in WebAssembly.Memory (Closed)
Patch Set: Formatting Created 4 years, 2 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 unified diff | Download patch
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 5 // Flags: --expose-wasm
6 6
7 function bytes() { 7 function bytes() {
8 var buffer = new ArrayBuffer(arguments.length); 8 var buffer = new ArrayBuffer(arguments.length);
9 var view = new Uint8Array(buffer); 9 var view = new Uint8Array(buffer);
10 for (var i = 0; i < arguments.length; i++) { 10 for (var i = 0; i < arguments.length; i++) {
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 eval(code); 366 eval(code);
367 } 367 }
368 } catch (e) { 368 } catch (e) {
369 assertEquals("number", typeof e); 369 assertEquals("number", typeof e);
370 assertEquals(value, e); 370 assertEquals(value, e);
371 // Success. 371 // Success.
372 return; 372 return;
373 } 373 }
374 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value); 374 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);
375 } 375 }
376
377 function assertWasmError(code) {
378 try {
bradnelson 2016/10/17 22:13:25 Intent is weird here.
bradnelson 2016/10/17 22:23:26 Indent I mean
gdeepti 2016/10/18 02:34:17 Removed this function because assertThrows covers
379 if (typeof code === 'function') {
380 code();
381 } else {
382 eval(code);
383 }
384 } catch (e) {
385 assertEquals("object", typeof e);
386 // Success
387 return;
388 }
389 throw new MjsUnitAssertionError("Did not throw, expected error");
390 }
OLDNEW
« test/mjsunit/wasm/import-memory.js ('K') | « test/mjsunit/wasm/import-memory.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698