blob: 9da1e85f50608f52186984485319c347774f8e41 [file] [log] [blame]
This test thoroughly checks the behaviour of the 'arguments' object.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS access_1(1, 2, 3) is 1
PASS access_2(1, 2, 3) is 2
PASS access_3(1, 2, 3) is 3
PASS access_4(1, 2, 3) is undefined
PASS access_5(1, 2, 3) is undefined
PASS access_1(1) is 1
PASS access_2(1) is undefined
PASS access_3(1) is undefined
PASS access_4(1) is undefined
PASS access_5(1) is undefined
PASS access_1(1, 2, 3, 4, 5) is 1
PASS access_2(1, 2, 3, 4, 5) is 2
PASS access_3(1, 2, 3, 4, 5) is 3
PASS access_4(1, 2, 3, 4, 5) is 4
PASS access_5(1, 2, 3, 4, 5) is 5
PASS argumentLengthIs5() is 5
PASS argumentLengthIs5(1,2,3,4,5) is 5
PASS argumentLengthIs5(1,2,3,4,5,6,7,8,9,10) is 5
PASS duplicateArgumentAndReturnLast_call(1) is 1
PASS duplicateArgumentAndReturnFirst_call(1) is 1
PASS duplicateArgumentAndReturnLast_apply(1) is 1
PASS duplicateArgumentAndReturnFirst_apply(1) is 1
PASS tear_off_equal_access_1(1, 2, 3) is 1
PASS tear_off_equal_access_2(1, 2, 3) is 2
PASS tear_off_equal_access_3(1, 2, 3) is 3
PASS tear_off_equal_access_4(1, 2, 3) is undefined
PASS tear_off_equal_access_5(1, 2, 3) is undefined
PASS tear_off_too_few_access_1(1) is 1
PASS tear_off_too_few_access_2(1) is undefined
PASS tear_off_too_few_access_3(1) is undefined
PASS tear_off_too_few_access_4(1) is undefined
PASS tear_off_too_few_access_5(1) is undefined
PASS tear_off_too_many_access_1(1, 2, 3, 4, 5) is 1
PASS tear_off_too_many_access_2(1, 2, 3, 4, 5) is 2
PASS tear_off_too_many_access_3(1, 2, 3, 4, 5) is 3
PASS tear_off_too_many_access_4(1, 2, 3, 4, 5) is 4
PASS tear_off_too_many_access_5(1, 2, 3, 4, 5) is 5
PASS live_1(0, 2, 3) is 1
PASS live_2(1, 0, 3) is 2
PASS live_3(1, 2, 0) is 3
PASS live_1(0) is 1
PASS live_2(1) is undefined
PASS live_3(1) is undefined
PASS live_1(0, 2, 3, 4, 5) is 1
PASS live_2(1, 0, 3, 4, 5) is 2
PASS live_3(1, 2, 0, 4, 5) is 3
PASS extra_args_modify_4(1, 2, 3, 0, 5) is 4
PASS extra_args_modify_5(1, 2, 3, 4, 0) is 5
PASS tear_off_live_1(0, 2, 3)() is 1
PASS tear_off_live_2(1, 0, 3)() is 2
PASS tear_off_live_3(1, 2, 0)() is 3
PASS tear_off_live_1(0)() is 1
PASS tear_off_live_2(1)() is undefined
PASS tear_off_live_3(1)() is undefined
PASS tear_off_live_1(0, 2, 3, 4, 5)() is 1
PASS tear_off_live_2(1, 0, 3, 4, 5)() is 2
PASS tear_off_live_3(1, 2, 0, 4, 5)() is 3
PASS tear_off_extra_args_modify_4(1, 2, 3, 0, 5)() is 4
PASS tear_off_extra_args_modify_5(1, 2, 3, 4, 0)() is 5
PASS delete_1(1, 2, 3) is undefined
PASS delete_2(1, 2, 3) is undefined
PASS delete_3(1, 2, 3) is undefined
PASS delete_4(1, 2, 3) is undefined
PASS delete_5(1, 2, 3) is undefined
PASS delete_1(1) is undefined
PASS delete_2(1) is undefined
PASS delete_3(1) is undefined
PASS delete_4(1) is undefined
PASS delete_5(1) is undefined
PASS delete_1(1, 2, 3, 4, 5) is undefined
PASS delete_2(1, 2, 3, 4, 5) is undefined
PASS delete_3(1, 2, 3, 4, 5) is undefined
PASS delete_4(1, 2, 3, 4, 5) is undefined
PASS delete_5(1, 2, 3, 4, 5) is undefined
PASS tear_off_delete_1(1, 2, 3)() is undefined
PASS tear_off_delete_2(1, 2, 3)() is undefined
PASS tear_off_delete_3(1, 2, 3)() is undefined
PASS tear_off_delete_4(1, 2, 3)() is undefined
PASS tear_off_delete_5(1, 2, 3)() is undefined
PASS tear_off_delete_1(1)() is undefined
PASS tear_off_delete_2(1)() is undefined
PASS tear_off_delete_3(1)() is undefined
PASS tear_off_delete_4(1)() is undefined
PASS tear_off_delete_5(1)() is undefined
PASS tear_off_delete_1(1, 2, 3, 4, 5)() is undefined
PASS tear_off_delete_2(1, 2, 3, 4, 5)() is undefined
PASS tear_off_delete_3(1, 2, 3, 4, 5)() is undefined
PASS tear_off_delete_4(1, 2, 3, 4, 5)() is undefined
PASS tear_off_delete_5(1, 2, 3, 4, 5)() is undefined
PASS delete_not_live_1(1, 2, 3) is 1
PASS delete_not_live_2(1, 2, 3) is 2
PASS delete_not_live_3(1, 2, 3) is 3
PASS delete_not_live_1(1) is 1
PASS delete_not_live_2(1) is undefined
PASS delete_not_live_3(1) is undefined
PASS delete_not_live_1(1, 2, 3, 4, 5) is 1
PASS delete_not_live_2(1, 2, 3, 4, 5) is 2
PASS delete_not_live_3(1, 2, 3, 4, 5) is 3
PASS tear_off_delete_not_live_1(1, 2, 3)() is 1
PASS tear_off_delete_not_live_2(1, 2, 3)() is 2
PASS tear_off_delete_not_live_3(1, 2, 3)() is 3
PASS tear_off_delete_not_live_1(1)() is 1
PASS tear_off_delete_not_live_2(1)() is undefined
PASS tear_off_delete_not_live_3(1)() is undefined
PASS tear_off_delete_not_live_1(1, 2, 3, 4, 5)() is 1
PASS tear_off_delete_not_live_2(1, 2, 3, 4, 5)() is 2
PASS tear_off_delete_not_live_3(1, 2, 3, 4, 5)() is 3
PASS access_after_delete_named_2(1, 2, 3) is 2
PASS access_after_delete_named_3(1, 2, 3) is 3
PASS access_after_delete_named_4(1, 2, 3) is undefined
PASS access_after_delete_named_2(1) is undefined
PASS access_after_delete_named_3(1) is undefined
PASS access_after_delete_named_4(1) is undefined
PASS access_after_delete_named_2(1, 2, 3, 4) is 2
PASS access_after_delete_named_3(1, 2, 3, 4) is 3
PASS access_after_delete_named_4(1, 2, 3, 4) is 4
PASS access_after_delete_extra_1(1, 2, 3) is 1
PASS access_after_delete_extra_2(1, 2, 3) is 2
PASS access_after_delete_extra_3(1, 2, 3) is 3
PASS access_after_delete_extra_5(1, 2, 3) is undefined
PASS access_after_delete_extra_1(1) is 1
PASS access_after_delete_extra_2(1) is undefined
PASS access_after_delete_extra_3(1) is undefined
PASS access_after_delete_extra_5(1) is undefined
PASS access_after_delete_extra_1(1, 2, 3, 4, 5) is 1
PASS access_after_delete_extra_2(1, 2, 3, 4, 5) is 2
PASS access_after_delete_extra_3(1, 2, 3, 4, 5) is 3
PASS access_after_delete_extra_5(1, 2, 3, 4, 5) is 5
PASS argumentsParam(true) is true
PASS argumentsFunctionConstructorParam(true) is true
PASS argumentsVarUndefined() is '[object Arguments]'
PASS argumentsConstUndefined() is '[object Arguments]'
PASS argumentCalleeInException() is argumentCalleeInException
PASS shadowedArgumentsApply([true]) is true
PASS shadowedArgumentsLength([]) is 0
PASS shadowedArgumentsLength() threw exception TypeError: undefined is not an object (evaluating 'arguments.length').
PASS shadowedArgumentsCallee([]) is undefined.
PASS shadowedArgumentsIndex([true]) is true
PASS descriptor.value is "one"
PASS descriptor.writable is true
PASS descriptor.enumerable is true
PASS descriptor.configurable is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS true is true
PASS false is false
PASS true is true
PASS false is false
PASS false is false
PASS undefined is undefined.
PASS true is true
PASS false is false
PASS successfullyParsed is true
TEST COMPLETE