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 that ToString on a cell works. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 30PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 31PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 32PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 33PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 34PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 35PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 36PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 37PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 38PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 39PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 40PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 41PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 42PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 43PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 44PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 45PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 46PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 47PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 48PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 49PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 50PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 51PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 52PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 53PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 54PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 55PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 56PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 57PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 58PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 59PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 60PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 61PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 62PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 63PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 64PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 65PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 66PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 67PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 68PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 69PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 70PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 71PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 72PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 73PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 74PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 75PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 76PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 77PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 78PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 79PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 80PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 81PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 82PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 83PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 84PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 85PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 86PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 87PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 88PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 89PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 90PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 91PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 92PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 93PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 94PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 95PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 96PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 97PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 98PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 99PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 100PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 101PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 102PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 103PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 104PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 105PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 106PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 107PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 108PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 109PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 110PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 111PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 112PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 113PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 114PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 115PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 116PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 117PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 118PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 119PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 120PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 121PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 122PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 123PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 124PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 125PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 126PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 127PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,1,2,3" 128PASS "" + foo("foo", i % 2 ? "hello" : [1, 2, 3]) is "foo,hello" 129PASS successfullyParsed is true 130 131TEST COMPLETE 132 133