[tor-commits] [tor/master] Test two more base64cmp cases.

nickm at torproject.org nickm at torproject.org
Thu Mar 16 19:01:08 UTC 2017


commit ccb789fe34abc4785bc4bf3e98612bcae7a66f78
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Mar 7 10:45:13 2017 -0500

    Test two more base64cmp cases.
---
 src/test/test_consdiff.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/test/test_consdiff.c b/src/test/test_consdiff.c
index a72b64b..c8fb318 100644
--- a/src/test/test_consdiff.c
+++ b/src/test/test_consdiff.c
@@ -409,6 +409,10 @@ test_consdiff_base64cmp(void *arg)
   tt_int_op(1, OP_EQ, strcmp("afoo", "Afoo"));
   tt_int_op(1, OP_EQ, base64cmp("afoo", "Afoo"));
 
+  /* Different lengths */
+  tt_int_op(-1, OP_EQ, base64cmp("afoo", "afooo"));
+  tt_int_op(1, OP_EQ, base64cmp("afooo", "afoo"));
+
  done:
   ;
 }





More information about the tor-commits mailing list