| # Copyright 2013 the V8 project authors. All rights reserved. | |
| # Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # 1. Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # 2. Redistributions in binary form must reproduce the above copyright | |
| # notice, this list of conditions and the following disclaimer in the | |
| # documentation and/or other materials provided with the distribution. | |
| # | |
| # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY | |
| # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
| # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY | |
| # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
| # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
| # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
| # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
| # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| KDE JS Test | |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | |
| PASS Array().length is 0 | |
| PASS (new Array()).length is 0 | |
| PASS (new Array(3)).length is 3 | |
| PASS (new Array(11, 22)).length is 2 | |
| PASS (new Array(11, 22))[0] is 11 | |
| PASS Array(11, 22)[1] is 22 | |
| PASS (new Array(11, 22))[3] is undefined. | |
| PASS String(new Array(11, 22)) is '11,22' | |
| PASS var a = []; a[0] = 33; a[0] is 33 | |
| PASS var a = []; a[0] = 33; a.length is 1 | |
| PASS var a = [11, 22]; a.length = 1; String(a); is '11' | |
| PASS var a = [11, 22]; a.length = 1; a.length; is 1 | |
| PASS caught; is true | |
| PASS ename is 'RangeError' | |
| PASS caught; is true | |
| PASS ename is 'RangeError' | |
| PASS var a = [11, 22]; a.length = 1; a[1]; is undefined. | |
| PASS Array().toString() is '' | |
| PASS Array(3).toString() is ',,' | |
| PASS Array(11, 22).toString() is '11,22' | |
| PASS String(Array(11, 22).concat(33)) is '11,22,33' | |
| PASS String(Array(2).concat(33, 44)) is ',,33,44' | |
| PASS String(Array(2).concat(Array(2))) is ',,,' | |
| PASS String(Array(11,22).concat(Array(33,44))) is '11,22,33,44' | |
| PASS String(Array(1,2).concat(3,Array(4,5))) is '1,2,3,4,5' | |
| PASS var a = new Array(1,2,3); delete a[1]; String(a.concat(4)) is '1,,3,4' | |
| PASS [1,2,3,4].slice(1, 3).toString() is '2,3' | |
| PASS [1,2,3,4].slice(-3, -1).toString() is '2,3' | |
| PASS [1,2].slice(-9, 0).length is 0 | |
| PASS [1,2].slice(1).toString() is '2' | |
| PASS [1,2].slice().toString() is '1,2' | |
| PASS (new Array('a')).length is 1 | |
| PASS (new Array('a'))[0] is 'a' | |
| PASS (new Array('a'))[1] is undefined. | |
| PASS Array('a').length is 1 | |
| PASS Array('a')[0] is 'a' | |
| PASS String(Array()) is '' | |
| PASS String(Array('a','b')) is 'a,b' | |
| PASS [].length is 0 | |
| PASS ['a'].length is 1 | |
| PASS ['a'][0] is 'a' | |
| PASS ['a',,'c'][2] is 'c' | |
| PASS ['a',undefined,'c'][1] is undefined | |
| PASS ['a',,'c'][1] is undefined | |
| PASS 1 in ['a',,'c'] is false | |
| PASS 1 in ['a',undefined,'c'] is true | |
| PASS 1 in arrayWithDeletion is false | |
| PASS forInSum([]) is '' | |
| PASS forInSum(Array()) is '' | |
| PASS forInSum(Array('a')) is 'a' | |
| PASS forInSum([,undefined,'x','aa']) is 'undefinedxaa' | |
| PASS forInSum(a0) is '' | |
| PASS forInSum(a1) is 'a' | |
| PASS String([].sort()) is '' | |
| PASS String([3,1,'2'].sort()) is '1,2,3' | |
| PASS String([,'x','aa'].sort()) is 'aa,x,' | |
| PASS String([,undefined,'x','aa'].sort()) is 'aa,x,,' | |
| PASS 2 in [,undefined,'x','aa'].sort() is true | |
| PASS 3 in [,undefined,'x','aa'].sort() is false | |
| PASS var a = ['aa', 'b', 'cccc', 'ddd']; String(a.sort(comp)) is 'b,aa,ddd,cccc' | |
| PASS [0, Infinity].sort(function(a, b) { return a - b }).toString() is '0,Infinity' | |
| PASS [].unshift('a') is 1 | |
| PASS ['c'].unshift('a', 'b') is 3 | |
| PASS var a = []; a.unshift('a'); String(a) is 'a' | |
| PASS var a = ['c']; a.unshift('a', 'b'); String(a) is 'a,b,c' | |
| PASS String(['a', 'b', 'c'].splice(1, 2, 'x', 'y')) is 'b,c' | |
| PASS arr.length is 40 | |
| PASS arr[maxint] is "test" | |
| PASS arr.length is 40 | |
| PASS arr[maxint] is undefined | |
| PASS arr.length is maxint | |
| PASS arr[maxint-1] is "test2" | |
| PASS arr.length is 40 | |
| PASS arr[55.5] is "test" | |
| PASS arr[65.11111111111111111111111111111] is "test" | |
| PASS arr.length is 40 | |
| PASS arr[55.5] is undefined | |
| PASS arr[65.11111111111111111111111111111] is undefined | |
| PASS propnames.length is 3 | |
| PASS propnames[0] is '0' | |
| PASS propnames[1] is '1' | |
| PASS propnames[2] is '2' | |
| PASS successfullyParsed is true | |
| TEST COMPLETE | |