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

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

Issue 2608333002: [cleanup] remove sloppy generator/async function maps (Closed)
Patch Set: [cleanup] remove sloppy generator/async function maps Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/async-await-basic.js
diff --git a/test/mjsunit/harmony/async-await-basic.js b/test/mjsunit/harmony/async-await-basic.js
index 51572cdb9f79277ade7843610a7da2122b210822..ef632f681af7fae8544c6bcccd61ba4dc12406af 100644
--- a/test/mjsunit/harmony/async-await-basic.js
+++ b/test/mjsunit/harmony/async-await-basic.js
@@ -144,18 +144,32 @@ assertEquals(1, AsyncFunction.length);
// Let F be ! FunctionAllocate(functionPrototype, Strict, "non-constructor")
async function asyncNonConstructorDecl() {}
-assertThrows(
- () => new asyncNonConstructorDecl(), TypeError);
-assertThrows(
- () => new (async function() {}), TypeError);
+assertThrows(() => new asyncNonConstructorDecl(), TypeError);
+assertThrows(() => asyncNonConstructorDecl.caller, TypeError);
+assertThrows(() => asyncNonConstructorDecl.arguments, TypeError);
+
+assertThrows(() => new (async function() {}), TypeError);
+assertThrows(() => (async function() {}).caller, TypeError);
+assertThrows(() => (async function() {}).arguments, TypeError);
+
assertThrows(
() => new ({ async nonConstructor() {} }).nonConstructor(), TypeError);
assertThrows(
- () => new (() => "not a constructor!"), TypeError);
+ () => ({ async nonConstructor() {} }).nonConstructor.caller, TypeError);
assertThrows(
- () => new (AsyncFunction()), TypeError);
-assertThrows(
- () => new (new AsyncFunction()), TypeError);
+ () => ({ async nonConstructor() {} }).nonConstructor.arguments, TypeError);
+
+assertThrows(() => new (() => "not a constructor!"), TypeError);
+assertThrows(() => (() => 1).caller, TypeError);
+assertThrows(() => (() => 1).arguments, TypeError);
+
+assertThrows(() => new (AsyncFunction()), TypeError);
+assertThrows(() => AsyncFunction().caller, TypeError);
+assertThrows(() => AsyncFunction().arguments, TypeError);
+
+assertThrows(() => new (new AsyncFunction()), TypeError);
+assertThrows(() => (new AsyncFunction()).caller, TypeError);
+assertThrows(() => (new AsyncFunction()).arguments, TypeError);
// Normal completion
async function asyncDecl() { return "test"; }
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698