Skip to content

Commit

Permalink
Added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixtysixter committed Nov 17, 2024
1 parent be31743 commit b58dd89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions silkworm/db/kv/api/endpoint/paginated_sequence_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ TEST_CASE_METHOD(PaginatedSequenceTest, "set_intersection", "[db][kv][api][pagin
TEST_CASE_METHOD(PaginatedSequenceTest, "set_union", "[db][kv][api][paginated_sequence]") {
const Fixtures<std::pair<PageUint64List, PageUint64List>, std::vector<uint64_t>> fixtures{
{{/*v1=*/{}, /*v2=*/{}}, /*v1_or_v2=*/{}}, // both empty => empty
{{/*v1=*/{}, /*v2=*/{{1}}}, /*v1_or_v2=*/{1}}, // one empty => other
{{/*v1=*/{{1}}, /*v2=*/{}}, /*v1_or_v2=*/{1}}, // one empty => other
{{/*v1=*/{{1, 2, 3}, {4, 5, 6}, {7, 8}}, /*v2=*/{}}, /*v1_or_v2=*/{1, 2, 3, 4, 5, 6, 7, 8}}, // one empty => other
{{/*v1=*/{{1, 3, 5}}, /*v2=*/{{2, 4, 6}}}, /*v1_or_v2=*/{1, 2, 3, 4, 5, 6}},
{{/*v1=*/{{1, 3, 5, 7}}, /*v2=*/{{1, 4, 6, 7}}}, /*v1_or_v2=*/{1, 3, 4, 5, 6, 7}},
{{/*v1=*/{{1, 2, 3, 4}}, /*v2=*/{{1, 2, 3, 5}}}, /*v1_or_v2=*/{1, 2, 3, 4, 5}},
{{/*v1=*/{{1, 2, 3}, {4, 5, 6}, {7, 8}}, /*v2=*/{{10, 11, 12}, {13}}}, /*v1_or_v2=*/{1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13}},
{{/*v1=*/{{1, 2, 3}, {4, 5, 6}, {7, 8}}, /*v2=*/{{7, 8, 9}, {10, 11, 12}, {13}}}, /*v1_or_v2=*/{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}},
{{/*v1=*/{{1, 2, 3}, {4, 5, 6}, {7, 8}}, /*v2=*/{{1, 2, 3}, {4, 5, 6}, {7, 8}}}, /*v1_and_v2=*/{1, 2, 3, 4, 5, 6, 7, 8}},
Expand Down

0 comments on commit b58dd89

Please sign in to comment.