diff options
author | Matt Traudt <sirmatt@ksu.edu> | 2017-07-10 12:19:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-10 15:27:01 -0400 |
commit | 1ff98a7e891b7af4e2f4313c360f3cb320e632a7 (patch) | |
tree | b0b53ad1bf1a8392d89653a9e9691c592914ae66 /src/test/test_consdiff.c | |
parent | c1bdc3b10e66de6d79c48c94628956b8578d5f17 (diff) | |
download | tor-1ff98a7e891b7af4e2f4313c360f3cb320e632a7.tar.gz tor-1ff98a7e891b7af4e2f4313c360f3cb320e632a7.zip |
Make consdiff tests pass on OS X too
Diffstat (limited to 'src/test/test_consdiff.c')
-rw-r--r-- | src/test/test_consdiff.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/test_consdiff.c b/src/test/test_consdiff.c index 23948d6860..7cf8d6ba2b 100644 --- a/src/test/test_consdiff.c +++ b/src/test/test_consdiff.c @@ -415,18 +415,18 @@ test_consdiff_base64cmp(void *arg) tt_int_op(-1, OP_EQ, base64cmp_wrapper("abcABC/+ ", "abcABC/+a")); /* Comparisons that would return differently with strcmp(). */ - tt_int_op(-1, OP_EQ, strcmp("/foo", "Afoo")); - tt_int_op(1, OP_EQ, base64cmp_wrapper("/foo", "Afoo")); - tt_int_op(1, OP_EQ, strcmp("Afoo", "0foo")); - tt_int_op(-1, OP_EQ, base64cmp_wrapper("Afoo", "0foo")); + tt_int_op(strcmp("/foo", "Afoo"), OP_LT, 0); + tt_int_op(base64cmp_wrapper("/foo", "Afoo"), OP_GT, 0); + tt_int_op(strcmp("Afoo", "0foo"), OP_GT, 0); + tt_int_op(base64cmp_wrapper("Afoo", "0foo"), OP_LT, 0); /* Comparisons that would return the same as with strcmp(). */ - tt_int_op(1, OP_EQ, strcmp("afoo", "Afoo")); - tt_int_op(1, OP_EQ, base64cmp_wrapper("afoo", "Afoo")); + tt_int_op(strcmp("afoo", "Afoo"), OP_GT, 0); + tt_int_op(base64cmp_wrapper("afoo", "Afoo"), OP_GT, 0); /* Different lengths */ - tt_int_op(-1, OP_EQ, base64cmp_wrapper("afoo", "afooo")); - tt_int_op(1, OP_EQ, base64cmp_wrapper("afooo", "afoo")); + tt_int_op(base64cmp_wrapper("afoo", "afooo"), OP_LT, 0); + tt_int_op(base64cmp_wrapper("afooo", "afoo"), OP_GT, 0); done: ; |