diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:49:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:49:59 -0400 |
commit | 047790a25343e3857fb95e8874755440da30a982 (patch) | |
tree | 30f7f00f78aab3f4120eebabc6c9166e101e8f8c /src/test/test_controller.c | |
parent | 0b36208fd88e284592bb78d5b7c41226d6576e00 (diff) | |
download | tor-047790a25343e3857fb95e8874755440da30a982.tar.gz tor-047790a25343e3857fb95e8874755440da30a982.zip |
apply ahf's test_assert_int.cocci
Diffstat (limited to 'src/test/test_controller.c')
-rw-r--r-- | src/test/test_controller.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_controller.c b/src/test/test_controller.c index 592f91a988..6005c077d7 100644 --- a/src/test/test_controller.c +++ b/src/test/test_controller.c @@ -73,7 +73,7 @@ test_add_onion_helper_keyarg(void *arg) tt_assert(!key_new_alg); tt_assert(!key_new_blob); tt_assert(!err_msg); - tt_assert(crypto_pk_cmp_keys(pk, pk2) == 0); + tt_int_op(crypto_pk_cmp_keys(pk, pk2), OP_EQ, 0); /* Test loading a invalid key type. */ tor_free(arg_str); @@ -123,13 +123,13 @@ test_getinfo_helper_onion(void *arg) /* successfully get an empty answer */ rt = getinfo_helper_onions(&dummy, "onions/current", &answer, &errmsg); - tt_assert(rt == 0); + tt_int_op(rt, OP_EQ, 0); tt_str_op(answer, OP_EQ, ""); tor_free(answer); /* successfully get an empty answer */ rt = getinfo_helper_onions(&dummy, "onions/detached", &answer, &errmsg); - tt_assert(rt == 0); + tt_int_op(rt, OP_EQ, 0); tt_str_op(answer, OP_EQ, ""); tor_free(answer); @@ -138,7 +138,7 @@ test_getinfo_helper_onion(void *arg) dummy.ephemeral_onion_services = smartlist_new(); smartlist_add(dummy.ephemeral_onion_services, service_id); rt = getinfo_helper_onions(&dummy, "onions/current", &answer, &errmsg); - tt_assert(rt == 0); + tt_int_op(rt, OP_EQ, 0); tt_str_op(answer, OP_EQ, "dummy_onion_id"); done: |