diff --git a/tests/base32.c b/tests/base32.c index 7aad09c..f007798 100644 --- a/tests/base32.c +++ b/tests/base32.c @@ -50,6 +50,7 @@ START_TEST(test_base32_encode) len = sizeof(buf); val = b32->encode(buf, &len, testpairs[_i].a, strlen(testpairs[_i].a)); + fail_unless(val == strlen(testpairs[_i].b)); fail_unless(strcmp(buf, testpairs[_i].b) == 0, "'%s' != '%s'", buf, testpairs[_i].b); } @@ -67,6 +68,7 @@ START_TEST(test_base32_decode) len = sizeof(buf); val = b32->decode(buf, &len, testpairs[_i].b, strlen(testpairs[_i].b)); + fail_unless(val == strlen(testpairs[_i].a)); fail_unless(strcmp(buf, testpairs[_i].a) == 0, "'%s' != '%s'", buf, testpairs[_i].a); } diff --git a/tests/base64.c b/tests/base64.c index a68422c..a259b23 100644 --- a/tests/base64.c +++ b/tests/base64.c @@ -76,6 +76,7 @@ START_TEST(test_base64_encode) len = sizeof(buf); val = b64->encode(buf, &len, testpairs[_i].a, strlen(testpairs[_i].a)); + fail_unless(val == strlen(testpairs[_i].b)); fail_unless(strcmp(buf, testpairs[_i].b) == 0, "'%s' != '%s'", buf, testpairs[_i].b); } @@ -93,6 +94,7 @@ START_TEST(test_base64_decode) len = sizeof(buf); val = b64->decode(buf, &len, testpairs[_i].b, strlen(testpairs[_i].b)); + fail_unless(val == strlen(testpairs[_i].a)); fail_unless(strcmp(buf, testpairs[_i].a) == 0, "'%s' != '%s'", buf, testpairs[_i].a); }