Skip to content

Add asserts for C tests #109

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
Jan 9, 2024
Merged

Conversation

DamianDuy
Copy link

This PR adds asserts for C tests (using the implementation from pmemstream: https://github.com/pmem/pmemstream/blob/master/tests/common/unittest.h) and uses them in a c test for disjoint pool.

@DamianDuy DamianDuy requested a review from a team as a code owner January 8, 2024 12:07
#include <umf/base.h>
#include <umf/memory_pool.h>
#include <umf/memory_provider_ops.h>

#ifdef __cplusplus
#include <stdexcept>
static inline void UT_FATAL(const char *format, ...) {
Copy link
Member

Choose a reason for hiding this comment

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

You can just use the C-version of the UT_FATAL (the one under #else) since this is only expected to be used by C code anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

@DamianDuy You are adding asserts for C tests, so you should add only the C version of UT_FATAL, not C++

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@bratpiorka bratpiorka merged commit 55b9e0f into oneapi-src:main Jan 9, 2024
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.

4 participants