All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] unit: update base64 test with API change
@ 2021-11-17 21:50 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-11-17 21:50 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

---
 unit/test-base64.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/unit/test-base64.c b/unit/test-base64.c
index 2c2a57d..6e47c2b 100644
--- a/unit/test-base64.c
+++ b/unit/test-base64.c
@@ -115,13 +115,12 @@ static void test_base64_encode(const void *data)
 {
 	const struct base64_encode_test *test = data;
 	char *encoded;
-	size_t encoded_size;
 
 	encoded = l_base64_encode((uint8_t *)test->input, strlen(test->input),
-					test->columns, &encoded_size);
+					test->columns);
 	assert(encoded);
-	assert(encoded_size == strlen(test->output));
-	assert(!memcmp(encoded, test->output, encoded_size));
+	assert(strlen(encoded) == strlen(test->output));
+	assert(!memcmp(encoded, test->output, strlen(encoded)));
 
 	l_free(encoded);
 }
-- 
2.31.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-17 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 21:50 [PATCH 2/2] unit: update base64 test with API change James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.