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 24This test checks that toString() round-trip on a function that has a array with elision does not remove a comma. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS typeof undefined is 'undefined' 30PASS f1().length is 1 31PASS f1()[1-1] is undefined 32PASS unevalf(eval(unevalf(f1))) is unevalf(f1) 33PASS eval(unevalf(f1))().length is 1 34PASS eval(unevalf(f1))()[1-1] is undefined 35PASS f2().length is 1 36PASS f2()[1-1] is 1 37PASS unevalf(eval(unevalf(f2))) is unevalf(f2) 38PASS eval(unevalf(f2))().length is 1 39PASS eval(unevalf(f2))()[1-1] is 1 40PASS f3().length is 1 41PASS f3()[1-1] is 1 42PASS unevalf(eval(unevalf(f3))) is unevalf(f3) 43PASS eval(unevalf(f3))().length is 1 44PASS eval(unevalf(f3))()[1-1] is 1 45PASS f4().length is 2 46PASS f4()[2-1] is undefined 47PASS unevalf(eval(unevalf(f4))) is unevalf(f4) 48PASS eval(unevalf(f4))().length is 2 49PASS eval(unevalf(f4))()[2-1] is undefined 50PASS f5().length is 3 51PASS f5()[3-1] is undefined 52PASS unevalf(eval(unevalf(f5))) is unevalf(f5) 53PASS eval(unevalf(f5))().length is 3 54PASS eval(unevalf(f5))()[3-1] is undefined 55PASS f6().length is 4 56PASS f6()[4-1] is 4 57PASS unevalf(eval(unevalf(f6))) is unevalf(f6) 58PASS eval(unevalf(f6))().length is 4 59PASS eval(unevalf(f6))()[4-1] is 4 60PASS f7().length is 2 61PASS f7()[2-1] is 2 62PASS unevalf(eval(unevalf(f7))) is unevalf(f7) 63PASS eval(unevalf(f7))().length is 2 64PASS eval(unevalf(f7))()[2-1] is 2 65PASS f8().length is 3 66PASS f8()[3-1] is undefined 67PASS unevalf(eval(unevalf(f8))) is unevalf(f8) 68PASS eval(unevalf(f8))().length is 3 69PASS eval(unevalf(f8))()[3-1] is undefined 70PASS f9().length is 5 71PASS f9()[5-1] is 5 72PASS unevalf(eval(unevalf(f9))) is unevalf(f9) 73PASS eval(unevalf(f9))().length is 5 74PASS eval(unevalf(f9))()[5-1] is 5 75PASS f10().length is 5 76PASS f10()[5-1] is undefined 77PASS unevalf(eval(unevalf(f10))) is unevalf(f10) 78PASS eval(unevalf(f10))().length is 5 79PASS eval(unevalf(f10))()[5-1] is undefined 80PASS f11().length is 6 81PASS f11()[6-1] is 6 82PASS unevalf(eval(unevalf(f11))) is unevalf(f11) 83PASS eval(unevalf(f11))().length is 6 84PASS eval(unevalf(f11))()[6-1] is 6 85PASS f12().length is 2 86PASS f12()[2-1] is undefined 87PASS unevalf(eval(unevalf(f12))) is unevalf(f12) 88PASS eval(unevalf(f12))().length is 2 89PASS eval(unevalf(f12))()[2-1] is undefined 90PASS f13().length is 2 91PASS f13()[2-1] is undefined 92PASS unevalf(eval(unevalf(f13))) is unevalf(f13) 93PASS eval(unevalf(f13))().length is 2 94PASS eval(unevalf(f13))()[2-1] is undefined 95PASS f14().length is 3 96PASS f14()[3-1] is undefined 97PASS unevalf(eval(unevalf(f14))) is unevalf(f14) 98PASS eval(unevalf(f14))().length is 3 99PASS eval(unevalf(f14))()[3-1] is undefined 100PASS f15().length is 2 101PASS f15()[2-1] is undefined 102PASS unevalf(eval(unevalf(f15))) is unevalf(f15) 103PASS eval(unevalf(f15))().length is 2 104PASS eval(unevalf(f15))()[2-1] is undefined 105PASS f16().length is 3 106PASS f16()[3-1] is undefined 107PASS unevalf(eval(unevalf(f16))) is unevalf(f16) 108PASS eval(unevalf(f16))().length is 3 109PASS eval(unevalf(f16))()[3-1] is undefined 110PASS successfullyParsed is true 111 112TEST COMPLETE 113 114