aboutsummaryrefslogtreecommitdiff
path: root/tests/test_str.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2025-03-20 12:11:35 -0400
committerGitHub <noreply@github.com>2025-03-20 12:11:35 -0400
commit629f18d3cdea6340f4a76d9e997ef80b6e17ada4 (patch)
tree25c60be20c78b5d339e4421458799a021bdcb0c2 /tests/test_str.c
parent2ffd817603ecc713988fe2796c9562a857a92ef4 (diff)
parent5126b191b6d1a53d3a402478472fd1d357ace293 (diff)
downloadstasis-629f18d3cdea6340f4a76d9e997ef80b6e17ada4.tar.gz
Merge pull request #100 from jhunkeler/without-extras-in-spec
delivery_overlay_packages_from_env: remove extras from spec
Diffstat (limited to 'tests/test_str.c')
-rw-r--r--tests/test_str.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_str.c b/tests/test_str.c
index 3aea50b..ad0c07a 100644
--- a/tests/test_str.c
+++ b/tests/test_str.c
@@ -79,7 +79,7 @@ void test_strdup_array_and_strcmp_array() {
for (size_t outer = 0; outer < sizeof(tc) / sizeof(*tc); outer++) {
char **result = strdup_array((char **) tc[outer].data);
STASIS_ASSERT(strcmp_array((const char **) result, tc[outer].expected) == 0, "array members were different");
- GENERIC_ARRAY_FREE(result);
+ guard_array_free(result);
}
const struct testcase tc_bad[] = {
@@ -95,7 +95,7 @@ void test_strdup_array_and_strcmp_array() {
for (size_t outer = 0; outer < sizeof(tc_bad) / sizeof(*tc_bad); outer++) {
char **result = strdup_array((char **) tc_bad[outer].data);
STASIS_ASSERT(strcmp_array((const char **) result, tc_bad[outer].expected) != 0, "array members were identical");
- GENERIC_ARRAY_FREE(result);
+ guard_array_free(result);
}
}
@@ -206,7 +206,7 @@ void test_split() {
for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) {
char **result = split((char *) tc[i].data, tc[i].delim, tc[i].max_split);
STASIS_ASSERT(strcmp_array((const char **) result, tc[i].expected) == 0, "Split failed");
- GENERIC_ARRAY_FREE(result);
+ guard_array_free(result);
}
}
@@ -289,7 +289,7 @@ void test_strdeldup() {
for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) {
char **result = strdeldup(tc[i].data);
STASIS_ASSERT(strcmp_array((const char **) result, tc[i].expected) == 0, "incorrect number of duplicates removed");
- GENERIC_ARRAY_FREE(result);
+ guard_array_free(result);
}
}