Skip to content

Commit

Permalink
Update unit tests to exercise null elements in list keys
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed May 24, 2022
1 parent 6f170d8 commit c8b1aab
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cpp/tests/groupby/lists_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,16 @@ TYPED_TEST(groupby_lists_test, lists_with_nulls)

TYPED_TEST(groupby_lists_test, lists_with_null_elements)
{
auto keys = lcw<TypeParam>{{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}},
{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}},
{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}},
{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}},
nulls_at({2, 3})};
auto keys =
lcw<TypeParam>{{lcw<TypeParam>{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, nulls_at({1, 3})},
lcw<TypeParam>{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, nulls_at({1, 3})},
lcw<TypeParam>{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, nulls_at({1, 3})},
lcw<TypeParam>{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, nulls_at({1, 3})}},
nulls_at({2, 3})};
auto values = fwcw<int32_t>{1, 2, 4, 5};

auto expected_keys = lcw<TypeParam>{{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, {}}, null_at(1)};
auto expected_keys = lcw<TypeParam>{
{lcw<TypeParam>{{{1, 2, 3}, {}, {4, 5}, {}, {6, 0}}, nulls_at({1, 3})}, {}}, null_at(1)};
auto expected_values = fwcw<R>{3, 9};

test_sum_agg(keys, values, expected_keys, expected_values);
Expand Down

0 comments on commit c8b1aab

Please sign in to comment.