Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/preventExtensions/15.2.3.10-3-23.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.2.3.10-3-23
6 description: >
7 Object.preventExtensions - properties can still be reassigned
8 after extensions have been prevented
9 ---*/
10
11 var obj = {
12 prop: 12
13 };
14 var preCheck = Object.isExtensible(obj);
15 Object.preventExtensions(obj);
16
17 obj.prop = -1;
18
19 assert(preCheck, 'preCheck !== true');
20 assert.sameValue(obj.prop, -1, 'obj.prop');