Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/keys/15.2.3.14-6-4.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-6-4
6 description: >
7 Object.keys - the order of elements in returned array is the same
8 with the order of properties in 'O' (Arguments object)
9 ---*/
10
11 var func = function(a, b, c) {
12 return arguments;
13 };
14
15 var args = func(1, "b", false);
16
17 var tempArray = [];
18 for (var p in args) {
19 if (args.hasOwnProperty(p)) {
20 tempArray.push(p);
21 }
22 }
23
24 var returnedArray = Object.keys(args);
25
26 for (var index in returnedArray) {
27 assert.sameValue(tempArray[index], returnedArray[index], 'tempArray[index]');
28 }