summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/math-sqrt.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-08 16:40:11 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-08 16:40:11 -0700
commite5564a3f29e0a818832a97c7c3b28d7c8b3b0460 (patch)
tree4b48a6577080d5e44da4d2cbebb7fe7951660de8 /deps/v8/test/mjsunit/math-sqrt.js
parent0df2f74d364826053641395b01c2fcb1345057a9 (diff)
downloadandroid-node-v8-e5564a3f29e0a818832a97c7c3b28d7c8b3b0460.tar.gz
android-node-v8-e5564a3f29e0a818832a97c7c3b28d7c8b3b0460.tar.bz2
android-node-v8-e5564a3f29e0a818832a97c7c3b28d7c8b3b0460.zip
Upgrade V8 to 3.4.10
Diffstat (limited to 'deps/v8/test/mjsunit/math-sqrt.js')
-rw-r--r--deps/v8/test/mjsunit/math-sqrt.js6
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));
}
}