tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/properties-names-eval-arguments.js
raw| 1 | // Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | /*--- |
| 4 | es6id: 12.2.5 |
| 5 | description: > |
| 6 | property names `eval` and `arguments` |
| 7 | ---*/ |
| 8 | var o = { |
| 9 | eval() { |
| 10 | return 1; |
| 11 | }, |
| 12 | arguments() { |
| 13 | return 2; |
| 14 | }, |
| 15 | }; |
| 16 | |
| 17 | assert.sameValue(o.eval(), 1, "`o.eval()` returns `1`"); |
| 18 | assert.sameValue(o.arguments(), 2, "`o.arguments()` returns `2`"); |