2017-03-08 05:27:38 -05:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
|
|
|
|
#include "osrm/contractor.hpp"
|
|
|
|
#include "osrm/contractor_config.hpp"
|
|
|
|
|
2020-09-01 07:25:51 -04:00
|
|
|
#include <thread>
|
2017-03-08 05:27:38 -05:00
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(library_contract)
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(test_contract_with_invalid_config)
|
|
|
|
{
|
|
|
|
using namespace osrm;
|
|
|
|
|
|
|
|
osrm::ContractorConfig config;
|
2020-09-01 07:25:51 -04:00
|
|
|
config.requested_num_threads = std::thread::hardware_concurrency();
|
2017-03-08 05:27:38 -05:00
|
|
|
BOOST_CHECK_THROW(osrm::contract(config),
|
|
|
|
std::exception); // including osrm::util::exception, etc.
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|