From 9209e89d96ce3798331baa9e9156789bf6fe63ed Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 19 Sep 2017 00:34:26 +0200 Subject: [PATCH] More tests --- test/default/sodium_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/default/sodium_utils.c b/test/default/sodium_utils.c index 03717979..8febcdad 100644 --- a/test/default/sodium_utils.c +++ b/test/default/sodium_utils.c @@ -160,6 +160,14 @@ main(void) sodium_base64_VARIANT_URLSAFE) == -1); assert(sodium_base642bin(NULL, (size_t) 10U, "a*", (size_t) 2U, "*", NULL, NULL, sodium_base64_VARIANT_URLSAFE) == -1); + assert(sodium_base642bin(NULL, (size_t) 10U, "a==", (size_t) 3U, NULL, NULL, NULL, + sodium_base64_VARIANT_URLSAFE) == -1); + assert(sodium_base642bin(NULL, (size_t) 10U, "a=*", (size_t) 3U, NULL, NULL, NULL, + sodium_base64_VARIANT_URLSAFE) == -1); + assert(sodium_base642bin(NULL, (size_t) 10U, "a=*", (size_t) 3U, "~", NULL, NULL, + sodium_base64_VARIANT_URLSAFE) == -1); + assert(sodium_base642bin(NULL, (size_t) 10U, "a=*", (size_t) 3U, "*", NULL, NULL, + sodium_base64_VARIANT_URLSAFE) == -1); for (i = 0; i < 1000; i++) { assert(sizeof buf1 >= 100);