Reviewers: rossberg,

Message:
PTAL.

Description:
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.

[email protected]
TEST=mjsunit


Please review this at http://codereview.chromium.org/8400056/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M test/mjsunit/mjsunit.js
  M test/mjsunit/mjsunit.status


Index: test/mjsunit/mjsunit.js
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index faa5a43829a69f3dedbd39f3c524e6884f62e8fe..6f6e3230d57fa27265db8a74dca11168f2aa3682 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);
Index: test/mjsunit/mjsunit.status
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index 8a1b68bfb28051f315197fa8ef91dd158b9c4cec..52e86b18b85bab48fd9e781bc51490596ca0d5e0 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

##############################################################################


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to