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

Function do_test2

dlib/test/bridge.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void do_test2()
41 {
42 dlib::pipe<int> in(0), out(0), echo_pipe(0);
43
44 bridge b2(listen_on_port(testing_port), transmit(out), receive(in));
45 bridge echo(connect_to_ip_and_port("127.0.0.1",testing_port), receive(echo_pipe), transmit(echo_pipe));
46
47 for (int i = 0; i < 100; ++i)
48 {
49 int val = i;
50 out.enqueue(val);
51 val = 0;
52 in.dequeue(val);
53 DLIB_TEST(val == i);
54 }
55 }
56
57 void do_test3()
58 {

Callers 1

perform_testMethod · 0.70

Calls 5

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

Tested by

no test coverage detected