Update tests for acc3fe8

We can just use a wesnothd_connection object directly here.
This commit is contained in:
Charles Dang 2018-04-13 10:42:39 +11:00
parent acc3fe8906
commit 7767902261

View file

@ -854,16 +854,16 @@ template<>
struct dialog_tester<mp_lobby> struct dialog_tester<mp_lobby>
{ {
config game_config; config game_config;
wesnothd_connection_ptr connection; wesnothd_connection connection;
wesnothd_connection_init init; wesnothd_connection_init init;
std::vector<std::string> installed_addons; std::vector<std::string> installed_addons;
mp::lobby_info li; mp::lobby_info li;
dialog_tester() : connection(wesnothd_connection::create("", "")), init(*connection), li(game_config, installed_addons) dialog_tester() : connection("", ""), init(*connection), li(game_config, installed_addons)
{ {
} }
mp_lobby* create() mp_lobby* create()
{ {
return new mp_lobby(game_config, li, *connection); return new mp_lobby(game_config, li, connection);
} }
}; };
@ -880,13 +880,13 @@ struct dialog_tester<lobby_player_info>
{ {
config c; config c;
fake_chat_handler ch; fake_chat_handler ch;
wesnothd_connection_ptr connection; wesnothd_connection connection;
wesnothd_connection_init init; wesnothd_connection_init init;
mp::user_info ui; mp::user_info ui;
std::vector<std::string> installed_addons; std::vector<std::string> installed_addons;
mp::lobby_info li; mp::lobby_info li;
dialog_tester() dialog_tester()
: connection(wesnothd_connection::create("", "")), init(*connection) : connection("", ""), init(connection)
, ui(c), li(c, installed_addons) , ui(c), li(c, installed_addons)
{ {
} }