diff options
Diffstat (limited to 'jstests/aggregation/bugs/server22580.js')
-rw-r--r-- | jstests/aggregation/bugs/server22580.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/aggregation/bugs/server22580.js b/jstests/aggregation/bugs/server22580.js index afbfdd00dcd..3a448173875 100644 --- a/jstests/aggregation/bugs/server22580.js +++ b/jstests/aggregation/bugs/server22580.js @@ -12,32 +12,32 @@ load("jstests/aggregation/extras/utils.js"); // For assertErrorCode. coll.insert({}); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", 0, "a"]}}}], + [{$project: {substr: {$substrCP: ["abc", 0, "a"]}}}], 34452, "$substrCP" + " does not accept non-numeric types as a length."); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", 0, NaN]}}}], + [{$project: {substr: {$substrCP: ["abc", 0, NaN]}}}], 34453, "$substrCP" + " does not accept non-integers as a length."); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", "abc", 3]}}}], + [{$project: {substr: {$substrCP: ["abc", "abc", 3]}}}], 34450, "$substrCP does not accept non-numeric types as a starting index."); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", 2.2, 3]}}}], + [{$project: {substr: {$substrCP: ["abc", 2.2, 3]}}}], 34451, "$substrCP" + " does not accept non-integers as a starting index."); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", -1, 3]}}}], + [{$project: {substr: {$substrCP: ["abc", -1, 3]}}}], 34455, "$substrCP " + "does not accept negative integers as inputs."); assertErrorCode(coll, - [{$project: {substr: {$substrCP: ["abc", 1, -3]}}}], + [{$project: {substr: {$substrCP: ["abc", 1, -3]}}}], 34454, "$substrCP " + "does not accept negative integers as inputs."); }()); |