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

Side by Side Diff: test/mjsunit/harmony/object-literals-property-shorthand.js

Issue 1218473003: [es6] Remove harmony-object-literal flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update description of harmony classes flag Created 5 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --harmony-object-literals
6
7
8 (function TestBasics() {
9 var x = 1;
10 var object = {x};
11 assertEquals(1, object.x);
12 })();
13
14
15 (function TestDescriptor() {
16 var x = 1;
17 var object = {x};
18 var descr = Object.getOwnPropertyDescriptor(object, 'x');
19 assertEquals(1, descr.value);
20 assertTrue(descr.enumerable);
21 assertTrue(descr.writable);
22 assertTrue(descr.configurable);
23 })();
24
25
26 (function TestNotDefined() {
27 'use strict';
28 assertThrows(function() {
29 return {notDefined};
30 }, ReferenceError);
31 })();
32
33
34 (function TestLet() {
35 var let = 1;
36 var object = {let};
37 assertEquals(1, object.let);
38 })();
39
40
41 (function TestYieldInFunction() {
42 var yield = 1;
43 var object = {yield};
44 assertEquals(1, object.yield);
45 })();
46
47
48 (function TestToString() {
49 function f(x) { return {x}; }
50 assertEquals('function f(x) { return {x}; }', f.toString());
51 })();
52
53
54 (function TestProtoName() {
55 var __proto__ = 1;
56 var object = {
57 __proto__
58 };
59 assertEquals(Object.prototype, Object.getPrototypeOf(object));
60 assertEquals(1, object.__proto__);
61 })();
62
63
64 (function TestProtoName2() {
65 var __proto__ = 1;
66 var p = {};
67 var object = {
68 __proto__: p,
69 __proto__,
70 };
71 assertEquals(p, Object.getPrototypeOf(object));
72 assertEquals(1, object.__proto__);
73 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/object-literals-method.js ('k') | test/mjsunit/regress/regress-parse-object-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698