summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_algo_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_algo_test.cpp')
-rw-r--r--src/mongo/db/matcher/expression_algo_test.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mongo/db/matcher/expression_algo_test.cpp b/src/mongo/db/matcher/expression_algo_test.cpp
index 946120d353d..73d3a5b8b88 100644
--- a/src/mongo/db/matcher/expression_algo_test.cpp
+++ b/src/mongo/db/matcher/expression_algo_test.cpp
@@ -132,20 +132,18 @@ TEST(ExpressionAlgoIsSubsetOf, Compare_NaN) {
ASSERT_FALSE(expression::isSubsetOf(nan.get(), in.get()));
ASSERT_FALSE(expression::isSubsetOf(in.get(), nan.get()));
- if (Decimal128::enabled) {
- ParsedMatchExpression decNan("{x : NumberDecimal(\"NaN\") }");
- ASSERT_TRUE(expression::isSubsetOf(decNan.get(), decNan.get()));
- ASSERT_TRUE(expression::isSubsetOf(nan.get(), decNan.get()));
- ASSERT_TRUE(expression::isSubsetOf(decNan.get(), nan.get()));
- ASSERT_FALSE(expression::isSubsetOf(decNan.get(), lt.get()));
- ASSERT_FALSE(expression::isSubsetOf(lt.get(), decNan.get()));
- ASSERT_FALSE(expression::isSubsetOf(decNan.get(), lte.get()));
- ASSERT_FALSE(expression::isSubsetOf(lte.get(), decNan.get()));
- ASSERT_FALSE(expression::isSubsetOf(decNan.get(), gte.get()));
- ASSERT_FALSE(expression::isSubsetOf(gte.get(), decNan.get()));
- ASSERT_FALSE(expression::isSubsetOf(decNan.get(), gt.get()));
- ASSERT_FALSE(expression::isSubsetOf(gt.get(), decNan.get()));
- }
+ ParsedMatchExpression decNan("{x : NumberDecimal(\"NaN\") }");
+ ASSERT_TRUE(expression::isSubsetOf(decNan.get(), decNan.get()));
+ ASSERT_TRUE(expression::isSubsetOf(nan.get(), decNan.get()));
+ ASSERT_TRUE(expression::isSubsetOf(decNan.get(), nan.get()));
+ ASSERT_FALSE(expression::isSubsetOf(decNan.get(), lt.get()));
+ ASSERT_FALSE(expression::isSubsetOf(lt.get(), decNan.get()));
+ ASSERT_FALSE(expression::isSubsetOf(decNan.get(), lte.get()));
+ ASSERT_FALSE(expression::isSubsetOf(lte.get(), decNan.get()));
+ ASSERT_FALSE(expression::isSubsetOf(decNan.get(), gte.get()));
+ ASSERT_FALSE(expression::isSubsetOf(gte.get(), decNan.get()));
+ ASSERT_FALSE(expression::isSubsetOf(decNan.get(), gt.get()));
+ ASSERT_FALSE(expression::isSubsetOf(gt.get(), decNan.get()));
}
TEST(ExpressionAlgoIsSubsetOf, Compare_EQ) {