Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/computed-property-names/class/accessor/setter.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: 12.2.5
5 description: >
6 Computed property names for setters
7 ---*/
8 var calls = 0;
9 class C {
10 set ['a'](_) {
11 calls++;
12 }
13 }
14 new C().a = 'A';
15 assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C().a = 'A';`");