-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add ck_assert_pstr_* macros with ability to compare undefined (NULL) strings #80
Conversation
Jenkins: ok to test |
@item ck_assert_ptr_eq | ||
@itemx ck_assert_ptr_ne | ||
|
||
Similar to @code{ck_assert_str_*} macros, but able to check undefined strings. |
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.
Did you intend this section to be before the ck_assert_ptr_* macros?
@@ -1204,9 +1204,21 @@ operator is again indicated by last two letters of the function name. | |||
of the character string @code{a} is less than that of @code{b}. | |||
If a NULL pointer would be passed to any comparison macro than check would fail. | |||
|
|||
@item ck_assert_str_eq |
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.
Did you mean ck_asserts_pstr_eq
*/ | ||
#define ck_assert_pstr_ne(X, Y) _ck_assert_str(X, !=, Y, 0, 1) | ||
|
||
/* Memory location comparison macros with improved output compared to ck_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.
This looks like a duplicate of what comes after it. Did you mean to include it?
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.
Do you mean that ck_assert_pstr_ne
does the same as ck_assert_str_ne
does? If so, no, ck_assert_str_ne
always fails if NULL
passed.
64969bc
to
7bfaba6
Compare
7bfaba6
to
e678590
Compare
Thanks for the contribution! |
I decided to open another merge request for this feature to simplify code review. So fist ck_assert_str_* fixes could be merged and then these.