summaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-02-20 16:22:21 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-02-20 16:22:21 +0100
commitc7399e7b2ae5161a0b8aac6a8212a45cd9816f4a (patch)
treee007eddfb2376b5444363266b6532f1f51d4c6b9 /searchsummary
parent347a07fea2030319051ad78bd1c87390d9c2a50f (diff)
Extend unit test to use out of bounds matching element id.
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp
index 9019a212f3f..dff3acc5b89 100644
--- a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp
+++ b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp
@@ -246,6 +246,7 @@ TEST_F(MatchedElementsFilterTest, filters_elements_in_array_field_value_when_inp
expect_filtered("array_in_doc", {0, 1, 2}, "[{'name':'a','weight':3},"
"{'name':'b','weight':5},"
"{'name':'c','weight':7}]");
+ expect_filtered("array_in_doc", {0, 1, 100}, "[]");
}
TEST_F(MatchedElementsFilterTest, struct_field_mapper_is_setup_for_array_field_value)
@@ -276,6 +277,7 @@ TEST_F(MatchedElementsFilterTest, filters_elements_in_map_field_value_when_input
expect_filtered("map_in_doc", {0, 1, 2}, "[{'key':'a','value':{'name':'a','weight':3}},"
"{'key':'b','value':{'name':'b','weight':5}},"
"{'key':'c','value':{'name':'c','weight':7}}]");
+ expect_filtered("map_in_doc", {0, 1, 100}, "[]");
}
TEST_F(MatchedElementsFilterTest, struct_field_mapper_is_setup_for_map_field_value)