tests/auto/qml/ecmascripttests/test262/test/built-ins/Array/from/source-object-without.js
raw| 1 | // Copyright 2015 Microsoft Corporation. All rights reserved. |
| 2 | // This code is governed by the license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | description: Source is an object without length property |
| 6 | esid: sec-array.from |
| 7 | es6id: 22.1.2.1 |
| 8 | ---*/ |
| 9 | |
| 10 | var obj = { |
| 11 | 0: 2, |
| 12 | 1: 4, |
| 13 | 2: 8, |
| 14 | 3: 16 |
| 15 | } |
| 16 | |
| 17 | var a = Array.from(obj); |
| 18 | assert.sameValue(a.length, 0, "Expected an array of length 0."); |