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

Side by Side Diff: test/mjsunit/harmony/async-await-basic.js

Issue 2251003003: Merged 7fe4d930c9772dfc5f8e506920ad435863ee3b1d (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.3
Patch Set: Created 4 years, 4 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
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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: --harmony-async-await --allow-natives-syntax 5 // Flags: --harmony-async-await --allow-natives-syntax
6 6
7 // Do not install `AsyncFunction` constructor on global object 7 // Do not install `AsyncFunction` constructor on global object
8 8
9 function assertThrowsAsync(run, errorType, message) { 9 function assertThrowsAsync(run, errorType, message) {
10 var actual; 10 var actual;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 // Regress v8:5148 354 // Regress v8:5148
355 assertEqualsAsync("1", () => (async({ a = NaN }) => a)({ a: "1" })); 355 assertEqualsAsync("1", () => (async({ a = NaN }) => a)({ a: "1" }));
356 assertEqualsAsync( 356 assertEqualsAsync(
357 "10", () => (async(foo, { a = NaN }) => foo + a)("1", { a: "0" })); 357 "10", () => (async(foo, { a = NaN }) => foo + a)("1", { a: "0" }));
358 assertEqualsAsync("2", () => (async({ a = "2" }) => a)({ a: undefined })); 358 assertEqualsAsync("2", () => (async({ a = "2" }) => a)({ a: undefined }));
359 assertEqualsAsync( 359 assertEqualsAsync(
360 "20", () => (async(foo, { a = "0" }) => foo + a)("2", { a: undefined })); 360 "20", () => (async(foo, { a = "0" }) => foo + a)("2", { a: undefined }));
361 assertThrows(() => eval("async({ foo = 1 })"), SyntaxError); 361 assertThrows(() => eval("async({ foo = 1 })"), SyntaxError);
362 assertThrows(() => eval("async(a, { foo = 1 })"), SyntaxError); 362 assertThrows(() => eval("async(a, { foo = 1 })"), SyntaxError);
363
364 // https://bugs.chromium.org/p/chromium/issues/detail?id=638019
365 async function gaga() {
366 let i = 1;
367 while (i-- > 0) { await 42 }
368 }
369 assertDoesNotThrow(gaga);
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698