Explorar o código

Test two more base64cmp cases.

Nick Mathewson %!s(int64=8) %!d(string=hai) anos
pai
achega
ccb789fe34
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/test/test_consdiff.c

+ 4 - 0
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:
   ;
 }