diff options
Diffstat (limited to 'src/test/test_oos.c')
-rw-r--r-- | src/test/test_oos.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/test_oos.c b/src/test/test_oos.c index db06625116..e72fcf5de9 100644 --- a/src/test/test_oos.c +++ b/src/test/test_oos.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Tor Project, Inc. */ +/* Copyright (c) 2016-2017, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /* Unit tests for OOS handler */ @@ -52,7 +52,7 @@ kill_conn_list_mock(smartlist_t *conns) { ++kill_conn_list_calls; - tt_assert(conns != NULL); + tt_ptr_op(conns, OP_NE, NULL); kill_conn_list_killed += smartlist_len(conns); @@ -248,7 +248,7 @@ close_for_error_mock(or_connection_t *orconn, int flush) { (void)flush; - tt_assert(orconn != NULL); + tt_ptr_op(orconn, OP_NE, NULL); ++cfe_calls; done: @@ -264,7 +264,7 @@ mark_for_close_oos_mock(connection_t *conn, (void)line; (void)file; - tt_assert(conn != NULL); + tt_ptr_op(conn, OP_NE, NULL); ++mark_calls; done: @@ -298,8 +298,8 @@ test_oos_kill_conn_list(void *arg) dir_c2->base_.purpose = DIR_PURPOSE_MIN_; c2 = TO_CONN(dir_c2); - tt_assert(c1 != NULL); - tt_assert(c2 != NULL); + tt_ptr_op(c1, OP_NE, NULL); + tt_ptr_op(c2, OP_NE, NULL); /* Make list */ l = smartlist_new(); @@ -345,7 +345,7 @@ get_num_circuits_mock(or_connection_t *conn) { int circs = 0; - tt_assert(conn != NULL); + tt_ptr_op(conn, OP_NE, NULL); if (conns_with_circs && smartlist_contains(conns_with_circs, TO_CONN(conn))) { @@ -397,7 +397,7 @@ test_oos_pick_oos_victims(void *arg) /* Try picking one */ picked = pick_oos_victims(1); /* It should be the one with circuits */ - tt_assert(picked != NULL); + tt_ptr_op(picked, OP_NE, NULL); tt_int_op(smartlist_len(picked), OP_EQ, 1); tt_assert(smartlist_contains(picked, smartlist_get(conns_for_mock, 0))); smartlist_free(picked); @@ -405,14 +405,14 @@ test_oos_pick_oos_victims(void *arg) /* Try picking none */ picked = pick_oos_victims(0); /* We should get an empty list */ - tt_assert(picked != NULL); + tt_ptr_op(picked, OP_NE, NULL); tt_int_op(smartlist_len(picked), OP_EQ, 0); smartlist_free(picked); /* Try picking two */ picked = pick_oos_victims(2); /* We should get both active orconns */ - tt_assert(picked != NULL); + tt_ptr_op(picked, OP_NE, NULL); tt_int_op(smartlist_len(picked), OP_EQ, 2); tt_assert(smartlist_contains(picked, smartlist_get(conns_for_mock, 0))); tt_assert(smartlist_contains(picked, smartlist_get(conns_for_mock, 1))); |