diff options
Diffstat (limited to 'src/test/test_pt.c')
-rw-r--r-- | src/test/test_pt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/test_pt.c b/src/test/test_pt.c index ab8447dcd7..f93019f1c4 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -107,12 +107,12 @@ test_pt_parsing(void *arg) tt_assert(parse_smethod_line(line, mp) == 0); tt_int_op(1, OP_EQ, smartlist_len(mp->transports)); { - const transport_t *transport = smartlist_get(mp->transports, 0); - tt_assert(transport); - tt_str_op(transport->name, OP_EQ, "trebuchet"); - tt_int_op(transport->port, OP_EQ, 9999); - tt_str_op(fmt_addr(&transport->addr), OP_EQ, "127.0.0.1"); - tt_str_op(transport->extra_info_args, OP_EQ, + const transport_t *transport_ = smartlist_get(mp->transports, 0); + tt_assert(transport_); + tt_str_op(transport_->name, OP_EQ, "trebuchet"); + tt_int_op(transport_->port, OP_EQ, 9999); + tt_str_op(fmt_addr(&transport_->addr), OP_EQ, "127.0.0.1"); + tt_str_op(transport_->extra_info_args, OP_EQ, "counterweight=3,sling=snappy"); } reset_mp(mp); @@ -155,9 +155,9 @@ test_pt_get_transport_options(void *arg) opt_str = get_transport_options_for_server_proxy(mp); tt_ptr_op(opt_str, OP_EQ, NULL); - smartlist_add(mp->transports_to_launch, tor_strdup("gruyere")); - smartlist_add(mp->transports_to_launch, tor_strdup("roquefort")); - smartlist_add(mp->transports_to_launch, tor_strdup("stnectaire")); + smartlist_add_strdup(mp->transports_to_launch, "gruyere"); + smartlist_add_strdup(mp->transports_to_launch, "roquefort"); + smartlist_add_strdup(mp->transports_to_launch, "stnectaire"); tt_assert(options); @@ -305,7 +305,7 @@ tor_get_lines_from_handle_replacement(STDIN_HANDLE *handle, smartlist_add_asprintf(retval_sl, "SMETHOD mock%d 127.0.0.1:555%d", times_called, times_called); } else { - smartlist_add(retval_sl, tor_strdup("SMETHODS DONE")); + smartlist_add_strdup(retval_sl, "SMETHODS DONE"); } return retval_sl; |