diff options
Diffstat (limited to 'jstests/objid7.js')
-rw-r--r-- | jstests/objid7.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/objid7.js b/jstests/objid7.js new file mode 100644 index 00000000000..5a5ca728c7d --- /dev/null +++ b/jstests/objid7.js @@ -0,0 +1,13 @@ + +a = new ObjectId( "4c1a478603eba73620000000" ) +b = new ObjectId( "4c1a478603eba73620000000" ) +c = new ObjectId(); + +assert.eq( a.toString() , b.toString() , "A" ) +assert.eq( a.toString() , "ObjectId(\"4c1a478603eba73620000000\")" , "B" ); + +assert( a.equals( b ) , "C" ) + +assert.neq( a.toString() , c.toString() , "D" ); +assert( ! a.equals( c ) , "E" ); + |