20#include <boost/test/unit_test.hpp>
39 std::atomic<int> m_processed{ 0 };
42 int computePriorityKey(
const int& aItem )
const override {
return aItem; }
44 size_t task(
int& aItem )
override
47 throw std::runtime_error(
"negative item" );
63 std::vector<int> items = { 5, 3, 8, 1, 9 };
67 BOOST_CHECK_NO_THROW( total = task.Execute( items ) );
78 std::vector<int> items = { 5, 3, -1, 1, 9 };
80 BOOST_CHECK_THROW( task.Execute( items ), std::runtime_error );
A helper class to execute tasks on a thread pool in priority order, with progress reporting.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(AllItemsProcessed)