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

Method test4_c2

dlib/test/multithreaded_object.cpp:147–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 {
146 public:
147 test4_c2()
148 {
149 DLIB_TEST(number_of_threads_registered() == 0);
150 DLIB_TEST(number_of_threads_alive() == 0);
151 DLIB_TEST(is_running() == false);
152 register_thread(*this,&test4_c2::thread);
153 DLIB_TEST(number_of_threads_registered() == 1);
154 DLIB_TEST(number_of_threads_alive() == 0);
155 DLIB_TEST(is_running() == false);
156 start();
157 DLIB_TEST(number_of_threads_registered() == 1);
158 DLIB_TEST(number_of_threads_alive() == 1);
159 DLIB_TEST(is_running() == true);
160 register_thread(*this,&test4_c2::thread);
161 DLIB_TEST(number_of_threads_registered() == 2);
162 DLIB_TEST(number_of_threads_alive() == 2);
163 DLIB_TEST(is_running() == true);
164 start();
165 DLIB_TEST(number_of_threads_registered() == 2);
166 DLIB_TEST(number_of_threads_alive() == 2);
167 DLIB_TEST(is_running() == true);
168 start();
169 DLIB_TEST(number_of_threads_registered() == 2);
170 DLIB_TEST(number_of_threads_alive() == 2);
171 DLIB_TEST(is_running() == true);
172 start();
173 DLIB_TEST(number_of_threads_registered() == 2);
174 DLIB_TEST(number_of_threads_alive() == 2);
175 DLIB_TEST(is_running() == true);
176 start();
177 DLIB_TEST(number_of_threads_registered() == 2);
178 DLIB_TEST(number_of_threads_alive() == 2);
179 DLIB_TEST(is_running() == true);
180 pause();
181 DLIB_TEST(number_of_threads_registered() == 2);
182 DLIB_TEST(number_of_threads_alive() == 2);
183 DLIB_TEST(is_running() == false);
184 }
185
186 ~test4_c2()
187 {

Callers

nothing calls this directly

Calls 1

startFunction · 0.85

Tested by

no test coverage detected