| <p>Test for overflow when negating the largest negative signed int.</p> |
| <p>If the test passes, you'll see a series of PASS messages below.</p> |
| return document.getElementById(id); |
| $("console").appendChild(document.createTextNode(s + "\n")); |
| function shouldBe(aDescription, a, b) |
| log("PASS: " + aDescription + " should be " + b + " and is."); |
| log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + "."); |
| // Can be constant-folded by the parser. |
| shouldBe("x", x, 2147483648); |
| // Can't be constant-folded without dataflow analysis. |
| shouldBe("y", y, 2147483648); |