summaryrefslogtreecommitdiff
path: root/jstests/objid7.js
blob: 5a5ca728c7d1bd7ef5e0d54d46017dee0559eda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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" );