<commit_before>#include <boost/test/unit_test.hpp>
#include <boost/test/test_case_template.hpp>

#include "args.hpp"

#include "osrm/tile_parameters.hpp"

#include "osrm/coordinate.hpp"
#include "osrm/engine_config.hpp"
#include "osrm/json_container.hpp"
#include "osrm/status.hpp"
#include "osrm/osrm.hpp"

BOOST_AUTO_TEST_SUITE(tile)

BOOST_AUTO_TEST_CASE(test_tile)
{
    const auto args = get_args();
    BOOST_REQUIRE_EQUAL(args.size(), 1);

    using namespace osrm;

    EngineConfig config{args[0]};
    config.use_shared_memory = false;

    OSRM osrm{config};

    /*
    TileParameters params{0, 0, 0};

    // TODO(daniel-j-h): why does the API expect a string?
    std::string result;

    const auto rc = osrm.Tile(params, result);

    BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
    */
}
<commit_msg>Unit tests for Tile service; plugin needs improvements: see #2109<commit_after>#include <boost/test/unit_test.hpp>
#include <boost/test/test_case_template.hpp>

#include "args.hpp"
#include "fixture.hpp"

#include "osrm/tile_parameters.hpp"

#include "osrm/coordinate.hpp"
#include "osrm/engine_config.hpp"
#include "osrm/json_container.hpp"
#include "osrm/status.hpp"
#include "osrm/osrm.hpp"

BOOST_AUTO_TEST_SUITE(tile)

BOOST_AUTO_TEST_CASE(test_tile)
{
    const auto args = get_args();
    auto osrm = get_osrm(args.at(0));

    using namespace osrm;

    TileParameters params{0, 0, 1};

    std::string result;
    const auto rc = osrm.Tile(params, result);
    BOOST_CHECK(rc == Status::Ok);
}

{'fraction_non_alphanumeric': 0.13865271419228253, 'fraction_numerical': 0.008502289077828646, 'mean_word_length': 4.464285714285714, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4864078', 'n_tokens_mistral': 581, 'n_tokens_neox': 556, 'n_words': 112}