tests/auto/qml/ecmascripttests/test262/test/built-ins/Array/isArray/15.4.3.2-2-1.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 | esid: sec-array.isarray |
| 6 | es5id: 15.4.3.2-2-1 |
| 7 | description: Array.isArray applied to an object with an array as the prototype |
| 8 | ---*/ |
| 9 | |
| 10 | var proto = []; |
| 11 | var Con = function() {}; |
| 12 | Con.prototype = proto; |
| 13 | |
| 14 | var child = new Con(); |
| 15 | |
| 16 | assert.sameValue(Array.isArray(child), false, 'Array.isArray(child)'); |