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

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

Issue 18445: Changes to the mirror handling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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
Index: test/mjsunit/mirror-number.js
===================================================================
--- test/mjsunit/mirror-number.js (revision 1106)
+++ test/mjsunit/mirror-number.js (working copy)
@@ -53,7 +53,15 @@
if (!isNaN(n)) {
assertEquals(n, fromJSON.value);
} else {
- assertTrue(isNaN(fromJSON.value));
+ // NaN values are encoded as strings.
+ assertTrue(typeof fromJSON.value == 'string');
+ if (n === Infinity) {
+ assertEquals('Infinity', fromJSON.value);
+ } else if (n === -Infinity) {
+ assertEquals('-Infinity', fromJSON.value);
+ } else {
+ assertEquals('NaN', fromJSON.value);
+ }
}
}
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/mirror-object.js » ('j') | test/mjsunit/mirror-object.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698