summaryrefslogtreecommitdiff
path: root/jstests/core/not2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/not2.js')
-rw-r--r--jstests/core/not2.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/jstests/core/not2.js b/jstests/core/not2.js
index 8f0f91da1d5..0692c297762 100644
--- a/jstests/core/not2.js
+++ b/jstests/core/not2.js
@@ -20,10 +20,10 @@ function fail(query) {
}
function doTest() {
- assert.writeOK(coll.remove({}));
+ assert.commandWorked(coll.remove({}));
- assert.writeOK(coll.insert({i: "a"}));
- assert.writeOK(coll.insert({i: "b"}));
+ assert.commandWorked(coll.insert({i: "a"}));
+ assert.commandWorked(coll.insert({i: "b"}));
// TODO SERVER-12735: We currently do not handle double negatives during query
// canonicalization.
@@ -58,14 +58,14 @@ function doTest() {
check({i: {$not: {$type: 1}}}, ["a", "b"]);
check({i: {$not: {$type: 2}}}, []);
- assert.writeOK(coll.remove({}));
- assert.writeOK(coll.insert({i: 1}));
+ assert.commandWorked(coll.remove({}));
+ assert.commandWorked(coll.insert({i: 1}));
check({i: {$not: {$mod: [5, 1]}}}, []);
check({i: {$mod: [5, 2]}}, []);
check({i: {$not: {$mod: [5, 2]}}}, [1]);
- assert.writeOK(coll.remove({}));
- assert.writeOK(coll.insert({i: ["a", "b"]}));
+ assert.commandWorked(coll.remove({}));
+ assert.commandWorked(coll.insert({i: ["a", "b"]}));
check({i: {$not: {$size: 2}}}, []);
check({i: {$not: {$size: 3}}}, [["a", "b"]]);
check({i: {$not: {$gt: "a"}}}, []);
@@ -73,9 +73,9 @@ function doTest() {
check({i: {$not: {$all: ["a", "b"]}}}, []);
check({i: {$not: {$all: ["c"]}}}, [["a", "b"]]);
- assert.writeOK(coll.remove({}));
- assert.writeOK(coll.insert({i: [{j: "a"}]}));
- assert.writeOK(coll.insert({i: [{j: "b"}]}));
+ assert.commandWorked(coll.remove({}));
+ assert.commandWorked(coll.insert({i: [{j: "a"}]}));
+ assert.commandWorked(coll.insert({i: [{j: "b"}]}));
check({i: {$not: {$elemMatch: {j: "a"}}}}, [[{j: "b"}]]);
check({i: {$not: {$elemMatch: {j: "f"}}}}, [[{j: "a"}], [{j: "b"}]]);
}