Files
mongo/jstests/core/date1.js
Randolph Tan 5595b94560 SERVER-12127 migrate js tests to jscore suite when not related to writes
Moved test jstest/[a-i].js -> jstests/core/ and made changes to comply with write command api
2014-02-28 16:26:33 -05:00

18 lines
317 B
JavaScript

t = db.date1;
function go( d , msg ){
t.drop();
t.save({ a: 1, d: d });
// printjson(d);
// printjson(t.findOne().d);
assert.eq( d , t.findOne().d , msg )
}
go( new Date() , "A" )
go( new Date( 1 ) , "B")
go( new Date( 0 ) , "C (old spidermonkey lib fails this test)")
go(new Date(-10), "neg")