MCPcopy Create free account
hub / github.com/davisking/dlib / do_test4

Function do_test4

dlib/test/bridge.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 void do_test4()
77 {
78 dlib::pipe<int> in(0), out(0), echo_pipe(0);
79
80 bridge b2, echo;
81 b2.reconfigure(listen_on_port(testing_port), receive(in), transmit(out));
82 echo.reconfigure(connect_to_ip_and_port("127.0.0.1",testing_port), transmit(echo_pipe), receive(echo_pipe));
83
84 for (int i = 0; i < 100; ++i)
85 {
86 int val = i;
87 out.enqueue(val);
88 val = 0;
89 in.dequeue(val);
90 DLIB_TEST(val == i);
91 }
92 }
93
94 void do_test5(int pipe_size)
95 {

Callers 1

perform_testMethod · 0.85

Calls 6

receiveFunction · 0.85
transmitFunction · 0.85
reconfigureMethod · 0.80
listen_on_portClass · 0.50
enqueueMethod · 0.45

Tested by

no test coverage detected