Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/keys/15.2.3.14-5-15.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.14-5-15
6 description: >
7 Object.keys - own enumerable indexed data property of String
8 object 'O' is defined in returned array
9 ---*/
10
11 var obj = new String("xyz");
12 obj[-20] = -20;
13 obj[20] = 20;
14
15 Object.defineProperty(obj, "prop", {
16 value: 1003,
17 enumerable: false,
18 configurable: true
19 });
20
21 var arr = Object.keys(obj);
22
23 for (var i = 0; i < arr.length; i++) {
24 assert(obj.hasOwnProperty(arr[i]), 'obj.hasOwnProperty(arr[i]) !== true');
25 }