-
Notifications
You must be signed in to change notification settings - Fork 4
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
Testing #26
Conversation
Both work but let's keep it consistent.
tassert is (test assert)
There was a problem hiding this 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__))) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
fixes #25