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

Unified Diff: test/mjsunit/mjsunit.js

Issue 88022: Add Array.prototype.reduce and .reduceRight. (Closed)
Patch Set: Created 11 years, 8 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
« test/mjsunit/array-reduce.js ('K') | « test/mjsunit/array-reduce.js ('k') | no next file » | no next file with comments »
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 370d491f8f9c66f6e39747b690673bd8511716ac..320e8d15d360e23daa3e88ff257b35b628c49080 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -53,6 +53,9 @@ function fail(expected, found, name_opt) {
function deepEquals(a, b) {
if (a == b) return true;
+ if (typeof a == "number" && typeof b == "number" && isNaN(a) && isNaN(b)) {
+ return true;
+ }
if ((typeof a) !== 'object' || (typeof b) !== 'object' ||
(a === null) || (b === null))
return false;
« test/mjsunit/array-reduce.js ('K') | « test/mjsunit/array-reduce.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698