summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-06-30 17:30:41 -0400
committerDavid Storch <david.storch@10gen.com>2016-08-19 09:27:56 -0400
commit9aef6602683af7842e04c025c47d652b3897c541 (patch)
treee5c4e70714c4a4e38fc450cdd65628ad58b70107 /src/mongo/scripting
parente404756a317fbd531306805cf77e723b9c3fc218 (diff)
downloadmongo-9aef6602683af7842e04c025c47d652b3897c541.tar.gz
SERVER-24508 delete BSONObj::equal()
Instead, use comparator.evaluate(obj1 == obj2), where comparator is of type BSONObj::ComparatorInterface.
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/bson_template_evaluator_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/scripting/bson_template_evaluator_test.cpp b/src/mongo/scripting/bson_template_evaluator_test.cpp
index 51e573fc7e0..3ae6cca9797 100644
--- a/src/mongo/scripting/bson_template_evaluator_test.cpp
+++ b/src/mongo/scripting/bson_template_evaluator_test.cpp
@@ -532,7 +532,7 @@ TEST(BSONTemplateEvaluatorTest, CONCAT) {
ASSERT_EQUALS(obj2.nFields(), 1);
BSONObj expectedObj = BSON("concatField"
<< "hello world");
- ASSERT_EQUALS(obj2.equal(expectedObj), true);
+ ASSERT_BSONOBJ_EQ(obj2, expectedObj);
// Test success when some arguments to #CONCAT are integers
BSONObjBuilder builder3;
@@ -543,7 +543,7 @@ TEST(BSONTemplateEvaluatorTest, CONCAT) {
ASSERT_EQUALS(obj3.nFields(), 1);
expectedObj = BSON("concatField"
<< "F1racing");
- ASSERT_EQUALS(obj3.equal(expectedObj), true);
+ ASSERT_BSONOBJ_EQ(obj3, expectedObj);
// Test success with #CONCAT as first element and last element
BSONObjBuilder builder4;
@@ -562,7 +562,7 @@ TEST(BSONTemplateEvaluatorTest, CONCAT) {
<< 1
<< "concatField2"
<< "hello world");
- ASSERT_EQUALS(obj4.equal(expectedObj), true);
+ ASSERT_BSONOBJ_EQ(obj4, expectedObj);
// Test success when one of the arguments to #CONCAT is an array
BSONObjBuilder builder5;
@@ -573,7 +573,7 @@ TEST(BSONTemplateEvaluatorTest, CONCAT) {
ASSERT_EQUALS(obj5.nFields(), 1);
expectedObj = BSON("concatField"
<< "hello[ 1, 10 ]world");
- ASSERT_EQUALS(obj5.equal(expectedObj), true);
+ ASSERT_BSONOBJ_EQ(obj5, expectedObj);
}
TEST(BSONTemplateEvaluatorTest, OID) {