summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_serialization_test.cpp
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2017-06-27 15:03:43 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2017-06-27 15:03:43 -0400
commitbeaeaa196e8b1d3e36dfccd55cfded8ddf95a205 (patch)
treecd96ebd38a956f8817c57e752c27969b8a3e54a5 /src/mongo/db/matcher/expression_serialization_test.cpp
parent1871da3e8a38e7ac384c7bc0280017852f53d487 (diff)
downloadmongo-beaeaa196e8b1d3e36dfccd55cfded8ddf95a205.tar.gz
Revert "SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions"
This reverts commit a92eb118cc8500a9c4286e8ef28cb26ea3f4e238.
Diffstat (limited to 'src/mongo/db/matcher/expression_serialization_test.cpp')
-rw-r--r--src/mongo/db/matcher/expression_serialization_test.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/mongo/db/matcher/expression_serialization_test.cpp b/src/mongo/db/matcher/expression_serialization_test.cpp
index b05cbe71bfc..13a2aaa172d 100644
--- a/src/mongo/db/matcher/expression_serialization_test.cpp
+++ b/src/mongo/db/matcher/expression_serialization_test.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/json.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/matcher/expression_parser.h"
-#include "mongo/db/matcher/extensions_callback_disallow_extensions.h"
#include "mongo/db/matcher/extensions_callback_noop.h"
#include "mongo/db/matcher/matcher.h"
#include "mongo/unittest/unittest.h"
@@ -990,27 +989,5 @@ TEST(SerializeBasic, ExpressionTextWithDefaultLanguageSerializesCorrectly) {
ASSERT_BSONOBJ_EQ(*reserialized.getQuery(), serialize(reserialized.getMatchExpression()));
}
-TEST(SerializeInternalSchema, ExpressionInternalSchemaMinItemsSerializesCorrectly) {
- const CollatorInterface* collator = nullptr;
- Matcher original(fromjson("{x: {$_internalSchemaMinItems: 1}}"),
- ExtensionsCallbackDisallowExtensions(),
- collator);
- Matcher reserialized(
- serialize(original.getMatchExpression()), ExtensionsCallbackDisallowExtensions(), collator);
- ASSERT_BSONOBJ_EQ(*reserialized.getQuery(), fromjson("{x: {$_internalSchemaMinItems: 1}}"));
- ASSERT_BSONOBJ_EQ(*reserialized.getQuery(), serialize(reserialized.getMatchExpression()));
-}
-
-TEST(SerializeInternalSchema, ExpressionInternalSchemaMaxItemsSerializesCorrectly) {
- const CollatorInterface* collator = nullptr;
- Matcher original(fromjson("{x: {$_internalSchemaMaxItems: 1}}"),
- ExtensionsCallbackDisallowExtensions(),
- collator);
- Matcher reserialized(
- serialize(original.getMatchExpression()), ExtensionsCallbackDisallowExtensions(), collator);
- ASSERT_BSONOBJ_EQ(*reserialized.getQuery(), fromjson("{x: {$_internalSchemaMaxItems: 1}}"));
- ASSERT_BSONOBJ_EQ(*reserialized.getQuery(), serialize(reserialized.getMatchExpression()));
-}
-
} // namespace
} // namespace mongo