Skip to content

Commit

Permalink
Modify test
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
  • Loading branch information
ttnghia committed May 30, 2022
1 parent 847311b commit 1e7b843
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions cpp/tests/lists/drop_list_duplicates_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,8 @@ TEST_F(DropListDuplicatesTest, StringTestsNonNull)
{
// Trivial cases - empty input.
{
auto const lists = StrListsCol{};
auto const expected = StrListsCol{};
auto const results = cudf::lists::drop_list_duplicates(cudf::lists_column_view{lists});
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results->view(), expected, verbosity);
}

// Empty input lists.
{
auto const lists = StrListsCol{{}, {}, {}};
auto const expected = StrListsCol{{}, {}, {}};
auto const lists = StrListsCol{{}};
auto const expected = StrListsCol{{}};
auto const results = cudf::lists::drop_list_duplicates(cudf::lists_column_view{lists});
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results->view(), expected, verbosity);
}
Expand Down Expand Up @@ -327,6 +319,19 @@ TYPED_TEST(DropListDuplicatesTypedTest, TrivialInputTests)
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results_vals->view(), expected, verbosity);
}

// All input lists are empty.
{
auto const lists = ListsCol{ListsCol{}, ListsCol{}, ListsCol{}};
auto const expected = ListsCol{ListsCol{}, ListsCol{}, ListsCol{}};
auto const results = cudf::lists::drop_list_duplicates(cudf::lists_column_view{lists});
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results->view(), expected, verbosity);

auto const [results_keys, results_vals] = cudf::lists::drop_list_duplicates(
cudf::lists_column_view{lists}, cudf::lists_column_view{lists});
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results_keys->view(), expected, verbosity);
CUDF_TEST_EXPECT_COLUMNS_EQUAL(results_vals->view(), expected, verbosity);
}

// Trivial cases.
{
auto const lists = ListsCol{0, 1, 2, 3, 4, 5};
Expand Down

0 comments on commit 1e7b843

Please sign in to comment.