diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
commit | 33af2720f26c2b25bc7f75ce7eb454ff99db6d35 (patch) | |
tree | 9a38f0c96420edf503eebd6325dd8d2d8249f653 /deps/v8/test/mjsunit/math-sqrt.js | |
parent | 6afdca885adeeeed9eef8cbb01c3d97af0bc084d (diff) | |
download | android-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.gz android-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.bz2 android-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.zip |
Upgrade V8 to 3.4.8
Diffstat (limited to 'deps/v8/test/mjsunit/math-sqrt.js')
-rw-r--r-- | deps/v8/test/mjsunit/math-sqrt.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/math-sqrt.js b/deps/v8/test/mjsunit/math-sqrt.js index fb00d5ba8a..43fbf6b2dc 100644 --- a/deps/v8/test/mjsunit/math-sqrt.js +++ b/deps/v8/test/mjsunit/math-sqrt.js @@ -29,7 +29,11 @@ function test(expected_sqrt, value) { assertEquals(expected_sqrt, Math.sqrt(value)); - if (isFinite(value)) { + if (isFinite(value)) { + if (value === 0 && (1 / value) == -Infinity) { + // Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0. + expected_sqrt = 0; + } assertEquals(expected_sqrt, Math.pow(value, 0.5)); } } |