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 our optimization to elide overflow checks understands that if we keep adding huge numbers, we could end up creating a number that is not precisely representable using doubles. 25 26 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29 PASS foo(2147483647) is 2147483552 30 PASS foo(2147483647) is 2147483552 31 PASS foo(2147483647) is 2147483552 32 PASS foo(2147483647) is 2147483552 33 PASS foo(2147483647) is 2147483552 34 PASS foo(2147483647) is 2147483552 35 PASS foo(2147483647) is 2147483552 36 PASS foo(2147483647) is 2147483552 37 PASS foo(2147483647) is 2147483552 38 PASS foo(2147483647) is 2147483552 39 PASS foo(2147483647) is 2147483552 40 PASS foo(2147483647) is 2147483552 41 PASS foo(2147483647) is 2147483552 42 PASS foo(2147483647) is 2147483552 43 PASS foo(2147483647) is 2147483552 44 PASS foo(2147483647) is 2147483552 45 PASS foo(2147483647) is 2147483552 46 PASS foo(2147483647) is 2147483552 47 PASS foo(2147483647) is 2147483552 48 PASS foo(2147483647) is 2147483552 49 PASS foo(2147483647) is 2147483552 50 PASS foo(2147483647) is 2147483552 51 PASS foo(2147483647) is 2147483552 52 PASS foo(2147483647) is 2147483552 53 PASS foo(2147483647) is 2147483552 54 PASS foo(2147483647) is 2147483552 55 PASS foo(2147483647) is 2147483552 56 PASS foo(2147483647) is 2147483552 57 PASS foo(2147483647) is 2147483552 58 PASS foo(2147483647) is 2147483552 59 PASS foo(2147483647) is 2147483552 60 PASS foo(2147483647) is 2147483552 61 PASS foo(2147483647) is 2147483552 62 PASS foo(2147483647) is 2147483552 63 PASS foo(2147483647) is 2147483552 64 PASS foo(2147483647) is 2147483552 65 PASS foo(2147483647) is 2147483552 66 PASS foo(2147483647) is 2147483552 67 PASS foo(2147483647) is 2147483552 68 PASS foo(2147483647) is 2147483552 69 PASS foo(2147483647) is 2147483552 70 PASS foo(2147483647) is 2147483552 71 PASS foo(2147483647) is 2147483552 72 PASS foo(2147483647) is 2147483552 73 PASS foo(2147483647) is 2147483552 74 PASS foo(2147483647) is 2147483552 75 PASS foo(2147483647) is 2147483552 76 PASS foo(2147483647) is 2147483552 77 PASS foo(2147483647) is 2147483552 78 PASS foo(2147483647) is 2147483552 79 PASS foo(2147483647) is 2147483552 80 PASS foo(2147483647) is 2147483552 81 PASS foo(2147483647) is 2147483552 82 PASS foo(2147483647) is 2147483552 83 PASS foo(2147483647) is 2147483552 84 PASS foo(2147483647) is 2147483552 85 PASS foo(2147483647) is 2147483552 86 PASS foo(2147483647) is 2147483552 87 PASS foo(2147483647) is 2147483552 88 PASS foo(2147483647) is 2147483552 89 PASS foo(2147483647) is 2147483552 90 PASS foo(2147483647) is 2147483552 91 PASS foo(2147483647) is 2147483552 92 PASS foo(2147483647) is 2147483552 93 PASS foo(2147483647) is 2147483552 94 PASS foo(2147483647) is 2147483552 95 PASS foo(2147483647) is 2147483552 96 PASS foo(2147483647) is 2147483552 97 PASS foo(2147483647) is 2147483552 98 PASS foo(2147483647) is 2147483552 99 PASS foo(2147483647) is 2147483552 100 PASS foo(2147483647) is 2147483552 101 PASS foo(2147483647) is 2147483552 102 PASS foo(2147483647) is 2147483552 103 PASS foo(2147483647) is 2147483552 104 PASS foo(2147483647) is 2147483552 105 PASS foo(2147483647) is 2147483552 106 PASS foo(2147483647) is 2147483552 107 PASS foo(2147483647) is 2147483552 108 PASS foo(2147483647) is 2147483552 109 PASS foo(2147483647) is 2147483552 110 PASS foo(2147483647) is 2147483552 111 PASS foo(2147483647) is 2147483552 112 PASS foo(2147483647) is 2147483552 113 PASS foo(2147483647) is 2147483552 114 PASS foo(2147483647) is 2147483552 115 PASS foo(2147483647) is 2147483552 116 PASS foo(2147483647) is 2147483552 117 PASS foo(2147483647) is 2147483552 118 PASS foo(2147483647) is 2147483552 119 PASS foo(2147483647) is 2147483552 120 PASS foo(2147483647) is 2147483552 121 PASS foo(2147483647) is 2147483552 122 PASS foo(2147483647) is 2147483552 123 PASS foo(2147483647) is 2147483552 124 PASS foo(2147483647) is 2147483552 125 PASS foo(2147483647) is 2147483552 126 PASS foo(2147483647) is 2147483552 127 PASS foo(2147483647) is 2147483552 128 PASS foo(2147483647) is 2147483552 129 PASS foo(2147483647) is 2147483552 130 PASS foo(2147483647) is 2147483552 131 PASS foo(2147483647) is 2147483552 132 PASS foo(2147483647) is 2147483552 133 PASS foo(2147483647) is 2147483552 134 PASS foo(2147483647) is 2147483552 135 PASS foo(2147483647) is 2147483552 136 PASS foo(2147483647) is 2147483552 137 PASS foo(2147483647) is 2147483552 138 PASS foo(2147483647) is 2147483552 139 PASS foo(2147483647) is 2147483552 140 PASS foo(2147483647) is 2147483552 141 PASS foo(2147483647) is 2147483552 142 PASS foo(2147483647) is 2147483552 143 PASS foo(2147483647) is 2147483552 144 PASS foo(2147483647) is 2147483552 145 PASS foo(2147483647) is 2147483552 146 PASS foo(2147483647) is 2147483552 147 PASS foo(2147483647) is 2147483552 148 PASS foo(2147483647) is 2147483552 149 PASS foo(2147483647) is 2147483552 150 PASS foo(2147483647) is 2147483552 151 PASS foo(2147483647) is 2147483552 152 PASS foo(2147483647) is 2147483552 153 PASS foo(2147483647) is 2147483552 154 PASS foo(2147483647) is 2147483552 155 PASS foo(2147483647) is 2147483552 156 PASS foo(2147483647) is 2147483552 157 PASS foo(2147483647) is 2147483552 158 PASS foo(2147483647) is 2147483552 159 PASS foo(2147483647) is 2147483552 160 PASS foo(2147483647) is 2147483552 161 PASS foo(2147483647) is 2147483552 162 PASS foo(2147483647) is 2147483552 163 PASS foo(2147483647) is 2147483552 164 PASS foo(2147483647) is 2147483552 165 PASS foo(2147483647) is 2147483552 166 PASS foo(2147483647) is 2147483552 167 PASS foo(2147483647) is 2147483552 168 PASS foo(2147483647) is 2147483552 169 PASS foo(2147483647) is 2147483552 170 PASS foo(2147483647) is 2147483552 171 PASS foo(2147483647) is 2147483552 172 PASS foo(2147483647) is 2147483552 173 PASS foo(2147483647) is 2147483552 174 PASS foo(2147483647) is 2147483552 175 PASS foo(2147483647) is 2147483552 176 PASS foo(2147483647) is 2147483552 177 PASS foo(2147483647) is 2147483552 178 PASS foo(2147483647) is 2147483552 179 PASS foo(2147483647) is 2147483552 180 PASS foo(2147483647) is 2147483552 181 PASS foo(2147483647) is 2147483552 182 PASS foo(2147483647) is 2147483552 183 PASS foo(2147483647) is 2147483552 184 PASS foo(2147483647) is 2147483552 185 PASS foo(2147483647) is 2147483552 186 PASS foo(2147483647) is 2147483552 187 PASS foo(2147483647) is 2147483552 188 PASS foo(2147483647) is 2147483552 189 PASS foo(2147483647) is 2147483552 190 PASS foo(2147483647) is 2147483552 191 PASS foo(2147483647) is 2147483552 192 PASS foo(2147483647) is 2147483552 193 PASS foo(2147483647) is 2147483552 194 PASS foo(2147483647) is 2147483552 195 PASS foo(2147483647) is 2147483552 196 PASS foo(2147483647) is 2147483552 197 PASS foo(2147483647) is 2147483552 198 PASS foo(2147483647) is 2147483552 199 PASS foo(2147483647) is 2147483552 200 PASS foo(2147483647) is 2147483552 201 PASS foo(2147483647) is 2147483552 202 PASS foo(2147483647) is 2147483552 203 PASS foo(2147483647) is 2147483552 204 PASS foo(2147483647) is 2147483552 205 PASS foo(2147483647) is 2147483552 206 PASS foo(2147483647) is 2147483552 207 PASS foo(2147483647) is 2147483552 208 PASS foo(2147483647) is 2147483552 209 PASS foo(2147483647) is 2147483552 210 PASS foo(2147483647) is 2147483552 211 PASS foo(2147483647) is 2147483552 212 PASS foo(2147483647) is 2147483552 213 PASS foo(2147483647) is 2147483552 214 PASS foo(2147483647) is 2147483552 215 PASS foo(2147483647) is 2147483552 216 PASS foo(2147483647) is 2147483552 217 PASS foo(2147483647) is 2147483552 218 PASS foo(2147483647) is 2147483552 219 PASS foo(2147483647) is 2147483552 220 PASS foo(2147483647) is 2147483552 221 PASS foo(2147483647) is 2147483552 222 PASS foo(2147483647) is 2147483552 223 PASS foo(2147483647) is 2147483552 224 PASS foo(2147483647) is 2147483552 225 PASS foo(2147483647) is 2147483552 226 PASS foo(2147483647) is 2147483552 227 PASS foo(2147483647) is 2147483552 228 PASS foo(2147483647) is 2147483552 229 PASS successfullyParsed is true 230 231 TEST COMPLETE 232 233