diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-02-26 12:33:23 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-02-26 12:33:23 +0200 |
commit | 7fbfdf2af731f500e3df3ca8207e6822f87f1bc9 (patch) | |
tree | 7dd1beac6cc0854d7b4930ec111ec0cb261cb588 /src/test/test_crypto.c | |
parent | 626e6d2c394673ca46a44616a76b33699d0cf763 (diff) | |
parent | f632335feb27b45a3ee5eb64690826bda52467bd (diff) | |
download | tor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.tar.gz tor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.zip |
Merge branch 'tor-github/pr/611'
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r-- | src/test/test_crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c index 0b57448bcf..0903c5c49a 100644 --- a/src/test/test_crypto.c +++ b/src/test/test_crypto.c @@ -1703,13 +1703,13 @@ test_crypto_base32_decode(void *arg) /* Encode and decode a random string. */ base32_encode(encoded, 96 + 1, plain, 60); res = base32_decode(decoded, 60, encoded, 96); - tt_int_op(res,OP_EQ, 0); + tt_int_op(res, OP_EQ, 60); tt_mem_op(plain,OP_EQ, decoded, 60); /* Encode, uppercase, and decode a random string. */ base32_encode(encoded, 96 + 1, plain, 60); tor_strupper(encoded); res = base32_decode(decoded, 60, encoded, 96); - tt_int_op(res,OP_EQ, 0); + tt_int_op(res, OP_EQ, 60); tt_mem_op(plain,OP_EQ, decoded, 60); /* Change encoded string and decode. */ if (encoded[0] == 'A' || encoded[0] == 'a') @@ -1717,12 +1717,12 @@ test_crypto_base32_decode(void *arg) else encoded[0] = 'A'; res = base32_decode(decoded, 60, encoded, 96); - tt_int_op(res,OP_EQ, 0); + tt_int_op(res, OP_EQ, 60); tt_mem_op(plain,OP_NE, decoded, 60); /* Bad encodings. */ encoded[0] = '!'; res = base32_decode(decoded, 60, encoded, 96); - tt_int_op(0, OP_GT, res); + tt_int_op(res, OP_LT, 0); done: ; |