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 description( 25 "This test checks some cases that might be affected by constant folding." 26 ); 27 28 shouldBe('"abc" + "2.1"', '"abc2.1"'); 29 shouldBe('"123" + "2.1"', '"1232.1"'); 30 shouldBe('"123" + "="', '"123="'); 31 shouldBe('"*" + "123"', '"*123"'); 32 33 shouldBe('!"abc"', 'false'); 34 shouldBe('!""', 'true'); 35 36 shouldBe('10.3 + 2.1', '12.4'); 37 shouldBe('10.3 + "2.1"', '"10.32.1"'); 38 shouldBe('"10.3" + 2.1 ', '"10.32.1"'); 39 shouldBe('"10.3" + "2.1"', '"10.32.1"'); 40 shouldBe('10.3 + true', '11.3'); 41 shouldBe('"10.3" + true', '"10.3true"'); 42 shouldBe('10.3 + false', '10.3'); 43 shouldBe('"10.3" + false', '"10.3false"'); 44 shouldBe('true + 2.1', '3.1'); 45 shouldBe('true + "2.1"', '"true2.1"'); 46 shouldBe('false + 2.1', '2.1'); 47 shouldBe('false + "2.1"', '"false2.1"'); 48 49 shouldBe('10.3 - 2.1', '8.200000000000001'); 50 shouldBe('10.3 - "2.1"', '8.200000000000001'); 51 shouldBe('"10.3" - 2.1 ', '8.200000000000001'); 52 shouldBe('"10.3" - "2.1"', '8.200000000000001'); 53 shouldBe('10.3 - true', '9.3'); 54 shouldBe('"10.3" - true', '9.3'); 55 shouldBe('10.3 - false', '10.3'); 56 shouldBe('"10.3" - false', '10.3'); 57 shouldBe('true - 2.1', '-1.1'); 58 shouldBe('true - "2.1"', '-1.1'); 59 shouldBe('false - 2.1', '-2.1'); 60 shouldBe('false - "2.1"', '-2.1'); 61 62 shouldBe('10.3 * 2.1', '21.630000000000003'); 63 shouldBe('10.3 * "2.1"', '21.630000000000003'); 64 shouldBe('"10.3" * 2.1', '21.630000000000003'); 65 shouldBe('"10.3" * "2.1"', '21.630000000000003'); 66 shouldBe('10.3 * true', '10.3'); 67 shouldBe('"10.3" * true', '10.3'); 68 shouldBe('10.3 * false', '0'); 69 shouldBe('"10.3" * false', '0'); 70 shouldBe('true * 10.3', '10.3'); 71 shouldBe('true * "10.3"', '10.3'); 72 shouldBe('false * 10.3', '0'); 73 shouldBe('false * "10.3"', '0'); 74 75 shouldBe('10.3 / 2', '5.15'); 76 shouldBe('"10.3" / 2', '5.15'); 77 shouldBe('10.3 / "2"', '5.15'); 78 shouldBe('"10.3" / "2"', '5.15'); 79 shouldBe('10.3 / true', '10.3'); 80 shouldBe('"10.3" / true', '10.3'); 81 shouldBe('true / 2', '0.5'); 82 shouldBe('true / "2"', '0.5'); 83 shouldBe('false / 2', '0'); 84 shouldBe('false / "2"', '0'); 85 86 shouldBe('10.3 % 2.1', '1.9000000000000004'); 87 shouldBe('"10.3" % 2.1', '1.9000000000000004'); 88 shouldBe('10.3 % "2.1"', '1.9000000000000004'); 89 shouldBe('"10.3" % "2.1"', '1.9000000000000004'); 90 shouldBe('10.3 % true', '0.3000000000000007'); 91 shouldBe('"10.3" % true', '0.3000000000000007'); 92 shouldBe('true % 2', '1'); 93 shouldBe('true % "2"', '1'); 94 shouldBe('false % 2', '0'); 95 shouldBe('false % "2"', '0'); 96 97 shouldBe('10.3 << 2.1', '40'); 98 shouldBe('"10.3" << 2.1', '40'); 99 shouldBe('10.3 << "2.1"', '40'); 100 shouldBe('"10.3" << "2.1"', '40'); 101 shouldBe('10.3 << true', '20'); 102 shouldBe('"10.3" << true', '20'); 103 shouldBe('10.3 << false', '10'); 104 shouldBe('"10.3" << false', '10'); 105 shouldBe('true << 2.1', '4'); 106 shouldBe('true << "2.1"', '4'); 107 shouldBe('false << 2.1', '0'); 108 shouldBe('false << "2.1"', '0'); 109 110 shouldBe('10.3 >> 2.1', '2'); 111 shouldBe('"10.3" >> 2.1', '2'); 112 shouldBe('10.3 >> "2.1"', '2'); 113 shouldBe('"10.3" >> "2.1"', '2'); 114 shouldBe('10.3 >> true', '5'); 115 shouldBe('"10.3" >> true', '5'); 116 shouldBe('10.3 >> false', '10'); 117 shouldBe('"10.3" >> false', '10'); 118 shouldBe('true >> 2.1', '0'); 119 shouldBe('true >> "2.1"', '0'); 120 shouldBe('false >> 2.1', '0'); 121 shouldBe('false >> "2.1"', '0'); 122 123 shouldBe('-10.3 >>> 2.1', '1073741821'); 124 shouldBe('"-10.3">>> 2.1', '1073741821'); 125 shouldBe('-10.3 >>> "2.1"', '1073741821'); 126 shouldBe('"-10.3">>> "2.1"', '1073741821'); 127 shouldBe('-10.3 >>> true', '2147483643'); 128 shouldBe('"-10.3">>> true', '2147483643'); 129 shouldBe('-10.3 >>> false', '4294967286'); 130 shouldBe('"-10.3" >>> false', '4294967286'); 131 shouldBe('true >>> 2.1', '0'); 132 shouldBe('true >>> "2.1"', '0'); 133 shouldBe('false >>> 2.1', '0'); 134 shouldBe('false >>> "2.1"', '0'); 135 136 137 shouldBe('10.3 & 3.1', '2'); 138 shouldBe('"10.3" & 3.1', '2'); 139 shouldBe('10.3 & "3.1"', '2'); 140 shouldBe('"10.3" & "3.1"', '2'); 141 shouldBe('10.3 & true', '0'); 142 shouldBe('"10.3" & true', '0'); 143 shouldBe('11.3 & true', '1'); 144 shouldBe('"11.3" & true', '1'); 145 shouldBe('10.3 & false', '0'); 146 shouldBe('"10.3" & false', '0'); 147 shouldBe('11.3 & false', '0'); 148 shouldBe('"11.3" & false', '0'); 149 shouldBe('true & 3.1', '1'); 150 shouldBe('true & "3.1"', '1'); 151 shouldBe('true & 2.1', '0'); 152 shouldBe('true & "2.1"', '0'); 153 shouldBe('false & 3.1', '0'); 154 shouldBe('false & "3.1"', '0'); 155 shouldBe('false & 2.1', '0'); 156 shouldBe('false & "2.1"', '0'); 157 158 159 shouldBe('10.3 | 3.1', '11'); 160 shouldBe('"10.3" | 3.1', '11'); 161 shouldBe('10.3 | "3.1"', '11'); 162 shouldBe('"10.3" | "3.1"', '11'); 163 shouldBe('10.3 | true', '11'); 164 shouldBe('"10.3" | true', '11'); 165 shouldBe('11.3 | true', '11'); 166 shouldBe('"11.3" | true', '11'); 167 shouldBe('10.3 | false', '10'); 168 shouldBe('"10.3" | false', '10'); 169 shouldBe('11.3 | false', '11'); 170 shouldBe('"11.3" | false', '11'); 171 shouldBe('true | 3.1', '3'); 172 shouldBe('true | "3.1"', '3'); 173 shouldBe('true | 2.1', '3'); 174 shouldBe('true | "2.1"', '3'); 175 shouldBe('false | 3.1', '3'); 176 shouldBe('false | "3.1"', '3'); 177 shouldBe('false | 2.1', '2'); 178 shouldBe('false | "2.1"', '2'); 179 180 shouldBe('10.3 ^ 3.1', '9'); 181 shouldBe('"10.3" ^ 3.1', '9'); 182 shouldBe('10.3 ^ "3.1"', '9'); 183 shouldBe('"10.3" ^ "3.1"', '9'); 184 shouldBe('10.3 ^ true', '11'); 185 shouldBe('"10.3" ^ true', '11'); 186 shouldBe('11.3 ^ true', '10'); 187 shouldBe('"11.3" ^ true', '10'); 188 shouldBe('10.3 ^ false', '10'); 189 shouldBe('"10.3" ^ false', '10'); 190 shouldBe('11.3 ^ false', '11'); 191 shouldBe('"11.3" ^ false', '11'); 192 shouldBe('true ^ 3.1', '2'); 193 shouldBe('true ^ "3.1"', '2'); 194 shouldBe('true ^ 2.1', '3'); 195 shouldBe('true ^ "2.1"', '3'); 196 shouldBe('false ^ 3.1', '3'); 197 shouldBe('false ^ "3.1"', '3'); 198 shouldBe('false ^ 2.1', '2'); 199 shouldBe('false ^ "2.1"', '2'); 200 201 shouldBe('10.3 == 3.1', 'false'); 202 shouldBe('3.1 == 3.1', 'true'); 203 shouldBe('"10.3" == 3.1', 'false'); 204 shouldBe('"3.1" == 3.1', 'true'); 205 shouldBe('10.3 == "3.1"', 'false'); 206 shouldBe('3.1 == "3.1"', 'true'); 207 shouldBe('"10.3" == "3.1"', 'false'); 208 shouldBe('"3.1" == "3.1"', 'true'); 209 shouldBe('10.3 == true', 'false'); 210 shouldBe('1 == true', 'true'); 211 shouldBe('"10.3" == true', 'false'); 212 shouldBe('"1" == true', 'true'); 213 shouldBe('10.3 == false', 'false'); 214 shouldBe('0 == false', 'true'); 215 shouldBe('"10.3" == false', 'false'); 216 shouldBe('"0" == false', 'true'); 217 shouldBe('true == 3.1', 'false'); 218 shouldBe('true == 1', 'true'); 219 shouldBe('true == "3.1"', 'false'); 220 shouldBe('true == "1" ', 'true'); 221 shouldBe('false == 3.1', 'false'); 222 shouldBe('false == 0', 'true'); 223 shouldBe('false == "3.1"', 'false'); 224 shouldBe('false == "0"', 'true'); 225 shouldBe('true == true', 'true'); 226 shouldBe('false == true', 'false'); 227 shouldBe('true == false', 'false'); 228 shouldBe('false == false', 'true'); 229 230 shouldBe('10.3 != 3.1', 'true'); 231 shouldBe('3.1 != 3.1', 'false'); 232 shouldBe('"10.3" != 3.1', 'true'); 233 shouldBe('"3.1" != 3.1', 'false'); 234 shouldBe('10.3 != "3.1"', 'true'); 235 shouldBe('3.1 != "3.1"', 'false'); 236 shouldBe('"10.3" != "3.1"', 'true'); 237 shouldBe('"3.1" != "3.1"', 'false'); 238 shouldBe('10.3 != true', 'true'); 239 shouldBe('1 != true', 'false'); 240 shouldBe('"10.3" != true', 'true'); 241 shouldBe('"1" != true', 'false'); 242 shouldBe('10.3 != false', 'true'); 243 shouldBe('0 != false', 'false'); 244 shouldBe('"10.3" != false', 'true'); 245 shouldBe('"0" != false', 'false'); 246 shouldBe('true != 3.1', 'true'); 247 shouldBe('true != 1', 'false'); 248 shouldBe('true != "3.1"', 'true'); 249 shouldBe('true != "1" ', 'false'); 250 shouldBe('false != 3.1', 'true'); 251 shouldBe('false != 0', 'false'); 252 shouldBe('false != "3.1"', 'true'); 253 shouldBe('false != "0"', 'false'); 254 shouldBe('true != true', 'false'); 255 shouldBe('false != true', 'true'); 256 shouldBe('true != false', 'true'); 257 shouldBe('false != false', 'false'); 258 259 shouldBe('10.3 > 3.1', 'true'); 260 shouldBe('3.1 > 3.1', 'false'); 261 shouldBe('"10.3" > 3.1', 'true'); 262 shouldBe('"3.1" > 3.1', 'false'); 263 shouldBe('10.3 > "3.1"', 'true'); 264 shouldBe('3.1 > "3.1"', 'false'); 265 shouldBe('"10.3" > "3.1"', 'false'); 266 shouldBe('"3.1" > "3.1"', 'false'); 267 shouldBe('10.3 > true', 'true'); 268 shouldBe('0 > true', 'false'); 269 shouldBe('"10.3" > true', 'true'); 270 shouldBe('"0" > true', 'false'); 271 shouldBe('10.3 > false', 'true'); 272 shouldBe('-1 > false', 'false'); 273 shouldBe('"10.3" > false', 'true'); 274 shouldBe('"-1" > false', 'false'); 275 shouldBe('true > 0.1', 'true'); 276 shouldBe('true > 1.1', 'false'); 277 shouldBe('true > "0.1"', 'true'); 278 shouldBe('true > "1.1"', 'false'); 279 shouldBe('false > -3.1', 'true'); 280 shouldBe('false > 0', 'false'); 281 shouldBe('false > "-3.1"', 'true'); 282 shouldBe('false > "0"', 'false'); 283 shouldBe('true > true', 'false'); 284 shouldBe('false > true', 'false'); 285 shouldBe('true > false', 'true'); 286 shouldBe('false > false', 'false'); 287 288 shouldBe('10.3 < 3.1', 'false'); 289 shouldBe('2.1 < 3.1', 'true'); 290 shouldBe('"10.3" < 3.1', 'false'); 291 shouldBe('"2.1" < 3.1', 'true'); 292 shouldBe('10.3 < "3.1"', 'false'); 293 shouldBe('2.1 < "3.1"', 'true'); 294 shouldBe('"10.3" < "3.1"', 'true'); 295 shouldBe('"2.1" < "3.1"', 'true'); 296 shouldBe('10.3 < true', 'false'); 297 shouldBe('0 < true', 'true'); 298 shouldBe('"10.3" < true', 'false'); 299 shouldBe('"0" < true', 'true'); 300 shouldBe('10.3 < false', 'false'); 301 shouldBe('-1 < false', 'true'); 302 shouldBe('"10.3" < false', 'false'); 303 shouldBe('"-1" < false', 'true'); 304 shouldBe('true < 0.1', 'false'); 305 shouldBe('true < 1.1', 'true'); 306 shouldBe('true < "0.1"', 'false'); 307 shouldBe('true < "1.1"', 'true'); 308 shouldBe('false < -3.1', 'false'); 309 shouldBe('false < 0.1', 'true'); 310 shouldBe('false < "-3.1"', 'false'); 311 shouldBe('false < "0.1"', 'true'); 312 shouldBe('true < true', 'false'); 313 shouldBe('false < true', 'true'); 314 shouldBe('true < false', 'false'); 315 shouldBe('false < false', 'false'); 316 317 shouldBe('10.3 >= 3.1', 'true'); 318 shouldBe('2.1 >= 3.1', 'false'); 319 shouldBe('"10.3" >= 3.1', 'true'); 320 shouldBe('"2.1" >= 3.1', 'false'); 321 shouldBe('10.3 >= "3.1"', 'true'); 322 shouldBe('2.1 >= "3.1"', 'false'); 323 shouldBe('"10.3" >= "3.1"', 'false'); 324 shouldBe('"2.1" >= "3.1"', 'false'); 325 shouldBe('10.3 >= true', 'true'); 326 shouldBe('0 >= true', 'false'); 327 shouldBe('"10.3" >= true', 'true'); 328 shouldBe('"0" >= true', 'false'); 329 shouldBe('10.3 >= false', 'true'); 330 shouldBe('-1 >= false', 'false'); 331 shouldBe('"10.3" >= false', 'true'); 332 shouldBe('"-1" >= false', 'false'); 333 shouldBe('true >= 0.1', 'true'); 334 shouldBe('true >= 1.1', 'false'); 335 shouldBe('true >= "0.1"', 'true'); 336 shouldBe('true >= "1.1"', 'false'); 337 shouldBe('false >= -3.1', 'true'); 338 shouldBe('false >= 0', 'true'); 339 shouldBe('false >= "-3.1"', 'true'); 340 shouldBe('false >= "0"', 'true'); 341 shouldBe('true >= true', 'true'); 342 shouldBe('false >= true', 'false'); 343 shouldBe('true >= false', 'true'); 344 shouldBe('false >= false', 'true'); 345 346 shouldBe('10.3 <= 3.1', 'false'); 347 shouldBe('2.1 <= 3.1', 'true'); 348 shouldBe('"10.3" <= 3.1', 'false'); 349 shouldBe('"2.1" <= 3.1', 'true'); 350 shouldBe('10.3 <= "3.1"', 'false'); 351 shouldBe('2.1 <= "3.1"', 'true'); 352 shouldBe('"10.3" <= "3.1"', 'true'); 353 shouldBe('"2.1" <= "3.1"', 'true'); 354 shouldBe('10.3 <= true', 'false'); 355 shouldBe('0 <= true', 'true'); 356 shouldBe('"10.3" <= true', 'false'); 357 shouldBe('"0" <= true', 'true'); 358 shouldBe('10.3 <= false', 'false'); 359 shouldBe('-1 <= false', 'true'); 360 shouldBe('"10.3" <= false', 'false'); 361 shouldBe('"-1" <= false', 'true'); 362 shouldBe('true <= 0.1', 'false'); 363 shouldBe('true <= 1.1', 'true'); 364 shouldBe('true <= "0.1"', 'false'); 365 shouldBe('true <= "1.1"', 'true'); 366 shouldBe('false <= -3.1', 'false'); 367 shouldBe('false <= 0.1', 'true'); 368 shouldBe('false <= "-3.1"', 'false'); 369 shouldBe('false <= "0.1"', 'true'); 370 shouldBe('true <= true', 'true'); 371 shouldBe('false <= true', 'true'); 372 shouldBe('true <= false', 'false'); 373 shouldBe('false <= false', 'true'); 374 375 shouldBe('true && true', 'true'); 376 shouldBe('true && false', 'false'); 377 shouldBe('false && true', 'false'); 378 shouldBe('false && false', 'false'); 379 shouldBe('1.1 && true', 'true'); 380 shouldBe('1.1 && false', 'false'); 381 shouldBe('0 && true', '0'); 382 shouldBe('0 && false', '0'); 383 shouldBe('"1.1" && true', 'true'); 384 shouldBe('"1.1" && false', 'false'); 385 shouldBe('"0" && true', 'true'); 386 shouldBe('"0" && false', 'false'); 387 shouldBe('true && 1.1', '1.1'); 388 shouldBe('true && 0', '0'); 389 shouldBe('false && 1.1', 'false'); 390 shouldBe('false && 0', 'false'); 391 shouldBe('true && "1.1"', '"1.1"'); 392 shouldBe('true && "0"', '"0"'); 393 shouldBe('false && "1.1"', 'false'); 394 shouldBe('false && "0"', 'false'); 395 shouldBe('1.1 && 1.1', '1.1'); 396 shouldBe('1.1 && 0', '0'); 397 shouldBe('0 && 1.1', '0'); 398 shouldBe('0 && 0', '0'); 399 shouldBe('"1.1" && 1.1', '1.1'); 400 shouldBe('"1.1" && 0', '0'); 401 shouldBe('"0" && 1.1', '1.1'); 402 shouldBe('"0" && 0', '0'); 403 shouldBe('1.1 && "1.1"', '"1.1"'); 404 shouldBe('1.1 && "0"', '"0"'); 405 shouldBe('0 && "1.1"', '0'); 406 shouldBe('0 && "0"', '0'); 407 shouldBe('"1.1" && "1.1"', '"1.1"'); 408 shouldBe('"1.1" && "0"', '"0"'); 409 shouldBe('"0" && "1.1"', '"1.1"'); 410 shouldBe('"0" && "0"', '"0"'); 411 412 shouldBe('true || true', 'true'); 413 shouldBe('true || false', 'true'); 414 shouldBe('false || true', 'true'); 415 shouldBe('false || false', 'false'); 416 shouldBe('1.1 || true', '1.1'); 417 shouldBe('1.1 || false', '1.1'); 418 shouldBe('0 || true', 'true'); 419 shouldBe('0 || false', 'false'); 420 shouldBe('"1.1" || true', '"1.1"'); 421 shouldBe('"1.1" || false', '"1.1"'); 422 shouldBe('"0" || true', '"0"'); 423 shouldBe('"0" || false', '"0"'); 424 shouldBe('true || 1.1', 'true'); 425 shouldBe('true || 0', 'true'); 426 shouldBe('false || 1.1', '1.1'); 427 shouldBe('false || 0', '0'); 428 shouldBe('true || "1.1"', 'true'); 429 shouldBe('true || "0"', 'true'); 430 shouldBe('false || "1.1"', '"1.1"'); 431 shouldBe('false || "0"', '"0"'); 432 shouldBe('1.1 || 1.1', '1.1'); 433 shouldBe('1.1 || 0', '1.1'); 434 shouldBe('0 || 1.1', '1.1'); 435 shouldBe('0 || 0', '0'); 436 shouldBe('"1.1" || 1.1', '"1.1"'); 437 shouldBe('"1.1" || 0', '"1.1"'); 438 shouldBe('"0" || 1.1', '"0"'); 439 shouldBe('"0" || 0', '"0"'); 440 shouldBe('1.1 || "1.1"', '1.1'); 441 shouldBe('1.1 || "0"', '1.1'); 442 shouldBe('0 || "1.1"', '"1.1"'); 443 shouldBe('0 || "0"', '"0"'); 444 shouldBe('"1.1" || "1.1"', '"1.1"'); 445 shouldBe('"1.1" || "0"', '"1.1"'); 446 shouldBe('"0" || "1.1"', '"0"'); 447 shouldBe('"0" || "0"', '"0"'); 448 449 shouldBe('+3.1', '3.1'); 450 shouldBe('+ +3.1', '3.1'); 451 shouldBe('+"3.1"', '3.1'); 452 shouldBe('+true', '1'); 453 shouldBe('+false', '0'); 454 455 shouldBe('-3.1', '-3.1'); 456 shouldBe('- -3.1', '3.1'); 457 shouldBe('-"3.1"', '-3.1'); 458 shouldBe('-true', '-1'); 459 shouldBe('-false', '-0'); 460 461 shouldBe('~3', '-4'); 462 shouldBe('~ ~3', '3'); 463 shouldBe('~"3"', '-4'); 464 shouldBe('~true', '-2'); 465 shouldBe('~false', '-1'); 466 467 shouldBe('!true', 'false'); 468 shouldBe('!false', 'true'); 469 shouldBe('!3', 'false'); 470 shouldBe('!0', 'true'); 471 472 shouldBe('10.3 / 0', 'Infinity'); 473 shouldBe('"10.3" / 0', 'Infinity'); 474 shouldBe('-10.3 / 0', '-Infinity'); 475 shouldBe('"-10.3" / 0', '-Infinity'); 476 shouldBe('true / 0', 'Infinity'); 477 shouldBe('false / 0', 'NaN'); 478 shouldBe('0 / 0', 'NaN'); 479 480 shouldBe('10.3 / -0', '-Infinity'); 481 shouldBe('"10.3" / -0', '-Infinity'); 482 shouldBe('-10.3 / -0', 'Infinity'); 483 shouldBe('"-10.3" / -0', 'Infinity'); 484 shouldBe('true / -0', '-Infinity'); 485 shouldBe('false / -0', 'NaN'); 486 shouldBe('0 / -0', 'NaN'); 487 488 shouldBe('1 / -0', '-Infinity'); 489 shouldBe('1 / - 0', '-Infinity'); 490 shouldBe('1 / - -0', 'Infinity'); 491 shouldBe('1 / - - -0', '-Infinity'); 492