From c5d975b2b52fb093922c2ee5f4661f82b3ffa2cc Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Tue, 15 Jun 2010 21:28:26 -0400 Subject: [PATCH] more tests for SERVER-857 --- jstests/objid6.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jstests/objid6.js b/jstests/objid6.js index c3e2400dfd4..5bc50d6592a 100644 --- a/jstests/objid6.js +++ b/jstests/objid6.js @@ -3,4 +3,13 @@ assert(o.getTimestamp); a = new ObjectId("4c17f616a707427266a2801a"); b = new ObjectId("4c17f616a707428966a2801c"); -assert.eq(a.getTimestamp(), b.getTimestamp()); +assert.eq(a.getTimestamp(), b.getTimestamp() , "A" ); + + +a = new ObjectId() + +x = Math.floor( (new Date()).getTime() / 1000 ) +y = Math.floor( a.getTimestamp().getTime() / 1000 ) + +assert.eq( x , y , "B" ) +