diff options
Diffstat (limited to 'jstests/core/in7.js')
-rw-r--r-- | jstests/core/in7.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/jstests/core/in7.js b/jstests/core/in7.js index cf614ab994d..2f6c9e3ff1a 100644 --- a/jstests/core/in7.js +++ b/jstests/core/in7.js @@ -2,13 +2,21 @@ t = db.jstests_ina; t.drop(); -t.save( {} ); +t.save({}); -assert.throws( function() { t.find( {a:{$in:[{$elemMatch:{b:1}}]}} ).itcount(); } ); -assert.throws( function() { t.find( {a:{$not:{$in:[{$elemMatch:{b:1}}]}}} ).itcount(); } ); +assert.throws(function() { + t.find({a: {$in: [{$elemMatch: {b: 1}}]}}).itcount(); +}); +assert.throws(function() { + t.find({a: {$not: {$in: [{$elemMatch: {b: 1}}]}}}).itcount(); +}); -assert.throws( function() { t.find( {a:{$nin:[{$elemMatch:{b:1}}]}} ).itcount(); } ); -assert.throws( function() { t.find( {a:{$not:{$nin:[{$elemMatch:{b:1}}]}}} ).itcount(); } ); +assert.throws(function() { + t.find({a: {$nin: [{$elemMatch: {b: 1}}]}}).itcount(); +}); +assert.throws(function() { + t.find({a: {$not: {$nin: [{$elemMatch: {b: 1}}]}}}).itcount(); +}); // NOTE Above we don't check cases like {b:2,$elemMatch:{b:3,4}} - generally // we assume that the first key is $elemMatch if any key is, and validating |