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

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

Issue 1973193002: [esnext] Async function toString support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@async-run3
Patch Set: 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 unified diff | Download patch
« src/objects.cc ('K') | « src/objects.cc ('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 5 // Flags: --harmony-async-await
6 6
7 // Do not install `AsyncFunction` constructor on global object 7 // Do not install `AsyncFunction` constructor on global object
8 assertEquals(undefined, this.AsyncFunction); 8 assertEquals(undefined, this.AsyncFunction);
9 let AsyncFunction = (async function() {}).constructor; 9 let AsyncFunction = (async function() {}).constructor;
10 10
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 try { 204 try {
205 value = await rejectLater("throw2"); 205 value = await rejectLater("throw2");
206 } catch (e) { 206 } catch (e) {
207 log.push("resume:" + e); 207 log.push("resume:" + e);
208 } 208 }
209 return value + 1;`); 209 return value + 1;`);
210 log = []; 210 log = [];
211 assertEqualsAsync(5, () => resumeAfterThrowEval(4)); 211 assertEqualsAsync(5, () => resumeAfterThrowEval(4));
212 assertEquals("start:4 resume:throw1 resume:throw2", log.join(" ")); 212 assertEquals("start:4 resume:throw1 resume:throw2", log.join(" "));
213
214 async function foo() {}
215 assertEquals("async function foo() {}", foo.toString());
OLDNEW
« src/objects.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698