Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-354-7.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.6-4-354-7
6 description: >
7 ES5 Attributes - property 'P' with attributes [[Writable]]: false,
8 [[Enumerable]]: true, [[Configurable]] : true) is non-writable
9 using simple assignment, 'O' is an Arguments object
10 includes: [propertyHelper.js]
11 ---*/
12
13 var obj = (function() {
14 return arguments;
15 }());
16
17 Object.defineProperty(obj, "prop", {
18 value: 2010,
19 writable: false,
20 enumerable: true,
21 configurable: true
22 });
23
24 assert.sameValue(obj.prop, 2010);
25 verifyNotWritable(obj, "prop");