Skip to content

fix: substitute UT_ASSERTs with asserts from GTEST part last #813

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

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

EuphoricThinking
Copy link
Contributor

Amen.

ref. #569

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used

@EuphoricThinking EuphoricThinking requested a review from a team as a code owner October 21, 2024 10:15
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and let's never speak of this again.

Might be useful to remove all these asserts entirely.

@EuphoricThinking
Copy link
Contributor Author

EuphoricThinking commented Oct 21, 2024

Might be useful to remove all these asserts entirely.

These asserts are used in .c files in test/c_api, since GTEST is C++ framework. Do you mean replacing using another framework?

@pbalcer
Copy link
Contributor

pbalcer commented Oct 21, 2024

Might be useful to remove all these asserts entirely.

These asserts are used in .c files in test/c_api, since GTEST is C++ framework. Do you mean replacing using another framework?

I'm a bit worried that this same issue will creep up again. No, using another framework just for the C api isn't worth it.

One option would be to rewrite those tests to use gtest. At first I thought this was done without gtest so that it's possible to compile and test this with a C compiler. But, looking at CMake's, it looks as if all the tests are compiled the same way.

Alternatively, we could move those test_helpers into the c_api directory to make sure it's not possible to use those C-like asserts in the C++ part of the codebase.

@lplewa lplewa merged commit 9e70ea0 into oneapi-src:main Oct 23, 2024
70 of 74 checks passed
@EuphoricThinking EuphoricThinking deleted the assertspr11 branch January 3, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants