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

Unified Diff: test/mjsunit/es6/generators-iteration.js

Issue 1530213002: Make generators non-constructable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove broken tests 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/es6/generators-iteration.js
diff --git a/test/mjsunit/es6/generators-iteration.js b/test/mjsunit/es6/generators-iteration.js
index faeb68380fea4aa67a97ace057291d075e23a6c8..de4ae48ac6fb52f59f0059d993f86471ac0eb696 100644
--- a/test/mjsunit/es6/generators-iteration.js
+++ b/test/mjsunit/es6/generators-iteration.js
@@ -101,9 +101,9 @@ function TestGenerator(g, expected_values_for_next,
testThrow(function*() { return yield* g(); });
if (g instanceof GeneratorFunction) {
- testNext(function() { return new g(); });
- testSend(function() { return new g(); });
- testThrow(function() { return new g(); });
+ testNext(function() { return g(); });
neis 2016/01/14 10:55:23 testNext(g) etc
+ testSend(function() { return g(); });
+ testThrow(function() { return g(); });
}
}
@@ -247,29 +247,6 @@ TestGenerator(function* g16() { yield "baz"; gc(); yield "qux"; },
"foo",
["baz", "qux", undefined]);
-// Receivers.
-TestGenerator(
neis 2016/01/14 10:55:23 This one should still be fine, shouldn't it?
- function g17() {
- function* g() { yield this.x; yield this.y; }
- var o = { start: g, x: 1, y: 2 };
- return o.start();
- },
- [1, 2, undefined],
- "foo",
- [1, 2, undefined]);
-
-TestGenerator(
- function g18() {
- function* g() { yield this.x; yield this.y; }
- var iter = new g;
- iter.x = 1;
- iter.y = 2;
- return iter;
- },
- [1, 2, undefined],
- "foo",
- [1, 2, undefined]);
-
TestGenerator(
function* g19() {
var x = 1;

Powered by Google App Engine
This is Rietveld 408576698