Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Unified Diff: test/mjsunit/mjsunit.js

Issue 8400056: Fix assertSame for unit testing harness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | test/mjsunit/mjsunit.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
rossberg 2011/10/28 09:05:18 Somebody should pull IEEE to court for their NaN s
return;
}
fail(PrettyPrint(expected), found, name_opt);
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | test/mjsunit/mjsunit.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698