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

Unified Diff: test/mjsunit/mirror-number.js

Issue 6869007: Cleanup of mjsunit.js code and make assertEquals more strict. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 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
« no previous file with comments | « test/mjsunit/math-min-max.js ('k') | test/mjsunit/mirror-object.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/mirror-number.js
diff --git a/test/mjsunit/mirror-number.js b/test/mjsunit/mirror-number.js
index 2db5df43994de71180fea2e28f0da609acc76ae7..fc71c1238b46f941487db355be97ec89372666d7 100644
--- a/test/mjsunit/mirror-number.js
+++ b/test/mjsunit/mirror-number.js
@@ -50,10 +50,10 @@ function testNumberMirror(n) {
// Parse JSON representation and check.
var fromJSON = eval('(' + json + ')');
assertEquals('number', fromJSON.type);
- if (!isNaN(n)) {
+ if (isFinite(n)) {
assertEquals(n, fromJSON.value);
} else {
- // NaN values are encoded as strings.
+ // NaN and Infinity values are encoded as strings.
assertTrue(typeof fromJSON.value == 'string');
if (n === Infinity) {
assertEquals('Infinity', fromJSON.value);
« no previous file with comments | « test/mjsunit/math-min-max.js ('k') | test/mjsunit/mirror-object.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698