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