cwzwarich@webkit.org | 4e9a20c | 2008-09-21 08:37:01 +0000 | [diff] [blame] | 1 | This test thoroughly checks the behaviour of the 'arguments' object. |
| 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
| 6 | PASS access_1(1, 2, 3) is 1 |
| 7 | PASS access_2(1, 2, 3) is 2 |
| 8 | PASS access_3(1, 2, 3) is 3 |
| 9 | PASS access_4(1, 2, 3) is undefined |
| 10 | PASS access_5(1, 2, 3) is undefined |
| 11 | PASS access_1(1) is 1 |
| 12 | PASS access_2(1) is undefined |
| 13 | PASS access_3(1) is undefined |
| 14 | PASS access_4(1) is undefined |
| 15 | PASS access_5(1) is undefined |
| 16 | PASS access_1(1, 2, 3, 4, 5) is 1 |
| 17 | PASS access_2(1, 2, 3, 4, 5) is 2 |
| 18 | PASS access_3(1, 2, 3, 4, 5) is 3 |
| 19 | PASS access_4(1, 2, 3, 4, 5) is 4 |
| 20 | PASS access_5(1, 2, 3, 4, 5) is 5 |
oliver@apple.com | ef1f971 | 2011-12-13 23:17:43 +0000 | [diff] [blame] | 21 | PASS argumentLengthIs5() is 5 |
| 22 | PASS argumentLengthIs5(1,2,3,4,5) is 5 |
| 23 | PASS argumentLengthIs5(1,2,3,4,5,6,7,8,9,10) is 5 |
| 24 | PASS duplicateArgumentAndReturnLast_call(1) is 1 |
| 25 | PASS duplicateArgumentAndReturnFirst_call(1) is 1 |
| 26 | PASS duplicateArgumentAndReturnLast_apply(1) is 1 |
| 27 | PASS duplicateArgumentAndReturnFirst_apply(1) is 1 |
cwzwarich@webkit.org | 4e9a20c | 2008-09-21 08:37:01 +0000 | [diff] [blame] | 28 | PASS tear_off_equal_access_1(1, 2, 3) is 1 |
| 29 | PASS tear_off_equal_access_2(1, 2, 3) is 2 |
| 30 | PASS tear_off_equal_access_3(1, 2, 3) is 3 |
| 31 | PASS tear_off_equal_access_4(1, 2, 3) is undefined |
| 32 | PASS tear_off_equal_access_5(1, 2, 3) is undefined |
| 33 | PASS tear_off_too_few_access_1(1) is 1 |
| 34 | PASS tear_off_too_few_access_2(1) is undefined |
| 35 | PASS tear_off_too_few_access_3(1) is undefined |
| 36 | PASS tear_off_too_few_access_4(1) is undefined |
| 37 | PASS tear_off_too_few_access_5(1) is undefined |
| 38 | PASS tear_off_too_many_access_1(1, 2, 3, 4, 5) is 1 |
| 39 | PASS tear_off_too_many_access_2(1, 2, 3, 4, 5) is 2 |
| 40 | PASS tear_off_too_many_access_3(1, 2, 3, 4, 5) is 3 |
| 41 | PASS tear_off_too_many_access_4(1, 2, 3, 4, 5) is 4 |
| 42 | PASS tear_off_too_many_access_5(1, 2, 3, 4, 5) is 5 |
| 43 | PASS live_1(0, 2, 3) is 1 |
| 44 | PASS live_2(1, 0, 3) is 2 |
| 45 | PASS live_3(1, 2, 0) is 3 |
| 46 | PASS live_1(0) is 1 |
| 47 | PASS live_2(1) is undefined |
| 48 | PASS live_3(1) is undefined |
| 49 | PASS live_1(0, 2, 3, 4, 5) is 1 |
| 50 | PASS live_2(1, 0, 3, 4, 5) is 2 |
| 51 | PASS live_3(1, 2, 0, 4, 5) is 3 |
| 52 | PASS extra_args_modify_4(1, 2, 3, 0, 5) is 4 |
| 53 | PASS extra_args_modify_5(1, 2, 3, 4, 0) is 5 |
| 54 | PASS tear_off_live_1(0, 2, 3)() is 1 |
| 55 | PASS tear_off_live_2(1, 0, 3)() is 2 |
| 56 | PASS tear_off_live_3(1, 2, 0)() is 3 |
| 57 | PASS tear_off_live_1(0)() is 1 |
| 58 | PASS tear_off_live_2(1)() is undefined |
| 59 | PASS tear_off_live_3(1)() is undefined |
| 60 | PASS tear_off_live_1(0, 2, 3, 4, 5)() is 1 |
| 61 | PASS tear_off_live_2(1, 0, 3, 4, 5)() is 2 |
| 62 | PASS tear_off_live_3(1, 2, 0, 4, 5)() is 3 |
| 63 | PASS tear_off_extra_args_modify_4(1, 2, 3, 0, 5)() is 4 |
| 64 | PASS tear_off_extra_args_modify_5(1, 2, 3, 4, 0)() is 5 |
| 65 | PASS delete_1(1, 2, 3) is undefined |
| 66 | PASS delete_2(1, 2, 3) is undefined |
| 67 | PASS delete_3(1, 2, 3) is undefined |
| 68 | PASS delete_4(1, 2, 3) is undefined |
| 69 | PASS delete_5(1, 2, 3) is undefined |
| 70 | PASS delete_1(1) is undefined |
| 71 | PASS delete_2(1) is undefined |
| 72 | PASS delete_3(1) is undefined |
| 73 | PASS delete_4(1) is undefined |
| 74 | PASS delete_5(1) is undefined |
| 75 | PASS delete_1(1, 2, 3, 4, 5) is undefined |
| 76 | PASS delete_2(1, 2, 3, 4, 5) is undefined |
| 77 | PASS delete_3(1, 2, 3, 4, 5) is undefined |
| 78 | PASS delete_4(1, 2, 3, 4, 5) is undefined |
| 79 | PASS delete_5(1, 2, 3, 4, 5) is undefined |
| 80 | PASS tear_off_delete_1(1, 2, 3)() is undefined |
| 81 | PASS tear_off_delete_2(1, 2, 3)() is undefined |
| 82 | PASS tear_off_delete_3(1, 2, 3)() is undefined |
| 83 | PASS tear_off_delete_4(1, 2, 3)() is undefined |
| 84 | PASS tear_off_delete_5(1, 2, 3)() is undefined |
| 85 | PASS tear_off_delete_1(1)() is undefined |
| 86 | PASS tear_off_delete_2(1)() is undefined |
| 87 | PASS tear_off_delete_3(1)() is undefined |
| 88 | PASS tear_off_delete_4(1)() is undefined |
| 89 | PASS tear_off_delete_5(1)() is undefined |
| 90 | PASS tear_off_delete_1(1, 2, 3, 4, 5)() is undefined |
| 91 | PASS tear_off_delete_2(1, 2, 3, 4, 5)() is undefined |
| 92 | PASS tear_off_delete_3(1, 2, 3, 4, 5)() is undefined |
| 93 | PASS tear_off_delete_4(1, 2, 3, 4, 5)() is undefined |
| 94 | PASS tear_off_delete_5(1, 2, 3, 4, 5)() is undefined |
| 95 | PASS delete_not_live_1(1, 2, 3) is 1 |
| 96 | PASS delete_not_live_2(1, 2, 3) is 2 |
| 97 | PASS delete_not_live_3(1, 2, 3) is 3 |
| 98 | PASS delete_not_live_1(1) is 1 |
| 99 | PASS delete_not_live_2(1) is undefined |
| 100 | PASS delete_not_live_3(1) is undefined |
| 101 | PASS delete_not_live_1(1, 2, 3, 4, 5) is 1 |
| 102 | PASS delete_not_live_2(1, 2, 3, 4, 5) is 2 |
| 103 | PASS delete_not_live_3(1, 2, 3, 4, 5) is 3 |
| 104 | PASS tear_off_delete_not_live_1(1, 2, 3)() is 1 |
| 105 | PASS tear_off_delete_not_live_2(1, 2, 3)() is 2 |
| 106 | PASS tear_off_delete_not_live_3(1, 2, 3)() is 3 |
| 107 | PASS tear_off_delete_not_live_1(1)() is 1 |
| 108 | PASS tear_off_delete_not_live_2(1)() is undefined |
| 109 | PASS tear_off_delete_not_live_3(1)() is undefined |
| 110 | PASS tear_off_delete_not_live_1(1, 2, 3, 4, 5)() is 1 |
| 111 | PASS tear_off_delete_not_live_2(1, 2, 3, 4, 5)() is 2 |
| 112 | PASS tear_off_delete_not_live_3(1, 2, 3, 4, 5)() is 3 |
| 113 | PASS access_after_delete_named_2(1, 2, 3) is 2 |
| 114 | PASS access_after_delete_named_3(1, 2, 3) is 3 |
| 115 | PASS access_after_delete_named_4(1, 2, 3) is undefined |
| 116 | PASS access_after_delete_named_2(1) is undefined |
| 117 | PASS access_after_delete_named_3(1) is undefined |
| 118 | PASS access_after_delete_named_4(1) is undefined |
| 119 | PASS access_after_delete_named_2(1, 2, 3, 4) is 2 |
| 120 | PASS access_after_delete_named_3(1, 2, 3, 4) is 3 |
| 121 | PASS access_after_delete_named_4(1, 2, 3, 4) is 4 |
| 122 | PASS access_after_delete_extra_1(1, 2, 3) is 1 |
| 123 | PASS access_after_delete_extra_2(1, 2, 3) is 2 |
| 124 | PASS access_after_delete_extra_3(1, 2, 3) is 3 |
| 125 | PASS access_after_delete_extra_5(1, 2, 3) is undefined |
| 126 | PASS access_after_delete_extra_1(1) is 1 |
| 127 | PASS access_after_delete_extra_2(1) is undefined |
| 128 | PASS access_after_delete_extra_3(1) is undefined |
| 129 | PASS access_after_delete_extra_5(1) is undefined |
| 130 | PASS access_after_delete_extra_1(1, 2, 3, 4, 5) is 1 |
| 131 | PASS access_after_delete_extra_2(1, 2, 3, 4, 5) is 2 |
| 132 | PASS access_after_delete_extra_3(1, 2, 3, 4, 5) is 3 |
| 133 | PASS access_after_delete_extra_5(1, 2, 3, 4, 5) is 5 |
cwzwarich@webkit.org | ed6dff1 | 2008-09-30 22:17:55 +0000 | [diff] [blame] | 134 | PASS argumentsParam(true) is true |
cwzwarich@webkit.org | 666d4ec | 2008-11-21 00:35:40 +0000 | [diff] [blame] | 135 | PASS argumentsFunctionConstructorParam(true) is true |
oliver@apple.com | b155f2e | 2010-12-21 22:54:14 +0000 | [diff] [blame] | 136 | PASS argumentsVarUndefined() is '[object Arguments]' |
saambarati1@gmail.com | e455672 | 2015-07-19 16:57:44 +0000 | [diff] [blame] | 137 | PASS argumentsConst() is '20' |
oliver@apple.com | c06fd39 | 2009-05-13 03:53:32 +0000 | [diff] [blame] | 138 | PASS argumentCalleeInException() is argumentCalleeInException |
oliver@apple.com | b155f2e | 2010-12-21 22:54:14 +0000 | [diff] [blame] | 139 | PASS shadowedArgumentsApply([true]) is true |
| 140 | PASS shadowedArgumentsLength([]) is 0 |
commit-queue@webkit.org | e0c69d5 | 2013-07-18 23:24:13 +0000 | [diff] [blame] | 141 | PASS shadowedArgumentsLength() threw exception TypeError: undefined is not an object (evaluating 'arguments.length'). |
oliver@apple.com | b155f2e | 2010-12-21 22:54:14 +0000 | [diff] [blame] | 142 | PASS shadowedArgumentsCallee([]) is undefined. |
| 143 | PASS shadowedArgumentsIndex([true]) is true |
barraclough@apple.com | 9f6e95a | 2011-10-18 17:04:32 +0000 | [diff] [blame] | 144 | PASS descriptor.value is "one" |
| 145 | PASS descriptor.writable is true |
| 146 | PASS descriptor.enumerable is true |
| 147 | PASS descriptor.configurable is true |
barraclough@apple.com | a9b4539 | 2012-02-23 01:25:37 +0000 | [diff] [blame] | 148 | PASS true is true |
| 149 | PASS true is true |
| 150 | PASS true is true |
| 151 | PASS true is true |
| 152 | PASS true is true |
| 153 | PASS true is true |
| 154 | PASS true is true |
| 155 | PASS true is true |
| 156 | PASS true is true |
| 157 | PASS true is true |
| 158 | PASS true is true |
| 159 | PASS true is true |
| 160 | PASS true is true |
| 161 | PASS true is true |
| 162 | PASS true is true |
| 163 | PASS true is true |
| 164 | PASS true is true |
| 165 | PASS true is true |
| 166 | PASS true is true |
| 167 | PASS true is true |
| 168 | PASS true is true |
| 169 | PASS true is true |
| 170 | PASS true is true |
| 171 | PASS true is true |
barraclough@apple.com | 7ca5cdc | 2012-04-30 22:29:10 +0000 | [diff] [blame] | 172 | PASS true is true |
| 173 | PASS true is true |
| 174 | PASS false is false |
| 175 | PASS true is true |
| 176 | PASS false is false |
| 177 | PASS false is false |
| 178 | PASS undefined is undefined. |
| 179 | PASS true is true |
| 180 | PASS false is false |
cwzwarich@webkit.org | 4e9a20c | 2008-09-21 08:37:01 +0000 | [diff] [blame] | 181 | PASS successfullyParsed is true |
| 182 | |
| 183 | TEST COMPLETE |
| 184 | |