1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Add assertion for checking empty null-terminated arrays. This is particularly useful for check c strings.

This commit is contained in:
mvandervoord
2020-03-16 15:04:40 -04:00
parent 5e9acef74f
commit bad429428d
4 changed files with 42 additions and 0 deletions

View File

@@ -236,6 +236,15 @@ conditional statements.
##### `TEST_ASSERT_NOT_NULL (pointer)`
Verify if a pointer is or is not NULL.
##### `TEST_ASSERT_EMPTY (pointer)`
##### `TEST_ASSERT_NOT_EMPTY (pointer)`
Verify if the first element dereferenced from a pointer is or is not zero. This
is particularly useful for checking for empty (or non-empty) null-terminated
C strings, but can be just as easily used for other null-terminated arrays.
### Signed and Unsigned Integers (of all sizes)