diff options
author | EuAndreh <eu@euandre.org> | 2025-01-12 00:14:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-01-12 14:27:57 -0300 |
commit | 44d56f5311f98a8955c67638e7520963dbd4d845 (patch) | |
tree | fbb2c58c79f1730ff62c83cef116fb5c0e035dfe /tests/string.c | |
parent | Replace src/config.h with <s.h>; incorporate changes from other projects (diff) | |
download | pindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.gz pindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.xz |
Revamp lib, simplify it a bit and address some FIXMEs
Diffstat (limited to 'tests/string.c')
-rw-r--r-- | tests/string.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/string.c b/tests/string.c index 923d086..7740b4e 100644 --- a/tests/string.c +++ b/tests/string.c @@ -14,7 +14,7 @@ test_string_new_with(void) { { testing("length value isn't checked"); - const char *const string = "abc"; + const char string[] = "abc"; if (string_new_with(string, 123U, &s)) { logerr("string_new_with()"); goto out; @@ -94,7 +94,7 @@ test_cstr(void) { test_start("cstr()"); - const char *const string = "some string"; + const char string[] = "some string"; const size_t length = strlen(string); if (string_new(string, &s)) { logerr("string_new()"); @@ -226,17 +226,17 @@ test_string_equals(void) { const struct String *const s1 = &(struct String) { .length = 1U, - .bytes = (const uint8_t *)"", + .bytes = (const u8 *)"", }; const struct String *const s2 = &(struct String) { .length = 1U, - .bytes = (const uint8_t *)"", + .bytes = (const u8 *)"", }; const struct String *const s3 = &(struct String) { .length = 2U, - .bytes = (const uint8_t *)" ", + .bytes = (const u8 *)" ", }; { @@ -325,7 +325,7 @@ test_string_append(void) { assert(string_equals(s, &(struct String) { .length = 6U, - .bytes = (const uint8_t *)"abcabc", + .bytes = (const u8 *)"abcabc", })); string_free(&s); |