1 # Copyright 2013 the V8 project authors. All rights reserved. 2 # Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 # 4 # Redistribution and use in source and binary forms, with or without 5 # modification, are permitted provided that the following conditions 6 # are met: 7 # 1. Redistributions of source code must retain the above copyright 8 # notice, this list of conditions and the following disclaimer. 9 # 2. Redistributions in binary form must reproduce the above copyright 10 # notice, this list of conditions and the following disclaimer in the 11 # documentation and/or other materials provided with the distribution. 12 # 13 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20 # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 24 KDE JS Test 25 26 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29 PASS isNegativeZero(negativeZero) is true 30 PASS isNegativeZero(0) is false 31 PASS String()+Math.E is '2.718281828459045' 32 PASS String()+Math.LN2 is '0.6931471805599453' 33 PASS String()+Math.LN10 is '2.302585092994046' 34 PASS String()+Math.LOG2E is '1.4426950408889634' 35 PASS String()+Math.LOG10E is '0.4342944819032518' 36 PASS String()+Math.PI is '3.141592653589793' 37 PASS String()+Math.SQRT1_2 is '0.7071067811865476' 38 PASS String()+Math.SQRT2 is '1.4142135623730951' 39 PASS String()+Number.NaN is 'NaN' 40 PASS String()+Number.NEGATIVE_INFINITY is '-Infinity' 41 PASS String()+Number.POSITIVE_INFINITY is 'Infinity' 42 PASS Math.abs(-5) is 5 43 PASS Math.acos(0) is Math.PI/2 44 PASS Math.acos(1) is 0 45 PASS Math.ceil(1.1) is 2 46 PASS String()+Math.sqrt(2) is String()+Math.SQRT2 47 PASS Math.ceil(1.6) is 2 48 PASS Math.round(0) is 0 49 PASS isNegativeZero(Math.round(0)) is false 50 PASS isNegativeZero(Math.round(negativeZero)) is true 51 PASS Math.round(0.2) is 0 52 PASS isNegativeZero(Math.round(-0.2)) is true 53 PASS isNegativeZero(Math.round(-0.5)) is true 54 PASS Math.round(1.1) is 1 55 PASS Math.round(1.6) is 2 56 PASS Math.round(-3.5) is -3 57 PASS Math.round(-3.6) is -4 58 PASS isNaN(Math.round()) is true 59 PASS isNaN(Math.round(NaN)) is true 60 PASS Math.round(-Infinity) is -Infinity 61 PASS Math.round(Infinity) is Infinity 62 PASS Math.round(99999999999999999999.99) is 100000000000000000000 63 PASS Math.round(-99999999999999999999.99) is -100000000000000000000 64 PASS Math.log(Math.E*Math.E) is 2 65 PASS isNaN(Math.log(NaN)) is true 66 PASS isNaN(Math.log(-1)) is true 67 PASS isFinite(Math.log(0)) is false 68 PASS Math.log(1) is 0 69 PASS isFinite(Math.log(Infinity)) is false 70 PASS isNegativeZero(Math.min(negativeZero, 0)) is true 71 PASS isFinite(Math.max()) is false 72 PASS Math.max(1) is 1 73 PASS Math.max(1, 2, 3) is 3 74 PASS isNaN(Math.max(1,NaN,3)) is true 75 PASS !isNegativeZero(Math.max(negativeZero, 0)) is true 76 PASS list is '' 77 PASS delete my.v is true 78 PASS my.v is undefined. 79 PASS delete Math.PI is false 80 PASS my = myfunc, myfunc(4) is 5 81 PASS Boolean(Math) is true 82 PASS isNaN(Number(Math)); is true 83 PASS Math.abs===Math.abs is true 84 PASS Math.abs===Math.round is false 85 PASS list is 'a,b,' 86 PASS list is '' 87 PASS list is 'myprop,' 88 PASS successfullyParsed is true 89 90 TEST COMPLETE 91 92