diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-06-01 11:34:11 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-06-01 11:34:11 -0400 |
commit | 4a534aedd1d1b4874363c1e4683a3c8547ece4bf (patch) | |
tree | 5d64ecbf80a570c8638272de206a2a1d626dbc9f /jstests/date1.js | |
parent | 3cb12e98e7814b93b2c859522956c69dbfb0ff5d (diff) | |
download | mongo-4a534aedd1d1b4874363c1e4683a3c8547ece4bf.tar.gz |
fix dates in spider monkey SERVER-83
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") + |