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
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);
##############################################################################
# Fails.
+harmony/proxies-function: FAIL
regress/regress-1119: FAIL
##############################################################################