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

Function multithreaded_object_test

dlib/test/multithreaded_object.cpp:262–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261
262 void multithreaded_object_test (
263 )
264 /*!
265 ensures
266 - runs tests on dlib::multithreaded_object for compliance with the specs
267 !*/
268 {
269
270 count = 0;
271
272 for (int i = 0; i < 5; ++i)
273 {
274 {
275 test1 a1;
276 test2 a2;
277 test3_c1 a3;
278 test4_c2 a4;
279 test5 a5;
280 }
281 DLIB_TEST(count == (i+1)*3);
282 print_spinner();
283 }
284 count = 0;
285
286 for (int i = 0; i < 5; ++i)
287 {
288 {
289 test1 a1;
290 test2 a2;
291 test3_c1 a3;
292 test4_c2 a4;
293 test5 a5;
294 dlib::sleep(50);
295 }
296 DLIB_TEST(count == (i+1)*3);
297 print_spinner();
298 }
299 }
300
301
302 class multithreaded_object_tester : public tester

Callers 1

perform_testMethod · 0.85

Calls 2

print_spinnerFunction · 0.85
sleepFunction · 0.50

Tested by

no test coverage detected