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

Unified Diff: test/mjsunit/es6/object-literals-method.js

Issue 1590873002: Make generators non-constructable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt test262.status Created 4 years, 11 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 | « test/mjsunit/es6/generators-objects.js ('k') | test/mjsunit/harmony/reflect-construct.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/object-literals-method.js
diff --git a/test/mjsunit/es6/object-literals-method.js b/test/mjsunit/es6/object-literals-method.js
index e4527cb776b569b33dcecbc9907bf23d1861ac90..90bc51ec03d55f352775a9a9728a7a48e31080ff 100644
--- a/test/mjsunit/es6/object-literals-method.js
+++ b/test/mjsunit/es6/object-literals-method.js
@@ -239,16 +239,14 @@ function assertIteratorResult(value, done, result) {
})();
-(function TestGeneratorConstructable() {
+(function TestGeneratorNotConstructable() {
var object = {
*method() {
yield 1;
}
};
- var g = new object.method();
- assertIteratorResult(1, false, g.next());
- assertIteratorResult(undefined, true, g.next());
+ assertThrows(()=>new object.method());
})();
« no previous file with comments | « test/mjsunit/es6/generators-objects.js ('k') | test/mjsunit/harmony/reflect-construct.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698