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

Testing #26

Merged
merged 7 commits into from
Jun 22, 2024
Merged

Testing #26

merged 7 commits into from
Jun 22, 2024

Conversation

JakeRoggenbuck
Copy link
Member

fixes #25

Copy link
Contributor

@adamhutchings adamhutchings left a comment

Choose a reason for hiding this comment

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

Good as long as the question I have is answered

@@ -0,0 +1,5 @@
#include <assert.h>

#define tassert(e) ((void)((e) ? 0 : __assert(#e, __FILE__, __LINE__)))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm actually not familiar with how this would work -- does this expand out to always be src/testing/tassert.h, line 3 or does it work as expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, it totally works. I just used the definition of assert from assert.h (shared on stackoverflow) and removed the abort().

Here is where I got the idea to use assert redefinition and where I got the definition
https://stackoverflow.com/a/270797/10621852

@JakeRoggenbuck JakeRoggenbuck merged commit 10b816a into jabacat:main Jun 22, 2024
1 check 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.

Testing
2 participants