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

Side by Side Diff: test/mjsunit/harmony/method-name-eval-arguments.js

Issue 899363002: Allow eval and arguments as property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup based on code review Created 5 years, 10 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 2015 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 (function TestSloppyMode() {
8 var o = {
9 eval() {
10 return 1;
11 },
12 arguments() {
13 return 2;
14 },
15 };
16
17 assertEquals(1, o.eval());
18 assertEquals(2, o.arguments());
19 })();
20
21 (function TestStrictMode() {
22 'use strict';
23
24 var o = {
25 eval() {
26 return 1;
27 },
28 arguments() {
29 return 2;
30 },
31 };
32
33 assertEquals(1, o.eval());
34 assertEquals(2, o.arguments());
35 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/class-property-name-eval-arguments.js ('k') | test/mjsunit/property-name-eval-arguments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698