1 // Copyright (c) 2014 Ecma International. All rights reserved.
2 // See LICENSE or https://github.com/tc39/test262/blob/HEAD/LICENSE
5 esid: sec-array.prototype.concat
6 info: Array.prototype.concat uses [[Get]] on 'length' to determine array length
9 checking whether non-ownProperties are seen, copied by Array.prototype.concat: Object.prototype[1]
14 assert.sameValue(a.length, 1, 'The value of a.length is expected to be 1');
18 assert.sameValue(a[1], undefined, 'The value of a[1] is expected to equal undefined');
19 assert.sameValue(a[2], undefined, 'The value of a[2] is expected to equal undefined');
21 Object.prototype[2] = 2;
23 assert.sameValue(a[1], undefined, 'The value of a[1] is expected to equal undefined');
24 assert.sameValue(a[2], 2, 'The value of a[2] is expected to be 2');
25 assert.sameValue(a.hasOwnProperty('1'), false, 'a.hasOwnProperty("1") must return false');
26 assert.sameValue(a.hasOwnProperty('2'), false, 'a.hasOwnProperty("2") must return false');
30 assert.sameValue(b.length, 3, 'The value of b.length is expected to be 3');
31 assert.sameValue(b[0], 0, 'The value of b[0] is expected to be 0');
32 assert.sameValue(b[1], undefined, 'The value of b[1] is expected to equal undefined');
33 assert.sameValue(b[2], 2, 'The value of b[2] is expected to be 2');
34 assert.sameValue(b.hasOwnProperty('1'), false, 'b.hasOwnProperty("1") must return false');
35 assert.sameValue(b.hasOwnProperty('2'), true, 'b.hasOwnProperty("2") must return true');