From 6d950a748f8ee4f2e89ecdb2922cb1b63f937895 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Fri, 28 Oct 2011 09:09:51 +0000 Subject: [PATCH] Fix assertSame for unit testing harness. Using isNaN() here is bogus because it performs an implicit toNumber() conversion, hence something like assertSame(undefined, {}) would not throw an exception. These are not the NaNs you are looking for. R=rossberg@chromium.org TEST=mjsunit Review URL: http://codereview.chromium.org/8400056 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/mjsunit/mjsunit.js | 2 +- test/mjsunit/mjsunit.status | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js index faa5a43..6f6e323 100644 --- a/test/mjsunit/mjsunit.js +++ b/test/mjsunit/mjsunit.js @@ -223,7 +223,7 @@ var assertUnreachable; assertSame = function assertSame(expected, found, name_opt) { if (found === expected) { if (expected !== 0 || (1 / expected) == (1 / found)) return; - } else if (isNaN(expected) && isNaN(found)) { + } else if ((expected !== expected) && (found !== found)) { return; } fail(PrettyPrint(expected), found, name_opt); diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index 941e0e8..32989c2 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -32,6 +32,7 @@ bugs: FAIL ############################################################################## # Fails. +harmony/proxies-function: FAIL regress/regress-1119: FAIL ############################################################################## -- 2.7.4