Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-47.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.4-4-47
6 description: >
7 Object.getOwnPropertyNames - own data property of Array object 'O'
8 is pushed into the returned array
9 ---*/
10
11 var propertyFound = false;
12
13 var arr = [0, 1, 2];
14 arr.ownProperty = "ownArray";
15
16 var result = Object.getOwnPropertyNames(arr);
17
18 for (var p in result) {
19 if (result[p] === "ownProperty") {
20 propertyFound = true;
21 break;
22 }
23 }
24
25 assert(propertyFound, 'Property not found');