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 24KDE JS Test 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS isNegativeZero(negativeZero) is true 30PASS isNegativeZero(0) is false 31PASS String()+Math.E is '2.718281828459045' 32PASS String()+Math.LN2 is '0.6931471805599453' 33PASS String()+Math.LN10 is '2.302585092994046' 34PASS String()+Math.LOG2E is '1.4426950408889634' 35PASS String()+Math.LOG10E is '0.4342944819032518' 36PASS String()+Math.PI is '3.141592653589793' 37PASS String()+Math.SQRT1_2 is '0.7071067811865476' 38PASS String()+Math.SQRT2 is '1.4142135623730951' 39PASS String()+Number.NaN is 'NaN' 40PASS String()+Number.NEGATIVE_INFINITY is '-Infinity' 41PASS String()+Number.POSITIVE_INFINITY is 'Infinity' 42PASS Math.abs(-5) is 5 43PASS Math.acos(0) is Math.PI/2 44PASS Math.acos(1) is 0 45PASS Math.ceil(1.1) is 2 46PASS String()+Math.sqrt(2) is String()+Math.SQRT2 47PASS Math.ceil(1.6) is 2 48PASS Math.round(0) is 0 49PASS isNegativeZero(Math.round(0)) is false 50PASS isNegativeZero(Math.round(negativeZero)) is true 51PASS Math.round(0.2) is 0 52PASS isNegativeZero(Math.round(-0.2)) is true 53PASS isNegativeZero(Math.round(-0.5)) is true 54PASS Math.round(1.1) is 1 55PASS Math.round(1.6) is 2 56PASS Math.round(-3.5) is -3 57PASS Math.round(-3.6) is -4 58PASS isNaN(Math.round()) is true 59PASS isNaN(Math.round(NaN)) is true 60PASS Math.round(-Infinity) is -Infinity 61PASS Math.round(Infinity) is Infinity 62PASS Math.round(99999999999999999999.99) is 100000000000000000000 63PASS Math.round(-99999999999999999999.99) is -100000000000000000000 64PASS Math.log(Math.E*Math.E) is 2 65PASS isNaN(Math.log(NaN)) is true 66PASS isNaN(Math.log(-1)) is true 67PASS isFinite(Math.log(0)) is false 68PASS Math.log(1) is 0 69PASS isFinite(Math.log(Infinity)) is false 70PASS isNegativeZero(Math.min(negativeZero, 0)) is true 71PASS isFinite(Math.max()) is false 72PASS Math.max(1) is 1 73PASS Math.max(1, 2, 3) is 3 74PASS isNaN(Math.max(1,NaN,3)) is true 75PASS !isNegativeZero(Math.max(negativeZero, 0)) is true 76PASS list is '' 77PASS delete my.v is true 78PASS my.v is undefined. 79PASS delete Math.PI is false 80PASS my = myfunc, myfunc(4) is 5 81PASS Boolean(Math) is true 82PASS isNaN(Number(Math)); is true 83PASS Math.abs===Math.abs is true 84PASS Math.abs===Math.round is false 85PASS list is 'a,b,' 86PASS list is '' 87PASS list is 'myprop,' 88PASS successfullyParsed is true 89 90TEST COMPLETE 91 92