| 425 | BOOST_AUTO_TEST_CASE(test_tile_speeds_mld_new_api) { test_tile_speeds_mld(false); } |
| 426 | |
| 427 | void test_tile_nodes(const osrm::OSRM &osrm, bool use_string_only_api) |
| 428 | { |
| 429 | using namespace osrm; |
| 430 | |
| 431 | // Small tile so we can test all the values |
| 432 | // TileParameters params{272953, 191177, 19}; |
| 433 | // TileParameters params{136477, 95580, 18}; |
| 434 | // Small tile where we can test all the values |
| 435 | TileParameters params{272953, 191177, 19}; |
| 436 | |
| 437 | std::string str_result; |
| 438 | const auto rc = run_tile(osrm, params, str_result, use_string_only_api); |
| 439 | BOOST_CHECK(rc == Status::Ok); |
| 440 | |
| 441 | BOOST_CHECK_GT(str_result.size(), 128); |
| 442 | |
| 443 | vtzero::vector_tile tile{str_result}; |
| 444 | |
| 445 | tile.next_layer(); |
| 446 | tile.next_layer(); |
| 447 | auto layer = tile.next_layer(); |
| 448 | BOOST_CHECK_EQUAL(to_string(layer.name()), "osmnodes"); |
| 449 | |
| 450 | std::vector<OSMNodeID::value_type> found_node_ids; |
| 451 | while (auto feature = layer.next_feature()) |
| 452 | { |
| 453 | found_node_ids.push_back(feature.id()); |
| 454 | } |
| 455 | |
| 456 | std::sort(found_node_ids.begin(), found_node_ids.end()); |
| 457 | const std::vector<OSMNodeID::value_type> expected_node_ids = { |
| 458 | 25191722, 25191725, 357300400, 1737389138, 1737389140, 2241375220}; |
| 459 | BOOST_CHECK(found_node_ids == expected_node_ids); |
| 460 | } |
| 461 | |
| 462 | void test_tile_nodes_ch(osrm::EngineConfig::Algorithm algorithm, bool use_string_only_api) |
| 463 | { |