Fix test that can fail for small denormals.

Review URL: http://codereview.chromium.org/6736027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
lrn@chromium.org 2011-03-25 14:03:42 +00:00
parent 1a15a9e6a9
commit 40f9a7db8e

View File

@ -30,7 +30,7 @@
function test(expected_sqrt, value) {
assertEquals(expected_sqrt, Math.sqrt(value));
if (isFinite(value)) {
if ((1 / value) == -Infinity) {
if (value === 0 && (1 / value) == -Infinity) {
// Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0.
expected_sqrt = 0;
}