File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -29,5 +29,6 @@ if (${QTHREADS_BUILD_TESTS})
2929
3030 add_subdirectory (basics)
3131 add_subdirectory (features)
32+ add_subdirectory (internal )
3233 add_subdirectory (stress)
3334endif ()
Original file line number Diff line number Diff line change 1+ # tests for internal APIs can access internal headers.
2+ include_directories ("../../include" )
3+
4+ qthreads_test(threadpool)
Original file line number Diff line number Diff line change 1+ #include "argparsing.h"
2+ #include "qt_threadpool.h"
3+
4+ static int on_thread_test (void * arg ) {
5+ printf ("hello from thread\n" );
6+ return 0 ;
7+ }
8+
9+ int main () {
10+ hw_pool_init (2 );
11+ hw_pool_destroy ();
12+ hw_pool_init (2 );
13+ hw_pool_run_on_all (& on_thread_test , NULL );
14+ hw_pool_destroy ();
15+ printf ("exited successfully\n" );
16+ fflush (stdout );
17+ return 0 ;
18+ }
You can’t perform that action at this time.
0 commit comments