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
24Tests what happens when you do ToString twice, and it has a side effect that clobbers the toString method in between the two ToStrings.
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS foo(new String("hello"), sideEffect) is "hellohello"
30PASS foo(new String("hello"), sideEffect) is "hellohello"
31PASS foo(new String("hello"), sideEffect) is "hellohello"
32PASS foo(new String("hello"), sideEffect) is "hellohello"
33PASS foo(new String("hello"), sideEffect) is "hellohello"
34PASS foo(new String("hello"), sideEffect) is "hellohello"
35PASS foo(new String("hello"), sideEffect) is "hellohello"
36PASS foo(new String("hello"), sideEffect) is "hellohello"
37PASS foo(new String("hello"), sideEffect) is "hellohello"
38PASS foo(new String("hello"), sideEffect) is "hellohello"
39PASS foo(new String("hello"), sideEffect) is "hellohello"
40PASS foo(new String("hello"), sideEffect) is "hellohello"
41PASS foo(new String("hello"), sideEffect) is "hellohello"
42PASS foo(new String("hello"), sideEffect) is "hellohello"
43PASS foo(new String("hello"), sideEffect) is "hellohello"
44PASS foo(new String("hello"), sideEffect) is "hellohello"
45PASS foo(new String("hello"), sideEffect) is "hellohello"
46PASS foo(new String("hello"), sideEffect) is "hellohello"
47PASS foo(new String("hello"), sideEffect) is "hellohello"
48PASS foo(new String("hello"), sideEffect) is "hellohello"
49PASS foo(new String("hello"), sideEffect) is "hellohello"
50PASS foo(new String("hello"), sideEffect) is "hellohello"
51PASS foo(new String("hello"), sideEffect) is "hellohello"
52PASS foo(new String("hello"), sideEffect) is "hellohello"
53PASS foo(new String("hello"), sideEffect) is "hellohello"
54PASS foo(new String("hello"), sideEffect) is "hellohello"
55PASS foo(new String("hello"), sideEffect) is "hellohello"
56PASS foo(new String("hello"), sideEffect) is "hellohello"
57PASS foo(new String("hello"), sideEffect) is "hellohello"
58PASS foo(new String("hello"), sideEffect) is "hellohello"
59PASS foo(new String("hello"), sideEffect) is "hellohello"
60PASS foo(new String("hello"), sideEffect) is "hellohello"
61PASS foo(new String("hello"), sideEffect) is "hellohello"
62PASS foo(new String("hello"), sideEffect) is "hellohello"
63PASS foo(new String("hello"), sideEffect) is "hellohello"
64PASS foo(new String("hello"), sideEffect) is "hellohello"
65PASS foo(new String("hello"), sideEffect) is "hellohello"
66PASS foo(new String("hello"), sideEffect) is "hellohello"
67PASS foo(new String("hello"), sideEffect) is "hellohello"
68PASS foo(new String("hello"), sideEffect) is "hellohello"
69PASS foo(new String("hello"), sideEffect) is "hellohello"
70PASS foo(new String("hello"), sideEffect) is "hellohello"
71PASS foo(new String("hello"), sideEffect) is "hellohello"
72PASS foo(new String("hello"), sideEffect) is "hellohello"
73PASS foo(new String("hello"), sideEffect) is "hellohello"
74PASS foo(new String("hello"), sideEffect) is "hellohello"
75PASS foo(new String("hello"), sideEffect) is "hellohello"
76PASS foo(new String("hello"), sideEffect) is "hellohello"
77PASS foo(new String("hello"), sideEffect) is "hellohello"
78PASS foo(new String("hello"), sideEffect) is "hellohello"
79PASS foo(new String("hello"), sideEffect) is "hellohello"
80PASS foo(new String("hello"), sideEffect) is "hellohello"
81PASS foo(new String("hello"), sideEffect) is "hellohello"
82PASS foo(new String("hello"), sideEffect) is "hellohello"
83PASS foo(new String("hello"), sideEffect) is "hellohello"
84PASS foo(new String("hello"), sideEffect) is "hellohello"
85PASS foo(new String("hello"), sideEffect) is "hellohello"
86PASS foo(new String("hello"), sideEffect) is "hellohello"
87PASS foo(new String("hello"), sideEffect) is "hellohello"
88PASS foo(new String("hello"), sideEffect) is "hellohello"
89PASS foo(new String("hello"), sideEffect) is "hellohello"
90PASS foo(new String("hello"), sideEffect) is "hellohello"
91PASS foo(new String("hello"), sideEffect) is "hellohello"
92PASS foo(new String("hello"), sideEffect) is "hellohello"
93PASS foo(new String("hello"), sideEffect) is "hellohello"
94PASS foo(new String("hello"), sideEffect) is "hellohello"
95PASS foo(new String("hello"), sideEffect) is "hellohello"
96PASS foo(new String("hello"), sideEffect) is "hellohello"
97PASS foo(new String("hello"), sideEffect) is "hellohello"
98PASS foo(new String("hello"), sideEffect) is "hellohello"
99PASS foo(new String("hello"), sideEffect) is "hellohello"
100PASS foo(new String("hello"), sideEffect) is "hellohello"
101PASS foo(new String("hello"), sideEffect) is "hellohello"
102PASS foo(new String("hello"), sideEffect) is "hellohello"
103PASS foo(new String("hello"), sideEffect) is "hellohello"
104PASS foo(new String("hello"), sideEffect) is "hellohello"
105PASS foo(new String("hello"), sideEffect) is "hellohello"
106PASS foo(new String("hello"), sideEffect) is "hellohello"
107PASS foo(new String("hello"), sideEffect) is "hellohello"
108PASS foo(new String("hello"), sideEffect) is "hellohello"
109PASS foo(new String("hello"), sideEffect) is "hellohello"
110PASS foo(new String("hello"), sideEffect) is "hellohello"
111PASS foo(new String("hello"), sideEffect) is "hellohello"
112PASS foo(new String("hello"), sideEffect) is "hellohello"
113PASS foo(new String("hello"), sideEffect) is "hellohello"
114PASS foo(new String("hello"), sideEffect) is "hellohello"
115PASS foo(new String("hello"), sideEffect) is "hellohello"
116PASS foo(new String("hello"), sideEffect) is "hellohello"
117PASS foo(new String("hello"), sideEffect) is "hellohello"
118PASS foo(new String("hello"), sideEffect) is "hellohello"
119PASS foo(new String("hello"), sideEffect) is "hellohello"
120PASS foo(new String("hello"), sideEffect) is "hellohello"
121PASS foo(new String("hello"), sideEffect) is "hellohello"
122PASS foo(new String("hello"), sideEffect) is "hellohello"
123PASS foo(new String("hello"), sideEffect) is "hellohello"
124PASS foo(new String("hello"), sideEffect) is "hellohello"
125PASS foo(new String("hello"), sideEffect) is "hellohello"
126PASS foo(new String("hello"), sideEffect) is "hellohello"
127PASS foo(new String("hello"), sideEffect) is "hellohello"
128PASS foo(new String("hello"), sideEffect) is "hellohello"
129PASS foo(new String("hello"), sideEffect) is "hellohello"
130PASS foo(new String("hello"), sideEffect) is "hellohello"
131PASS foo(new String("hello"), sideEffect) is "hellohello"
132PASS foo(new String("hello"), sideEffect) is "hellohello"
133PASS foo(new String("hello"), sideEffect) is "hellohello"
134PASS foo(new String("hello"), sideEffect) is "hellohello"
135PASS foo(new String("hello"), sideEffect) is "hellohello"
136PASS foo(new String("hello"), sideEffect) is "hellohello"
137PASS foo(new String("hello"), sideEffect) is "hellohello"
138PASS foo(new String("hello"), sideEffect) is "hellohello"
139PASS foo(new String("hello"), sideEffect) is "hellohello"
140PASS foo(new String("hello"), sideEffect) is "hellohello"
141PASS foo(new String("hello"), sideEffect) is "hellohello"
142PASS foo(new String("hello"), sideEffect) is "hellohello"
143PASS foo(new String("hello"), sideEffect) is "hellohello"
144PASS foo(new String("hello"), sideEffect) is "hellohello"
145PASS foo(new String("hello"), sideEffect) is "hellohello"
146PASS foo(new String("hello"), sideEffect) is "hellohello"
147PASS foo(new String("hello"), sideEffect) is "hellohello"
148PASS foo(new String("hello"), sideEffect) is "hellohello"
149PASS foo(new String("hello"), sideEffect) is "hellohello"
150PASS foo(new String("hello"), sideEffect) is "hellohello"
151PASS foo(new String("hello"), sideEffect) is "hellohello"
152PASS foo(new String("hello"), sideEffect) is "hellohello"
153PASS foo(new String("hello"), sideEffect) is "hellohello"
154PASS foo(new String("hello"), sideEffect) is "hellohello"
155PASS foo(new String("hello"), sideEffect) is "hellohello"
156PASS foo(new String("hello"), sideEffect) is "hellohello"
157PASS foo(new String("hello"), sideEffect) is "hellohello"
158PASS foo(new String("hello"), sideEffect) is "hellohello"
159PASS foo(new String("hello"), sideEffect) is "hellohello"
160PASS foo(new String("hello"), sideEffect) is "hellohello"
161PASS foo(new String("hello"), sideEffect) is "hellohello"
162PASS foo(new String("hello"), sideEffect) is "hellohello"
163PASS foo(new String("hello"), sideEffect) is "hellohello"
164PASS foo(new String("hello"), sideEffect) is "hellohello"
165PASS foo(new String("hello"), sideEffect) is "hellohello"
166PASS foo(new String("hello"), sideEffect) is "hellohello"
167PASS foo(new String("hello"), sideEffect) is "hellohello"
168PASS foo(new String("hello"), sideEffect) is "hellohello"
169PASS foo(new String("hello"), sideEffect) is "hellohello"
170PASS foo(new String("hello"), sideEffect) is "hellohello"
171PASS foo(new String("hello"), sideEffect) is "hellohello"
172PASS foo(new String("hello"), sideEffect) is "hellohello"
173PASS foo(new String("hello"), sideEffect) is "hellohello"
174PASS foo(new String("hello"), sideEffect) is "hellohello"
175PASS foo(new String("hello"), sideEffect) is "hellohello"
176PASS foo(new String("hello"), sideEffect) is "hellohello"
177PASS foo(new String("hello"), sideEffect) is "hellohello"
178PASS foo(new String("hello"), sideEffect) is "hellohello"
179hi!
180PASS foo(new String("hello"), sideEffect) is "hello150"
181hi!
182PASS foo(new String("hello"), sideEffect) is "hello151"
183hi!
184PASS foo(new String("hello"), sideEffect) is "hello152"
185hi!
186PASS foo(new String("hello"), sideEffect) is "hello153"
187hi!
188PASS foo(new String("hello"), sideEffect) is "hello154"
189hi!
190PASS foo(new String("hello"), sideEffect) is "hello155"
191hi!
192PASS foo(new String("hello"), sideEffect) is "hello156"
193hi!
194PASS foo(new String("hello"), sideEffect) is "hello157"
195hi!
196PASS foo(new String("hello"), sideEffect) is "hello158"
197hi!
198PASS foo(new String("hello"), sideEffect) is "hello159"
199hi!
200PASS foo(new String("hello"), sideEffect) is "hello160"
201hi!
202PASS foo(new String("hello"), sideEffect) is "hello161"
203hi!
204PASS foo(new String("hello"), sideEffect) is "hello162"
205hi!
206PASS foo(new String("hello"), sideEffect) is "hello163"
207hi!
208PASS foo(new String("hello"), sideEffect) is "hello164"
209hi!
210PASS foo(new String("hello"), sideEffect) is "hello165"
211hi!
212PASS foo(new String("hello"), sideEffect) is "hello166"
213hi!
214PASS foo(new String("hello"), sideEffect) is "hello167"
215hi!
216PASS foo(new String("hello"), sideEffect) is "hello168"
217hi!
218PASS foo(new String("hello"), sideEffect) is "hello169"
219hi!
220PASS foo(new String("hello"), sideEffect) is "hello170"
221hi!
222PASS foo(new String("hello"), sideEffect) is "hello171"
223hi!
224PASS foo(new String("hello"), sideEffect) is "hello172"
225hi!
226PASS foo(new String("hello"), sideEffect) is "hello173"
227hi!
228PASS foo(new String("hello"), sideEffect) is "hello174"
229hi!
230PASS foo(new String("hello"), sideEffect) is "hello175"
231hi!
232PASS foo(new String("hello"), sideEffect) is "hello176"
233hi!
234PASS foo(new String("hello"), sideEffect) is "hello177"
235hi!
236PASS foo(new String("hello"), sideEffect) is "hello178"
237hi!
238PASS foo(new String("hello"), sideEffect) is "hello179"
239hi!
240PASS foo(new String("hello"), sideEffect) is "hello180"
241hi!
242PASS foo(new String("hello"), sideEffect) is "hello181"
243hi!
244PASS foo(new String("hello"), sideEffect) is "hello182"
245hi!
246PASS foo(new String("hello"), sideEffect) is "hello183"
247hi!
248PASS foo(new String("hello"), sideEffect) is "hello184"
249hi!
250PASS foo(new String("hello"), sideEffect) is "hello185"
251hi!
252PASS foo(new String("hello"), sideEffect) is "hello186"
253hi!
254PASS foo(new String("hello"), sideEffect) is "hello187"
255hi!
256PASS foo(new String("hello"), sideEffect) is "hello188"
257hi!
258PASS foo(new String("hello"), sideEffect) is "hello189"
259hi!
260PASS foo(new String("hello"), sideEffect) is "hello190"
261hi!
262PASS foo(new String("hello"), sideEffect) is "hello191"
263hi!
264PASS foo(new String("hello"), sideEffect) is "hello192"
265hi!
266PASS foo(new String("hello"), sideEffect) is "hello193"
267hi!
268PASS foo(new String("hello"), sideEffect) is "hello194"
269hi!
270PASS foo(new String("hello"), sideEffect) is "hello195"
271hi!
272PASS foo(new String("hello"), sideEffect) is "hello196"
273hi!
274PASS foo(new String("hello"), sideEffect) is "hello197"
275hi!
276PASS foo(new String("hello"), sideEffect) is "hello198"
277hi!
278PASS foo(new String("hello"), sideEffect) is "hello199"
279PASS successfullyParsed is true
280
281TEST COMPLETE
282
283