Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid use of CUDF_EXPECTS in libcudf unit tests outside of helper functions with return values #13812

Merged

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Aug 2, 2023

Description

CUDF_EXPECTS should be used to report internal errors in libcudf. Google test framework has macros that should be used to report failures. The ASSERT_ macros replace CUDF_EXPECTS as they exit the current function (not by throwing as CUDF_EXPECTS, but the effect is very similar).

This PR replaces the erroneous use of CUDF_EXPECTS with ASSERT_XYZ macros in unit tests.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vuule vuule self-assigned this Aug 2, 2023
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Aug 2, 2023
@vuule vuule added tests Unit testing for project non-breaking Non-breaking change improvement Improvement / enhancement to an existing function code quality and removed improvement Improvement / enhancement to an existing function code quality labels Aug 2, 2023
cpp/tests/transform/row_bit_count_test.cu Outdated Show resolved Hide resolved
cpp/tests/transform/row_bit_count_test.cu Outdated Show resolved Hide resolved
@vuule vuule marked this pull request as ready for review August 3, 2023 21:19
@vuule vuule requested a review from a team as a code owner August 3, 2023 21:19
@vuule
Copy link
Contributor Author

vuule commented Aug 4, 2023

/merge

@rapids-bot rapids-bot bot merged commit d8bf9d2 into rapidsai:branch-23.10 Aug 4, 2023
@vuule vuule deleted the impr-test-assert-not-cudf_expects branch August 4, 2023 16:54
@vuule vuule restored the impr-test-assert-not-cudf_expects branch August 10, 2023 03:13
@vuule vuule deleted the impr-test-assert-not-cudf_expects branch August 10, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change tests Unit testing for project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants