Go to the source code of this file.
#define BOOST_TEST_MODULE (simultaneous_function_spawner test) |
BOOST_AUTO_TEST_CASE |
( |
cout |
| ) |
|
Definition at line 8 of file simultaneous_function_spawner_t.cc.
10 auto task = [] { std::cout <<
"Hello concurrent world.\n"; };
auto repeated_task(std::size_t const nInstances, F func)
BOOST_AUTO_TEST_CASE |
( |
atomic_int |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
assign_different_numbers |
| ) |
|
Definition at line 22 of file simultaneous_function_spawner_t.cc.
24 std::vector<int> nums(7);
25 std::vector<std::function<void()>> tasks;
26 tasks.push_back([&nums] { nums[0] = 1; });
27 tasks.push_back([&nums] { nums[1] = 3; });
28 tasks.push_back([&nums] { nums[2] = 5; });
29 tasks.push_back([&nums] { nums[3] = 7; });
30 tasks.push_back([&nums] { nums[4] = 6; });
31 tasks.push_back([&nums] { nums[5] = 4; });
32 tasks.push_back([&nums] { nums[6] = 2; });
33 auto const ref = {1, 3, 5, 7, 6, 4, 2};
35 BOOST_TEST(nums == ref, boost::test_tools::per_element{});