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

Method perform_test

dlib/test/threads.cpp:65–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 bool failure;
64
65 void perform_test (
66 )
67 {
68 failure = false;
69 print_spinner();
70
71
72 count = 10;
73 if (!create_new_thread<threads_tester,&threads_tester::thread1>(*this)) failure = true;
74 if (!create_new_thread<threads_tester,&threads_tester::thread2>(*this)) failure = true;
75 if (!create_new_thread<threads_tester,&threads_tester::thread3>(*this)) failure = true;
76 if (!create_new_thread<threads_tester,&threads_tester::thread4>(*this)) failure = true;
77 if (!create_new_thread<threads_tester,&threads_tester::thread5>(*this)) failure = true;
78 if (!create_new_thread<threads_tester,&threads_tester::thread6>(*this)) failure = true;
79 if (!create_new_thread<threads_tester,&threads_tester::thread7>(*this)) failure = true;
80 if (!create_new_thread<threads_tester,&threads_tester::thread8>(*this)) failure = true;
81 if (!create_new_thread<threads_tester,&threads_tester::thread9>(*this)) failure = true;
82 if (!create_new_thread<threads_tester,&threads_tester::thread10>(*this)) failure = true;
83
84 thread(66);
85
86 // this should happen in the main program thread
87 if (is_dlib_thread())
88 failure = true;
89
90 auto_mutex M(cm);
91 while (count > 0 && !failure)
92 sm.wait();
93
94
95 DLIB_TEST(!failure);
96
97 test_async();
98 }
99
100 void thread_end_handler (
101 )

Callers

nothing calls this directly

Calls 5

print_spinnerFunction · 0.85
is_dlib_threadFunction · 0.85
test_asyncFunction · 0.85
threadFunction · 0.50
waitMethod · 0.45

Tested by

no test coverage detected