diff options
author | David Storch <david.storch@10gen.com> | 2016-08-22 16:41:50 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-08-23 17:42:08 -0400 |
commit | f3be5348457ff71185ca9fa137ab7c1a8e4761df (patch) | |
tree | e2bdc25fab6568d577cb14f9905d593c07ee86e4 /src/mongo/db/query/query_settings_test.cpp | |
parent | 6b5fd115d38582d8b349a5aad2c29867e69dc758 (diff) | |
download | mongo-f3be5348457ff71185ca9fa137ab7c1a8e4761df.tar.gz |
SERVER-24508 delete BSONObjCmp
Instead, use BSONObj::ComparatorInterface.
Diffstat (limited to 'src/mongo/db/query/query_settings_test.cpp')
-rw-r--r-- | src/mongo/db/query/query_settings_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/query/query_settings_test.cpp b/src/mongo/db/query/query_settings_test.cpp index cd61ec241b1..ba54a60c998 100644 --- a/src/mongo/db/query/query_settings_test.cpp +++ b/src/mongo/db/query/query_settings_test.cpp @@ -34,17 +34,20 @@ #include "mongo/bson/bsonobj.h" #include "mongo/bson/json.h" +#include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/query/index_entry.h" #include "mongo/unittest/unittest.h" using mongo::AllowedIndicesFilter; using mongo::BSONObj; using mongo::IndexEntry; +using mongo::SimpleBSONObjComparator; using mongo::fromjson; namespace { TEST(QuerySettingsTest, AllowedIndicesFilterAllowsIndexesByName) { - AllowedIndicesFilter filter({fromjson("{a:1}")}, {"a_1"}); + SimpleBSONObjComparator bsonCmp; + AllowedIndicesFilter filter(bsonCmp.makeBSONObjSet({fromjson("{a:1}")}), {"a_1"}); IndexEntry a_idx(fromjson("{a:1, b:1}"), false, false, false, "a_1", nullptr, BSONObj()); IndexEntry ab_idx(fromjson("{a:1, b:1}"), false, false, false, "a_1:2", nullptr, BSONObj()); @@ -53,7 +56,8 @@ TEST(QuerySettingsTest, AllowedIndicesFilterAllowsIndexesByName) { } TEST(QuerySettingsTest, AllowedIndicesFilterAllowsIndexesByKeyPattern) { - AllowedIndicesFilter filter({fromjson("{a:1}")}, {"a"}); + SimpleBSONObjComparator bsonCmp; + AllowedIndicesFilter filter(bsonCmp.makeBSONObjSet({fromjson("{a:1}")}), {"a"}); IndexEntry a_idx(fromjson("{a:1}"), false, false, false, "foo", nullptr, BSONObj()); IndexEntry ab_idx(fromjson("{a:1, b:1}"), false, false, false, "bar", nullptr, BSONObj()); |