• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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(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})();
34