Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/preventExtensions/symbol-object-contains-symbol-properties-non-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.preventExtensions(obj) where obj contains symbol properties.
7 flags: [noStrict]
8 features: [Symbol]
9 ---*/
10 var symA = Symbol("A");
11 var symB = Symbol("B");
12 var obj = {};
13 obj[symA] = 1;
14 Object.preventExtensions(obj);
15 obj[symA] = 2;
16 obj[symB] = 1;
17
18 assert.sameValue(obj[symA], 2, "The value of `obj[symA]` is `2`");
19 assert.sameValue(delete obj[symA], true, "`delete obj[symA]` is `true`");
20 assert.sameValue(obj[symB], undefined, "The value of `obj[symB]` is `undefined`");