OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-arrays --harmony-classes | 5 // Flags: --harmony-arrays |
6 | 6 |
7 (function testArrayConcatArity() { | 7 (function testArrayConcatArity() { |
8 "use strict"; | 8 "use strict"; |
9 assertEquals(1, Array.prototype.concat.length); | 9 assertEquals(1, Array.prototype.concat.length); |
10 })(); | 10 })(); |
11 | 11 |
12 | 12 |
13 (function testArrayConcatNoPrototype() { | 13 (function testArrayConcatNoPrototype() { |
14 "use strict"; | 14 "use strict"; |
15 assertEquals(void 0, Array.prototype.concat.prototype); | 15 assertEquals(void 0, Array.prototype.concat.prototype); |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 arr3.length = 10000; | 699 arr3.length = 10000; |
700 for (var i = 0; i < 100; i++) { | 700 for (var i = 0; i < 100; i++) { |
701 Object.defineProperty(arr3, i * i, {get: mkGetter(i)}); | 701 Object.defineProperty(arr3, i * i, {get: mkGetter(i)}); |
702 expectedTrace[i] = i; | 702 expectedTrace[i] = i; |
703 expectedTrace[100 + i] = i; | 703 expectedTrace[100 + i] = i; |
704 } | 704 } |
705 var r4 = [0].concat(arr3, arr3); | 705 var r4 = [0].concat(arr3, arr3); |
706 assertEquals(1 + arr3.length * 2, r4.length); | 706 assertEquals(1 + arr3.length * 2, r4.length); |
707 assertEquals(expectedTrace, trace); | 707 assertEquals(expectedTrace, trace); |
708 })(); | 708 })(); |
OLD | NEW |