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

Add ck_assert_pstr_* macros with ability to compare undefined (NULL) strings #80

Merged
merged 3 commits into from
Dec 13, 2016

Conversation

9fcc
Copy link
Contributor

@9fcc 9fcc commented Dec 10, 2016

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.

@brarcher
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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() */
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@brarcher brarcher merged commit bc935ce into libcheck:master Dec 13, 2016
@brarcher
Copy link
Contributor

Thanks for the contribution!

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