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 24 Tests that we do ToString conversions correctly when String.prototype.valueOf is fine but we define our own on the String object itself. 25 26 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29 PASS "" + foo(argument) is "hello" 30 PASS "" + foo(argument) is "hello" 31 PASS "" + foo(argument) is "hello" 32 PASS "" + foo(argument) is "hello" 33 PASS "" + foo(argument) is "hello" 34 PASS "" + foo(argument) is "hello" 35 PASS "" + foo(argument) is "hello" 36 PASS "" + foo(argument) is "hello" 37 PASS "" + foo(argument) is "hello" 38 PASS "" + foo(argument) is "hello" 39 PASS "" + foo(argument) is "hello" 40 PASS "" + foo(argument) is "hello" 41 PASS "" + foo(argument) is "hello" 42 PASS "" + foo(argument) is "hello" 43 PASS "" + foo(argument) is "hello" 44 PASS "" + foo(argument) is "hello" 45 PASS "" + foo(argument) is "hello" 46 PASS "" + foo(argument) is "hello" 47 PASS "" + foo(argument) is "hello" 48 PASS "" + foo(argument) is "hello" 49 PASS "" + foo(argument) is "hello" 50 PASS "" + foo(argument) is "hello" 51 PASS "" + foo(argument) is "hello" 52 PASS "" + foo(argument) is "hello" 53 PASS "" + foo(argument) is "hello" 54 PASS "" + foo(argument) is "hello" 55 PASS "" + foo(argument) is "hello" 56 PASS "" + foo(argument) is "hello" 57 PASS "" + foo(argument) is "hello" 58 PASS "" + foo(argument) is "hello" 59 PASS "" + foo(argument) is "hello" 60 PASS "" + foo(argument) is "hello" 61 PASS "" + foo(argument) is "hello" 62 PASS "" + foo(argument) is "hello" 63 PASS "" + foo(argument) is "hello" 64 PASS "" + foo(argument) is "hello" 65 PASS "" + foo(argument) is "hello" 66 PASS "" + foo(argument) is "hello" 67 PASS "" + foo(argument) is "hello" 68 PASS "" + foo(argument) is "hello" 69 PASS "" + foo(argument) is "hello" 70 PASS "" + foo(argument) is "hello" 71 PASS "" + foo(argument) is "hello" 72 PASS "" + foo(argument) is "hello" 73 PASS "" + foo(argument) is "hello" 74 PASS "" + foo(argument) is "hello" 75 PASS "" + foo(argument) is "hello" 76 PASS "" + foo(argument) is "hello" 77 PASS "" + foo(argument) is "hello" 78 PASS "" + foo(argument) is "hello" 79 PASS "" + foo(argument) is "hello" 80 PASS "" + foo(argument) is "hello" 81 PASS "" + foo(argument) is "hello" 82 PASS "" + foo(argument) is "hello" 83 PASS "" + foo(argument) is "hello" 84 PASS "" + foo(argument) is "hello" 85 PASS "" + foo(argument) is "hello" 86 PASS "" + foo(argument) is "hello" 87 PASS "" + foo(argument) is "hello" 88 PASS "" + foo(argument) is "hello" 89 PASS "" + foo(argument) is "hello" 90 PASS "" + foo(argument) is "hello" 91 PASS "" + foo(argument) is "hello" 92 PASS "" + foo(argument) is "hello" 93 PASS "" + foo(argument) is "hello" 94 PASS "" + foo(argument) is "hello" 95 PASS "" + foo(argument) is "hello" 96 PASS "" + foo(argument) is "hello" 97 PASS "" + foo(argument) is "hello" 98 PASS "" + foo(argument) is "hello" 99 PASS "" + foo(argument) is "hello" 100 PASS "" + foo(argument) is "hello" 101 PASS "" + foo(argument) is "hello" 102 PASS "" + foo(argument) is "hello" 103 PASS "" + foo(argument) is "hello" 104 PASS "" + foo(argument) is "hello" 105 PASS "" + foo(argument) is "hello" 106 PASS "" + foo(argument) is "hello" 107 PASS "" + foo(argument) is "hello" 108 PASS "" + foo(argument) is "hello" 109 PASS "" + foo(argument) is "hello" 110 PASS "" + foo(argument) is "hello" 111 PASS "" + foo(argument) is "hello" 112 PASS "" + foo(argument) is "hello" 113 PASS "" + foo(argument) is "hello" 114 PASS "" + foo(argument) is "hello" 115 PASS "" + foo(argument) is "hello" 116 PASS "" + foo(argument) is "hello" 117 PASS "" + foo(argument) is "hello" 118 PASS "" + foo(argument) is "hello" 119 PASS "" + foo(argument) is "hello" 120 PASS "" + foo(argument) is "hello" 121 PASS "" + foo(argument) is "hello" 122 PASS "" + foo(argument) is "hello" 123 PASS "" + foo(argument) is "hello" 124 PASS "" + foo(argument) is "hello" 125 PASS "" + foo(argument) is "hello" 126 PASS "" + foo(argument) is "hello" 127 PASS "" + foo(argument) is "hello" 128 PASS "" + foo(argument) is "hello" 129 PASS "" + foo(argument) is "hello" 130 PASS "" + foo(argument) is "hello" 131 PASS "" + foo(argument) is "hello" 132 PASS "" + foo(argument) is "hello" 133 PASS "" + foo(argument) is "hello" 134 PASS "" + foo(argument) is "hello" 135 PASS "" + foo(argument) is "hello" 136 PASS "" + foo(argument) is "hello" 137 PASS "" + foo(argument) is "hello" 138 PASS "" + foo(argument) is "hello" 139 PASS "" + foo(argument) is "hello" 140 PASS "" + foo(argument) is "hello" 141 PASS "" + foo(argument) is "hello" 142 PASS "" + foo(argument) is "hello" 143 PASS "" + foo(argument) is "hello" 144 PASS "" + foo(argument) is "hello" 145 PASS "" + foo(argument) is "hello" 146 PASS "" + foo(argument) is "hello" 147 PASS "" + foo(argument) is "hello" 148 PASS "" + foo(argument) is "hello" 149 PASS "" + foo(argument) is "hello" 150 PASS "" + foo(argument) is "hello" 151 PASS "" + foo(argument) is "hello" 152 PASS "" + foo(argument) is "hello" 153 PASS "" + foo(argument) is "hello" 154 PASS "" + foo(argument) is "hello" 155 PASS "" + foo(argument) is "hello" 156 PASS "" + foo(argument) is "hello" 157 PASS "" + foo(argument) is "hello" 158 PASS "" + foo(argument) is "hello" 159 PASS "" + foo(argument) is "hello" 160 PASS "" + foo(argument) is "hello" 161 PASS "" + foo(argument) is "hello" 162 PASS "" + foo(argument) is "hello" 163 PASS "" + foo(argument) is "hello" 164 PASS "" + foo(argument) is "hello" 165 PASS "" + foo(argument) is "hello" 166 PASS "" + foo(argument) is "hello" 167 PASS "" + foo(argument) is "hello" 168 PASS "" + foo(argument) is "hello" 169 PASS "" + foo(argument) is "hello" 170 PASS "" + foo(argument) is "hello" 171 PASS "" + foo(argument) is "hello" 172 PASS "" + foo(argument) is "hello" 173 PASS "" + foo(argument) is "hello" 174 PASS "" + foo(argument) is "hello" 175 PASS "" + foo(argument) is "hello" 176 PASS "" + foo(argument) is "hello" 177 PASS "" + foo(argument) is "hello" 178 PASS "" + foo(argument) is "hello" 179 PASS successfullyParsed is true 180 181 TEST COMPLETE 182 183