Fix assertSame for unit testing harness.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Oct 2011 09:09:51 +0000 (09:09 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 28 Oct 2011 09:09:51 +0000 (09:09 +0000)
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
test/mjsunit/mjsunit.status

index faa5a43..6f6e323 100644 (file)
@@ -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);
index 941e0e8..32989c2 100644 (file)
@@ -32,6 +32,7 @@ bugs: FAIL
 
 ##############################################################################
 # Fails.
+harmony/proxies-function: FAIL
 regress/regress-1119: FAIL
 
 ##############################################################################