Debian Codegraph @

js/src/tests/test262/language/statements/class/definition/methods-named-eval-arguments.js

raw
1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 14.5
5 description: >
6 class methods 2
7 ---*/
8 class C {
9 eval() {
10 return 1;
11 }
12 arguments() {
13 return 2;
14 }
15 static eval() {
16 return 3;
17 }
18 static arguments() {
19 return 4;
20 }
21 };
22
23 assert.sameValue(new C().eval(), 1, "`new C().eval()` returns `1`");
24 assert.sameValue(new C().arguments(), 2, "`new C().arguments()` returns `2`");
25 assert.sameValue(C.eval(), 3, "`C.eval()` returns `3`");
26 assert.sameValue(C.arguments(), 4, "`C.arguments()` returns `4`");
27
28 reportCompare(0, 0);