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

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

Issue 584993002: ES6: Implement object literal property shorthand (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-parsing.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
(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 })();
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698