diff options
Diffstat (limited to 'test/src/test/strlen.i')
-rw-r--r-- | test/src/test/strlen.i | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/src/test/strlen.i b/test/src/test/strlen.i new file mode 100644 index 0000000..93bec76 --- /dev/null +++ b/test/src/test/strlen.i @@ -0,0 +1,13 @@ +#include <stdbool.h> + +bool zaptest_test_strlen(void) { + char const str0[] = "Hello there! General Kenobi?"; + char const str1[] = "Hello there! General Gayballs?"; + zaptest_log(str0,char const *,"%s") + zaptest_log(str1,char const *,"%s") + zap_sz const len0 = zap_strlen(str0); + zap_sz const len1 = zap_strlen(str1); + zaptest_chk(len0,0x1Cu,zap_sz,"%zX") + zaptest_chk(len1,0x1Eu,zap_sz,"%zX") + return false; +} |