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

Unified Diff: test/mjsunit/mirror-object.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
« no previous file with comments | « test/mjsunit/mirror-number.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/mirror-object.js
===================================================================
--- test/mjsunit/mirror-object.js (revision 1106)
+++ test/mjsunit/mirror-object.js (working copy)
@@ -135,7 +135,12 @@
assertEquals(properties[i].value().type(), o.type, 'Unexpected serialized property type for ' + name);
if (properties[i].value().isPrimitive()) {
- assertEquals(properties[i].value().value(), o.value, 'Unexpected serialized property value for ' + name);
+ // Special check for NaN as NaN == NaN is false.
+ if (properties[i].value().isNumber() && isNaN(properties[i].value().value())) {
Mads Ager (chromium) 2009/01/21 09:18:34 A couple of long lines here.
Søren Thygesen Gjesse 2009/01/21 09:31:40 I know, it is in a mjsunit test, which have a lot
+ assertEquals('NaN', o.value, 'Unexpected serialized property value for ' + name);
+ } else {
+ assertEquals(properties[i].value().value(), o.value, 'Unexpected serialized property value for ' + name);
+ }
} else if (properties[i].value().isFunction()) {
assertEquals(properties[i].value().source(), o.source, 'Unexpected serialized property value for ' + name);
}
@@ -159,6 +164,7 @@
testObjectMirror({'1':void 0,'2':null,'f':function pow(x,y){return Math.pow(x,y);}}, 'Object', 'Object');
testObjectMirror(new Point(-1.2,2.003), 'Object', 'Point');
testObjectMirror(this, 'global', '', true); // Global object has special properties
+testObjectMirror(this.__proto__, 'Object', '');
testObjectMirror([], 'Array', 'Array');
testObjectMirror([1,2], 'Array', 'Array');
« no previous file with comments | « test/mjsunit/mirror-number.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698