Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/seal/symbol-object-contains-symbol-properties-strict.js

raw
1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 19.4
5 description: >
6 Object.seal(obj) where obj contains symbol properties.
7 flags: [onlyStrict]
8 features: [Symbol]
9 ---*/
10 var symA = Symbol("A");
11 var symB = Symbol("B");
12 var obj = {};
13 obj[symA] = 1;
14 Object.seal(obj);
15 obj[symA] = 2;
16
17 assert.sameValue(obj[symA], 2, "The value of `obj[symA]` is `2`");
18
19 assert.throws(TypeError, function() {
20 delete obj[symA];
21 });
22
23 assert.throws(TypeError, function() {
24 obj[symB] = 1;
25 });