summaryrefslogtreecommitdiff
path: root/jstests/core/objid1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/objid1.js')
-rw-r--r--jstests/core/objid1.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/jstests/core/objid1.js b/jstests/core/objid1.js
index f1a9fbe0fbd..d08089c26db 100644
--- a/jstests/core/objid1.js
+++ b/jstests/core/objid1.js
@@ -2,15 +2,17 @@ t = db.objid1;
t.drop();
b = new ObjectId();
-assert( b.str , "A" );
+assert(b.str, "A");
-a = new ObjectId( b.str );
-assert.eq( a.str , b.str , "B" );
+a = new ObjectId(b.str);
+assert.eq(a.str, b.str, "B");
-t.save( { a : a } );
-assert( t.findOne().a.isObjectId , "C" );
-assert.eq( a.str , t.findOne().a.str , "D" );
+t.save({a: a});
+assert(t.findOne().a.isObjectId, "C");
+assert.eq(a.str, t.findOne().a.str, "D");
-x = { a : new ObjectId() };
-eval( " y = " + tojson( x ) );
-assert.eq( x.a.str , y.a.str , "E" );
+x = {
+ a: new ObjectId()
+};
+eval(" y = " + tojson(x));
+assert.eq(x.a.str, y.a.str, "E");