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