Horizon Official Technical Documentation
WorkerThreadPoolTest.cpp File Reference
#include "Core/Multithreading/WorkerThreadPool.hpp"
#include <boost/test/unit_test.hpp>
#include <cstring>
#include <thread>
#include <cstdio>
#include <iostream>
+ Include dependency graph for WorkerThreadPoolTest.cpp:

Macros

#define BOOST_TEST_MODULE   "WorkerThreadPoolTest"
 

Functions

int work_1 (int num=10)
 
 BOOST_AUTO_TEST_CASE (WorkerThreadPoolTest)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   "WorkerThreadPoolTest"

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( WorkerThreadPoolTest  )
48{
50
51 for (int i = 0; i < 1000; i++) {
52 std::function<int(int)> func = std::bind(work_1, 20);
53 func(29);
54 }
55}
int work_1(int num=10)
Definition: WorkerThreadPoolTest.cpp:40
Definition: WorkerThreadPool.hpp:80

References work_1().

+ Here is the call graph for this function:

◆ work_1()

int work_1 ( int  num = 10)
41{
42 for (int i = 0; i < 100000000; i += num)
43 ;
44 return num;
45}

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function: