Debian Codegraph @

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