diff options
Diffstat (limited to 'jstests/date1.js')
-rw-r--r-- | jstests/date1.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/jstests/date1.js b/jstests/date1.js index a0b8dced730..27e56a31731 100644 --- a/jstests/date1.js +++ b/jstests/date1.js @@ -1,8 +1,14 @@ t = db.date1; -t.drop(); -d = new Date() -t.save( { a : 1 , d : d } ); -assert.eq( d , t.findOne().d , "A" ) +function go( d , msg ){ + t.drop(); + t.save( { a : 1 , d : d } ); + assert.eq( d , t.findOne().d , msg ) +} + +go( new Date() , "A" ) +go( new Date( 1 ) , "B") +go( new Date( 0 ) , "C") + |