aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-07-05 16:39:55 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-07-05 16:39:55 +0000
commit2ff21e8cad9590990c20e1113c91eb537b67a8d0 (patch)
tree3961d8920c3c549275b77d6b649485fc222010a1 /searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
parent247e26fde868c484df5e5523c834bee4d34f1fbe (diff)
- Enable use of optimized DirectWeightedAttribute for all integer attributes.
- Remove some asserts that does not provide any added value.
Diffstat (limited to 'searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp')
-rw-r--r--searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
index 56fe791021e..98e70fd6c1f 100644
--- a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
+++ b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
@@ -81,6 +81,7 @@ struct StringFixture {
};
TEST("require that appropriate attributes support the document weight attribute interface") {
+ EXPECT_TRUE(make_attribute(BasicType::INT32, CollectionType::WSET, true)->asDocumentWeightAttribute() != nullptr);
EXPECT_TRUE(make_attribute(BasicType::INT64, CollectionType::WSET, true)->asDocumentWeightAttribute() != nullptr);
EXPECT_TRUE(make_attribute(BasicType::STRING, CollectionType::WSET, true)->asDocumentWeightAttribute() != nullptr);
}
@@ -96,7 +97,7 @@ TEST("require that inappropriate attributes do not support the document weight a
EXPECT_TRUE(make_attribute(BasicType::STRING, CollectionType::WSET, false)->asDocumentWeightAttribute() == nullptr);
EXPECT_TRUE(make_attribute(BasicType::STRING, CollectionType::SINGLE, true)->asDocumentWeightAttribute() == nullptr);
EXPECT_TRUE(make_attribute(BasicType::STRING, CollectionType::ARRAY, true)->asDocumentWeightAttribute() == nullptr);
- EXPECT_TRUE(make_attribute(BasicType::INT32, CollectionType::WSET, true)->asDocumentWeightAttribute() == nullptr);
+ EXPECT_TRUE(make_attribute(BasicType::FLOAT, CollectionType::WSET, true)->asDocumentWeightAttribute() == nullptr);
EXPECT_TRUE(make_attribute(BasicType::DOUBLE, CollectionType::WSET, true)->asDocumentWeightAttribute() == nullptr);
}