-
Notifications
You must be signed in to change notification settings - Fork 219
Add pointer against NULL comparison macros #87
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
Conversation
Jenkins: ok to test |
@@ -230,6 +230,8 @@ static master_test_t master_tests[] = { | |||
{ "Simple Tests", "test_ck_assert_pstr_ne_with_null", CK_FAILURE, "Assertion 't != s' failed: t == (null), s == (null)" }, | |||
{ "Simple Tests", "test_ck_assert_ptr_eq", CK_FAILURE, "Assertion 'x == y' failed: x == 0x1, y == 0x2" }, | |||
{ "Simple Tests", "test_ck_assert_ptr_ne", CK_FAILURE, "Assertion 'x != z' failed: x == 0x1, z == 0x1" }, | |||
{ "Simple Tests", "test_ck_assert_ptr_null", CK_FAILURE, "Assertion 'x == NULL' failed: x == 0x1" }, | |||
{ "Simple Tests", "test_ck_assert_ptr_nonnull", CK_FAILURE, "Assertion 'x != NULL' failed: x == 0" }, |
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.
Should "NULL" be printed when the pointer is 0?
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 thought about it. This assert belongs to prt_*
macros. And they just print pointer value. So I think printing NULL has no sense. Another way all ptr_*
macros could be changed to print NULL
instead of zero. Anyway, it could be a separate commit.
@@ -1217,6 +1217,17 @@ would pass. | |||
@item ck_assert_ptr_eq | |||
@itemx ck_assert_ptr_ne | |||
|
|||
Compares a pointers against null and displays predefined message with | |||
condition and value of the input parameter on failure. | |||
@code{@item ck_assert_ptr_null} checks that pointer is equal to NULL and |
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 do not think you need the @item
inside the @code{}
. This may be what the build is complaining about when checking the documentation.
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.
Sorry, I did it again. I would like to know how do I make such mistakes... Moreover, I've mixed up descriptions.
If checks in my commits fail, you can just wait until I fix everything. I make changes in a hurry, but I can fix them all only when I get home. So I see what's wrong but just can't send fixes.
Looks good. Thanks! |
To fulfil the API set, missing pointer macros.