diff options
Diffstat (limited to 'src/mongo/db/matcher')
-rw-r--r-- | src/mongo/db/matcher/expression_type_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression_type_test.cpp b/src/mongo/db/matcher/expression_type_test.cpp index 70f924cdf5f..13ef52affe4 100644 --- a/src/mongo/db/matcher/expression_type_test.cpp +++ b/src/mongo/db/matcher/expression_type_test.cpp @@ -257,6 +257,14 @@ TEST(ExpressionBinDataSubTypeTest, MatchesBinDataEncryptType) { ASSERT_FALSE(type.matchesSingleElement(notMatch["a"])); } +TEST(ExpressionBinDataSubTypeTest, MatchesBinDataColumnType) { + BSONObj match = BSON("a" << BSONBinData(nullptr, 0, BinDataType::Column)); + BSONObj notMatch = BSON("a" << BSONBinData(nullptr, 0, BinDataType::newUUID)); + InternalSchemaBinDataSubTypeExpression type("", BinDataType::Column); + ASSERT_TRUE(type.matchesSingleElement(match["a"])); + ASSERT_FALSE(type.matchesSingleElement(notMatch["a"])); +} + TEST(ExpressionBinDataSubTypeTest, MatchesBinDataBdtCustom) { BSONObj match = BSON("a" << BSONBinData(nullptr, 0, BinDataType::bdtCustom)); BSONObj notMatch = BSON("a" << BSONBinData(nullptr, 0, BinDataType::Function)); |