From 6837c5ac80e3624c6dc3a82d03e50d68b2f5a989 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 26 Oct 2026 17:13:36 +0100 Subject: Second run of making variable and function names more readable, urlencoder now matches overall naming scheme --- tests/t_iovec.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/t_iovec.c') diff --git a/tests/t_iovec.c b/tests/t_iovec.c index 89f3fda..2553141 100644 --- a/tests/t_iovec.c +++ b/tests/t_iovec.c @@ -18,13 +18,13 @@ static void case_increase_and_length(void) { void *first, *second; test_case("increase appends an entry and length is their sum"); - first = iovec_increase(&entries, &vector, 100); + first = iovec_new_chunk(&entries, &vector, 100); CHECK(first != NULL); CHECK_INT(entries, 1); CHECK_INT(vector[0].iov_len, 100); CHECK_PTR(vector[0].iov_base, first); - second = iovec_increase(&entries, &vector, 50); + second = iovec_new_chunk(&entries, &vector, 50); CHECK(second != NULL); CHECK_INT(entries, 2); CHECK_INT(vector[1].iov_len, 50); @@ -38,8 +38,8 @@ static void case_free_resets(void) { struct iovec *vector = NULL; test_case("free releases the entries and resets the vector"); - CHECK(iovec_increase(&entries, &vector, 10) != NULL); - CHECK(iovec_increase(&entries, &vector, 10) != NULL); + CHECK(iovec_new_chunk(&entries, &vector, 10) != NULL); + CHECK(iovec_new_chunk(&entries, &vector, 10) != NULL); iovec_free(&entries, &vector); CHECK_INT(entries, 0); CHECK_PTR(vector, NULL); @@ -52,12 +52,12 @@ static void case_fixlast_shrinks(void) { char *block; test_case("fixlast trims the last entry to the bytes actually used"); - CHECK(iovec_increase(&entries, &vector, 64) != NULL); - block = iovec_increase(&entries, &vector, 1000); + CHECK(iovec_new_chunk(&entries, &vector, 64) != NULL); + block = iovec_new_chunk(&entries, &vector, 1000); CHECK(block != NULL); memset(block, 'x', 20); - iovec_fixlast(&entries, &vector, block + 20); + iovec_trim_last(&entries, &vector, block + 20); CHECK_INT(entries, 2); CHECK_INT(vector[1].iov_len, 20); CHECK_INT(iovec_length(&entries, (const struct iovec **)&vector), 84); @@ -71,7 +71,7 @@ static void case_fixlast_on_empty(void) { struct iovec *vector = NULL; test_case("fixlast on an empty vector does nothing"); - iovec_fixlast(&entries, &vector, NULL); + iovec_trim_last(&entries, &vector, NULL); CHECK_INT(entries, 0); CHECK_PTR(vector, NULL); } @@ -103,9 +103,9 @@ static void case_fix_increase(void) { char *block; test_case("fix_increase trims the previous entry and adds a new one"); - block = iovec_increase(&entries, &vector, 500); + block = iovec_new_chunk(&entries, &vector, 500); CHECK(block != NULL); - block = iovec_fix_increase_or_free(&entries, &vector, block + 30, 200); + block = iovec_next_chunk(&entries, &vector, block + 30, 200); CHECK(block != NULL); CHECK_INT(entries, 2); CHECK_INT(vector[0].iov_len, 30); -- cgit v1.3