Add pointer against NULL comparison macros - #87
Conversation
|
Jenkins: ok to test |
| { "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.
Should "NULL" be printed when the pointer is 0?
There was a problem hiding this comment.
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.
|
|
||
| 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.
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.
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.