summaryrefslogtreecommitdiff
path: root/src/mongo/db/bson
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-09-02 17:40:42 -0400
committerDavid Storch <david.storch@10gen.com>2016-09-06 14:11:04 -0400
commitc55868b9eae498051640c92c5aa91d155d04343a (patch)
treea8c8f49f23ef987df0f405e21549497d5f8db73b /src/mongo/db/bson
parent0c8d2ee3bab74599c80264a08afca2aae42ce27b (diff)
downloadmongo-c55868b9eae498051640c92c5aa91d155d04343a.tar.gz
SERVER-24508 delete BSONElement::valuesEqual() in favor of BSONElementComparator
Diffstat (limited to 'src/mongo/db/bson')
-rw-r--r--src/mongo/db/bson/dotted_path_support_test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/bson/dotted_path_support_test.cpp b/src/mongo/db/bson/dotted_path_support_test.cpp
index 4473721c3d6..b18e949290f 100644
--- a/src/mongo/db/bson/dotted_path_support_test.cpp
+++ b/src/mongo/db/bson/dotted_path_support_test.cpp
@@ -31,7 +31,9 @@
#include <set>
#include <vector>
+#include "mongo/base/simple_string_data_comparator.h"
#include "mongo/bson/bsonelement.h"
+#include "mongo/bson/bsonelement_comparator.h"
#include "mongo/bson/bsonmisc.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -124,8 +126,11 @@ void assertBSONElementSetsAreEqual(const std::vector<BSONObj>& expectedObjs,
auto expectedIt = expectedElements.begin();
auto actualIt = actualElements.begin();
+
+ BSONElementComparator eltCmp(BSONElementComparator::FieldNamesMode::kIgnore,
+ &SimpleStringDataComparator::kInstance);
for (size_t i = 0; i < expectedElements.size(); ++i) {
- if (!expectedIt->valuesEqual(*actualIt)) {
+ if (eltCmp.evaluate(*expectedIt != *actualIt)) {
StringBuilder sb;
sb << "Element '" << *expectedIt << "' doesn't have the same value as element '"
<< *actualIt << "'; Expected set: ";