Files
mongo/jstests/core/indexg.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

13 lines
297 B
JavaScript

f = db.jstests_indexg;
f.drop();
f.save( { list: [1, 2] } );
f.save( { list: [1, 3] } );
doit = function() {
assert.eq( 1, f.count( { list: { $in: [1], $ne: 3 } } ) );
assert.eq( 1, f.count( { list: { $in: [1], $not:{$in: [3] } } } ) );
}
doit();
f.ensureIndex( { list: 1 } );
doit();