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

fix: substitute UT_ASSERTs with asserts from GTEST part 4 #704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EuphoricThinking
Copy link
Contributor

@EuphoricThinking EuphoricThinking commented Sep 2, 2024

The PR is a part of a major fix, which will be provided in multiple files.

Ref. #569

Although canQuery*(...) use UT_ASSERTs only in their body and the returned value is interpreted as a reason to skip tests, not to fail, I assume that unsuccessful results from hwloc functions are fatal in order not to change canQuery*(...) return types. If this is not a plausible argument, I think of implementing an enum {SUCCESS, NOT_FATAL, FATAL} for deciding whether tests should fail or should be skipped.

The condition using ::memspaceGetTest::IsSkipped() in memspaceProviderTest is replaced due to its ineffectiveness: it has used the method from superclass for itself, before skipping any tests.

Introduced GTEST_OUT_* macros for logging error messages without interrupting the program execution and assessing the value of the given condition (maybe there could be something more elegant than a multi-functional macro). EXPECT_* and ADD_FAILURE() interefere with GTEST_SKIP() when used in a non-void helper function - tests are run in spite of labelling as ,,skipped" by the fixture.

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

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.

2 participants