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 thoroughly checks the behaviour of the 'arguments' object. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS access_1(1, 2, 3) is 1 30PASS access_2(1, 2, 3) is 2 31PASS access_3(1, 2, 3) is 3 32PASS access_4(1, 2, 3) is undefined 33PASS access_5(1, 2, 3) is undefined 34PASS access_1(1) is 1 35PASS access_2(1) is undefined 36PASS access_3(1) is undefined 37PASS access_4(1) is undefined 38PASS access_5(1) is undefined 39PASS access_1(1, 2, 3, 4, 5) is 1 40PASS access_2(1, 2, 3, 4, 5) is 2 41PASS access_3(1, 2, 3, 4, 5) is 3 42PASS access_4(1, 2, 3, 4, 5) is 4 43PASS access_5(1, 2, 3, 4, 5) is 5 44PASS argumentLengthIs5() is 5 45PASS argumentLengthIs5(1,2,3,4,5) is 5 46PASS argumentLengthIs5(1,2,3,4,5,6,7,8,9,10) is 5 47PASS duplicateArgumentAndReturnLast_call(1) is 1 48PASS duplicateArgumentAndReturnFirst_call(1) is 1 49PASS duplicateArgumentAndReturnLast_apply(1) is 1 50PASS duplicateArgumentAndReturnFirst_apply(1) is 1 51PASS tear_off_equal_access_1(1, 2, 3) is 1 52PASS tear_off_equal_access_2(1, 2, 3) is 2 53PASS tear_off_equal_access_3(1, 2, 3) is 3 54PASS tear_off_equal_access_4(1, 2, 3) is undefined 55PASS tear_off_equal_access_5(1, 2, 3) is undefined 56PASS tear_off_too_few_access_1(1) is 1 57PASS tear_off_too_few_access_2(1) is undefined 58PASS tear_off_too_few_access_3(1) is undefined 59PASS tear_off_too_few_access_4(1) is undefined 60PASS tear_off_too_few_access_5(1) is undefined 61PASS tear_off_too_many_access_1(1, 2, 3, 4, 5) is 1 62PASS tear_off_too_many_access_2(1, 2, 3, 4, 5) is 2 63PASS tear_off_too_many_access_3(1, 2, 3, 4, 5) is 3 64PASS tear_off_too_many_access_4(1, 2, 3, 4, 5) is 4 65PASS tear_off_too_many_access_5(1, 2, 3, 4, 5) is 5 66PASS live_1(0, 2, 3) is 1 67PASS live_2(1, 0, 3) is 2 68PASS live_3(1, 2, 0) is 3 69PASS live_1(0) is 1 70PASS live_2(1) is undefined 71PASS live_3(1) is undefined 72PASS live_1(0, 2, 3, 4, 5) is 1 73PASS live_2(1, 0, 3, 4, 5) is 2 74PASS live_3(1, 2, 0, 4, 5) is 3 75PASS extra_args_modify_4(1, 2, 3, 0, 5) is 4 76PASS extra_args_modify_5(1, 2, 3, 4, 0) is 5 77PASS tear_off_live_1(0, 2, 3)() is 1 78PASS tear_off_live_2(1, 0, 3)() is 2 79PASS tear_off_live_3(1, 2, 0)() is 3 80PASS tear_off_live_1(0)() is 1 81PASS tear_off_live_2(1)() is undefined 82PASS tear_off_live_3(1)() is undefined 83PASS tear_off_live_1(0, 2, 3, 4, 5)() is 1 84PASS tear_off_live_2(1, 0, 3, 4, 5)() is 2 85PASS tear_off_live_3(1, 2, 0, 4, 5)() is 3 86PASS tear_off_extra_args_modify_4(1, 2, 3, 0, 5)() is 4 87PASS tear_off_extra_args_modify_5(1, 2, 3, 4, 0)() is 5 88PASS delete_1(1, 2, 3) is undefined 89PASS delete_2(1, 2, 3) is undefined 90PASS delete_3(1, 2, 3) is undefined 91PASS delete_4(1, 2, 3) is undefined 92PASS delete_5(1, 2, 3) is undefined 93PASS delete_1(1) is undefined 94PASS delete_2(1) is undefined 95PASS delete_3(1) is undefined 96PASS delete_4(1) is undefined 97PASS delete_5(1) is undefined 98PASS delete_1(1, 2, 3, 4, 5) is undefined 99PASS delete_2(1, 2, 3, 4, 5) is undefined 100PASS delete_3(1, 2, 3, 4, 5) is undefined 101PASS delete_4(1, 2, 3, 4, 5) is undefined 102PASS delete_5(1, 2, 3, 4, 5) is undefined 103PASS tear_off_delete_1(1, 2, 3)() is undefined 104PASS tear_off_delete_2(1, 2, 3)() is undefined 105PASS tear_off_delete_3(1, 2, 3)() is undefined 106PASS tear_off_delete_4(1, 2, 3)() is undefined 107PASS tear_off_delete_5(1, 2, 3)() is undefined 108PASS tear_off_delete_1(1)() is undefined 109PASS tear_off_delete_2(1)() is undefined 110PASS tear_off_delete_3(1)() is undefined 111PASS tear_off_delete_4(1)() is undefined 112PASS tear_off_delete_5(1)() is undefined 113PASS tear_off_delete_1(1, 2, 3, 4, 5)() is undefined 114PASS tear_off_delete_2(1, 2, 3, 4, 5)() is undefined 115PASS tear_off_delete_3(1, 2, 3, 4, 5)() is undefined 116PASS tear_off_delete_4(1, 2, 3, 4, 5)() is undefined 117PASS tear_off_delete_5(1, 2, 3, 4, 5)() is undefined 118PASS delete_not_live_1(1, 2, 3) is 1 119PASS delete_not_live_2(1, 2, 3) is 2 120PASS delete_not_live_3(1, 2, 3) is 3 121PASS delete_not_live_1(1) is 1 122PASS delete_not_live_2(1) is undefined 123PASS delete_not_live_3(1) is undefined 124PASS delete_not_live_1(1, 2, 3, 4, 5) is 1 125PASS delete_not_live_2(1, 2, 3, 4, 5) is 2 126PASS delete_not_live_3(1, 2, 3, 4, 5) is 3 127PASS tear_off_delete_not_live_1(1, 2, 3)() is 1 128PASS tear_off_delete_not_live_2(1, 2, 3)() is 2 129PASS tear_off_delete_not_live_3(1, 2, 3)() is 3 130PASS tear_off_delete_not_live_1(1)() is 1 131PASS tear_off_delete_not_live_2(1)() is undefined 132PASS tear_off_delete_not_live_3(1)() is undefined 133PASS tear_off_delete_not_live_1(1, 2, 3, 4, 5)() is 1 134PASS tear_off_delete_not_live_2(1, 2, 3, 4, 5)() is 2 135PASS tear_off_delete_not_live_3(1, 2, 3, 4, 5)() is 3 136PASS access_after_delete_named_2(1, 2, 3) is 2 137PASS access_after_delete_named_3(1, 2, 3) is 3 138PASS access_after_delete_named_4(1, 2, 3) is undefined 139PASS access_after_delete_named_2(1) is undefined 140PASS access_after_delete_named_3(1) is undefined 141PASS access_after_delete_named_4(1) is undefined 142PASS access_after_delete_named_2(1, 2, 3, 4) is 2 143PASS access_after_delete_named_3(1, 2, 3, 4) is 3 144PASS access_after_delete_named_4(1, 2, 3, 4) is 4 145PASS access_after_delete_extra_1(1, 2, 3) is 1 146PASS access_after_delete_extra_2(1, 2, 3) is 2 147PASS access_after_delete_extra_3(1, 2, 3) is 3 148PASS access_after_delete_extra_5(1, 2, 3) is undefined 149PASS access_after_delete_extra_1(1) is 1 150PASS access_after_delete_extra_2(1) is undefined 151PASS access_after_delete_extra_3(1) is undefined 152PASS access_after_delete_extra_5(1) is undefined 153PASS access_after_delete_extra_1(1, 2, 3, 4, 5) is 1 154PASS access_after_delete_extra_2(1, 2, 3, 4, 5) is 2 155PASS access_after_delete_extra_3(1, 2, 3, 4, 5) is 3 156PASS access_after_delete_extra_5(1, 2, 3, 4, 5) is 5 157PASS argumentsParam(true) is true 158PASS argumentsFunctionConstructorParam(true) is true 159PASS argumentsVarUndefined() is '[object Arguments]' 160FAIL argumentsConstUndefined() should be [object Arguments]. Threw exception TypeError: Identifier 'arguments' has already been declared 161PASS argumentCalleeInException() is argumentCalleeInException 162PASS shadowedArgumentsApply([true]) is true 163PASS shadowedArgumentsLength([]) is 0 164PASS shadowedArgumentsLength() threw exception TypeError: Cannot read property 'length' of undefined. 165PASS shadowedArgumentsCallee([]) is undefined. 166PASS shadowedArgumentsIndex([true]) is true 167PASS descriptor.value is "one" 168PASS descriptor.writable is true 169PASS descriptor.enumerable is true 170PASS descriptor.configurable is true 171PASS true is true 172PASS true is true 173PASS true is true 174PASS true is true 175PASS true is true 176PASS true is true 177PASS true is true 178PASS true is true 179PASS true is true 180PASS true is true 181PASS true is true 182PASS true is true 183PASS true is true 184PASS true is true 185PASS true is true 186PASS true is true 187PASS true is true 188PASS true is true 189PASS true is true 190PASS true is true 191PASS true is true 192PASS true is true 193PASS true is true 194PASS true is true 195PASS true is true 196PASS true is true 197PASS false is false 198PASS true is true 199PASS false is false 200PASS false is false 201PASS undefined is undefined. 202PASS true is true 203PASS false is false 204PASS successfullyParsed is true 205 206TEST COMPLETE 207 208