mirror of https://github.com/davisking/dlib.git
Made test more robust
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404281
This commit is contained in:
parent
cff821d8fe
commit
8808589dcd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue