try to speed up compile of tests by cleaning up unused includes/cruft

This commit is contained in:
Dane Springmeyer 2015-10-29 08:20:46 -07:00
parent aa6a06116b
commit 5090b103e4
14 changed files with 20 additions and 94 deletions

View file

@ -40,7 +40,6 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-local-typedef"
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#pragma GCC diagnostic pop
#include <iostream>

View file

@ -28,7 +28,6 @@
#include <mapnik/image.hpp>
#include <mapnik/image_reader.hpp>
#include <mapnik/image_util.hpp>
#include <mapnik/font_engine_freetype.hpp>
#include <mapnik/util/fs.hpp>
TEST_CASE("ogr") {

View file

@ -20,9 +20,6 @@
*
*****************************************************************************/
#include <iostream>
#include <fstream>
#include "catch.hpp"
#include <mapnik/quad_tree.hpp>

View file

@ -1,8 +1,6 @@
#include "catch.hpp"
#include <iostream>
#include <mapnik/memory_datasource.hpp>
#include <mapnik/datasource_cache.hpp>
#include <mapnik/feature.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/unicode.hpp>
@ -13,16 +11,10 @@
#include <mapnik/rule.hpp>
#include <mapnik/feature_type_style.hpp>
#include <mapnik/agg_renderer.hpp>
#include <mapnik/image_util.hpp>
#include <mapnik/color_factory.hpp>
#include <mapnik/save_map.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/text/placements/dummy.hpp>
#include <mapnik/text/formatting/text.hpp>
#include <vector>
#include <algorithm>
#include <mapnik/make_unique.hpp>
TEST_CASE("fontset") {
@ -38,8 +30,6 @@ SECTION("error") {
mapnik::transcoder tr("utf-8");
mapnik::value_unicode_string ustr = tr.transcode("hello world!");
feature->put("name",ustr);
//auto pt = std::make_unique<mapnik::geometry_type>(mapnik::geometry::geometry_types::Point);
//pt->move_to(128,128);
mapnik::geometry::point<double> pt(128,128);
feature->set_geometry(std::move(pt));

View file

@ -1,7 +1,6 @@
#include "catch.hpp"
#include <mapnik/geometry.hpp>
#include <mapnik/util/fs.hpp>
#include <mapnik/util/file_io.hpp>
#include <mapnik/json/geometry_parser.hpp>
#include <mapnik/util/geometry_to_geojson.hpp>

View file

@ -1,8 +1,6 @@
#include "catch.hpp"
#include <mapnik/config.hpp>
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_adapters.hpp>
#include <mapnik/geometry_envelope.hpp>
#include <mapnik/geometry_correct.hpp>

View file

@ -2,7 +2,6 @@
#include <boost/version.hpp>
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_adapters.hpp>
#include <mapnik/geometry_is_simple.hpp>
TEST_CASE("geometry is_simple") {

View file

@ -1,7 +1,6 @@
#include "catch.hpp"
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_adapters.hpp>
#include <mapnik/geometry_is_valid.hpp>
TEST_CASE("geometry is_valid") {

View file

@ -6,10 +6,6 @@
#include <mapnik/projection.hpp>
#include <mapnik/proj_transform.hpp>
#include <mapnik/geometry_reprojection.hpp>
#include <mapnik/geometry_correct.hpp>
// std
#include <iostream>
TEST_CASE("geometry reprojection") {

View file

@ -2,64 +2,32 @@
#include <iostream>
#include <mapnik/geometry.hpp>
#include <mapnik/geometry_adapters.hpp>
#include <mapnik/geometry_centroid.hpp>
#include <vector>
#include <algorithm>
TEST_CASE("labeling") {
SECTION("algorithms") {
try
// reused these for simplicity
mapnik::geometry::point<double> centroid;
{
// reused these for simplicity
mapnik::geometry::point<double> centroid;
{
// single point
mapnik::geometry::point<double> pt(10,10);
REQUIRE( mapnik::geometry::centroid(pt, centroid));
REQUIRE( pt.x == centroid.x);
REQUIRE( pt.y == centroid.y);
}
// single point
mapnik::geometry::point<double> pt(10,10);
REQUIRE( mapnik::geometry::centroid(pt, centroid));
REQUIRE( pt.x == centroid.x);
REQUIRE( pt.y == centroid.y);
}
// linestring with three consecutive verticies
{
mapnik::geometry::line_string<double> line;
line.add_coord(0, 0);
line.add_coord(25, 25);
line.add_coord(50, 50);
REQUIRE(mapnik::geometry::centroid(line, centroid));
REQUIRE( centroid.x == 25 );
REQUIRE( centroid.y == 25 );
}
// TODO - centroid and interior should be equal but they appear not to be (check largest)
// MULTIPOLYGON(((-52 40,-60 32,-68 40,-60 48,-52 40)),((-60 50,-80 30,-100 49.9999999999999,-80.0000000000001 70,-60 50)),((-52 60,-60 52,-68 60,-60 68,-52 60)))
#if 0
// hit tests
{
mapnik::geometry_type pt_hit(mapnik::geometry::geometry_types::Point);
pt_hit.move_to(10,10);
mapnik::vertex_adapter va(pt_hit);
REQUIRE( mapnik::label::hit_test(va, 10, 10, 0.1) );
REQUIRE( !mapnik::label::hit_test(va, 9, 9, 0) );
REQUIRE( mapnik::label::hit_test(va, 9, 9, 1.5) );
}
{
mapnik::geometry_type line_hit(mapnik::geometry::geometry_types::LineString);
line_hit.move_to(0,0);
line_hit.line_to(50,50);
mapnik::vertex_adapter va(line_hit);
REQUIRE( mapnik::label::hit_test(va, 0, 0, 0.001) );
REQUIRE( !mapnik::label::hit_test(va, 1, 1, 0) );
REQUIRE( mapnik::label::hit_test(va, 1, 1, 1.001) );
}
#endif
}
catch (std::exception const & ex)
// linestring with three consecutive verticies
{
std::clog << ex.what() << "\n";
REQUIRE(false);
mapnik::geometry::line_string<double> line;
line.add_coord(0, 0);
line.add_coord(25, 25);
line.add_coord(50, 50);
REQUIRE(mapnik::geometry::centroid(line, centroid));
REQUIRE( centroid.x == 25 );
REQUIRE( centroid.y == 25 );
}
}
}

View file

@ -17,10 +17,8 @@
#include <sstream>
#include <fstream>
#include <vector>
#include <algorithm>
// agg
#include "agg_conv_clip_polygon.h"
#include "agg_conv_clip_polyline.h"
template <typename T>

View file

@ -1,17 +1,12 @@
#include "catch.hpp"
// mapnik
#include <mapnik/global.hpp>
#include <mapnik/coord.hpp>
#include <mapnik/vertex_cache.hpp>
// stl
#include <stdexcept>
#include <iostream>
#include <fstream>
#include <vector>
#include <tuple>
#include <algorithm>
struct fake_path
{

View file

@ -1,18 +1,13 @@
#include "catch.hpp"
// mapnik
#include <mapnik/global.hpp>
#include <mapnik/coord.hpp>
#include <mapnik/vertex.hpp>
#include <mapnik/offset_converter.hpp>
// stl
#include <stdexcept>
#include <iostream>
#include <fstream>
#include <vector>
#include <tuple>
#include <algorithm>
namespace offset_test {

View file

@ -1,15 +1,9 @@
#include "catch.hpp"
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <mapnik/layer.hpp>
#include <mapnik/wkt/wkt_factory.hpp>
#include <mapnik/wkt/wkt_generator_grammar.hpp>
#include <mapnik/simplify.hpp>
#include <mapnik/simplify_converter.hpp>
//#include <mapnik/wkt/wkt_factory.hpp>
//#include <mapnik/wkt/wkt_generator_grammar.hpp>
//#include <mapnik/simplify.hpp>
//#include <mapnik/simplify_converter.hpp>
// stl
#include <stdexcept>