0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix index test

This commit is contained in:
Eliot Horowitz 2011-03-02 11:28:15 -05:00
parent a674f44fdd
commit 8a8ede6c71

View File

@ -34,13 +34,12 @@ var ok = true;
function check() { function check() {
assert(t.validate().valid); assert(t.validate().valid);
var c = t.find({ k: /a/ }).count(); var c = t.find({ k: /^a/ }).count();
print("keycount:" + c); print("keycount:" + c);
if (expect) { if (expect) {
print("count of keys doesn't match expected count of : " + expect); assert.eq( expect , c , "count of keys doesn't match expected count of" )
ok = false;
} }
else { else {
expect = c; expect = c;
@ -73,4 +72,4 @@ for (var pass = 1; pass <= 2; pass++) {
dir = -1; dir = -1;
} }
assert(ok); assert(ok,"not ok");