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); |
+ } |
} |
} |