blob: 8792177e25082cccf062fee23b6cf05aadb95113 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// 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(function TestSloppyMode() {
6 var o = {
7 eval() {
8 return 1;
9 },
10 arguments() {
11 return 2;
12 },
13 };
14
15 assertEquals(1, o.eval());
16 assertEquals(2, o.arguments());
17})();
18
19(function TestStrictMode() {
20 'use strict';
21
22 var o = {
23 eval() {
24 return 1;
25 },
26 arguments() {
27 return 2;
28 },
29 };
30
31 assertEquals(1, o.eval());
32 assertEquals(2, o.arguments());
33})();