summaryrefslogtreecommitdiff
path: root/jstests/date1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-06-01 11:34:11 -0400
committerEliot Horowitz <eliot@10gen.com>2009-06-01 11:34:11 -0400
commit4a534aedd1d1b4874363c1e4683a3c8547ece4bf (patch)
tree5d64ecbf80a570c8638272de206a2a1d626dbc9f /jstests/date1.js
parent3cb12e98e7814b93b2c859522956c69dbfb0ff5d (diff)
downloadmongo-4a534aedd1d1b4874363c1e4683a3c8547ece4bf.tar.gz
fix dates in spider monkey SERVER-83
Diffstat (limited to 'jstests/date1.js')
-rw-r--r--jstests/date1.js14
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")
+