summaryrefslogtreecommitdiff
path: root/jstests/core/objid7.js
blob: 4c3505f8965b1a3f659a78ca7e5d1790d35baec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

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");