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

Function do_test1

dlib/test/bridge.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 const unsigned short testing_port = 41238;
22
23 void do_test1()
24 {
25 dlib::pipe<int> in(0), out(0);
26
27 bridge b1(connect_to_ip_and_port("127.0.0.1",testing_port), receive(in));
28 bridge b2(listen_on_port(testing_port), transmit(out));
29
30 for (int i = 0; i < 100; ++i)
31 {
32 int val = i;
33 out.enqueue(val);
34 val = 0;
35 in.dequeue(val);
36 DLIB_TEST(val == i);
37 }
38 }
39
40 void do_test2()
41 {

Callers 1

perform_testMethod · 0.85

Calls 5

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

Tested by

no test coverage detected