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

Assert always #43

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Assert always #43

merged 4 commits into from
Nov 8, 2024

Conversation

bonachea
Copy link
Member

@bonachea bonachea commented Oct 4, 2024

This PR ensures that #define ASSERTIONS 1 in source code is honored by the call_assert macros, regardless of the ASSERTIONS setting used to build assert_m

Fix copy-pasta in one sub-test so it tests what it claims.

Add a test that call_assert macros can be invoked from a pure function
This procedure is similar to assert, but enforcement is unconditionally enabled
(ignores the `ASSERTIONS` define).

Potentially useful in callers where performance is not a concern but
correctness checking is critical.

Currently undocumented.
This ensures that call_assert() macro invocations always respect the
*current* (possibly locally defined) value of ASSERTIONS, regardless
of ASSERTIONS setting used to build the assert_m module.
Copy link
Contributor

@rouson rouson left a comment

Choose a reason for hiding this comment

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

LGTM

@rouson rouson merged commit 8e33ee8 into BerkeleyLab:main Nov 8, 2024
2 checks passed
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