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-generators | 5 // Flags: --harmony-arrays --harmony-generators |
6 (function() { | 6 (function() { |
7 | 7 |
8 assertEquals(1, Array.from.length); | 8 assertEquals(1, Array.from.length); |
9 | 9 |
10 function assertArrayLikeEquals(value, expected, type) { | 10 function assertArrayLikeEquals(value, expected, type) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 function Other() {} | 111 function Other() {} |
112 | 112 |
113 var boundFn = (function() {}).bind(Array, 27); | 113 var boundFn = (function() {}).bind(Array, 27); |
114 | 114 |
115 testArrayFrom(Array, Array); | 115 testArrayFrom(Array, Array); |
116 testArrayFrom(null, Array); | 116 testArrayFrom(null, Array); |
117 testArrayFrom({}, Array); | 117 testArrayFrom({}, Array); |
118 testArrayFrom(Object, Object); | 118 testArrayFrom(Object, Object); |
119 testArrayFrom(Other, Other); | 119 testArrayFrom(Other, Other); |
120 testArrayFrom(Math.cos, Array); | 120 testArrayFrom(Math.cos, Array); |
121 testArrayFrom(boundFn, Array); | 121 testArrayFrom(Math.cos.bind(Math), Array); |
| 122 testArrayFrom(boundFn, boundFn); |
122 | 123 |
123 })(); | 124 })(); |
OLD | NEW |