Revision: 9831
Author: [email protected]
Date: Fri Oct 28 02:09:51 2011
Log: 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
Review URL: http://codereview.chromium.org/8400056
http://code.google.com/p/v8/source/detail?r=9831
Modified:
/branches/bleeding_edge/test/mjsunit/mjsunit.js
/branches/bleeding_edge/test/mjsunit/mjsunit.status
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.js Fri Apr 15 04:35:36 2011
+++ /branches/bleeding_edge/test/mjsunit/mjsunit.js Fri Oct 28 02:09:51 2011
@@ -223,7 +223,7 @@
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);
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Thu Oct 27 05:12:53
2011
+++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Fri Oct 28 02:09:51
2011
@@ -32,6 +32,7 @@
##############################################################################
# Fails.
+harmony/proxies-function: FAIL
regress/regress-1119: FAIL
##############################################################################
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev