Made test more robust

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404281
This commit is contained in:
Davis King 2011-05-14 21:17:07 +00:00
parent cff821d8fe
commit 8808589dcd
1 changed files with 6 additions and 5 deletions

View File

@ -102,6 +102,12 @@ namespace
bridge b1(connect_to_ip_and_port("127.0.0.1",testing_port), receive(in));
tsu_type msg;
msg = b1.get_bridge_status();
DLIB_TEST(msg.contains<bridge_status>() == true);
DLIB_TEST(msg.get<bridge_status>().is_connected == false);
DLIB_TEST(msg.get<bridge_status>().foreign_ip == "");
DLIB_TEST(msg.get<bridge_status>().foreign_port == 0);
{
bridge b2(listen_on_port(testing_port), transmit(out), receive(out_status));
@ -140,11 +146,6 @@ namespace
DLIB_TEST(msg.get<bridge_status>().is_connected == false);
DLIB_TEST(msg.get<bridge_status>().foreign_ip == "127.0.0.1");
DLIB_TEST(msg.get<bridge_status>().foreign_port == testing_port);
msg = b1.get_bridge_status();
DLIB_TEST(msg.contains<bridge_status>() == true);
DLIB_TEST(msg.get<bridge_status>().is_connected == false);
DLIB_TEST(msg.get<bridge_status>().foreign_ip == "127.0.0.1");
DLIB_TEST(msg.get<bridge_status>().foreign_port == testing_port);
}
void do_test5_5(int pipe_size)