pull data from test-data repo

This commit is contained in:
Dane Springmeyer 2015-04-26 20:23:02 +02:00
parent 8a64d6aeba
commit d83afb3c75
9 changed files with 28 additions and 25 deletions

View file

@ -30,6 +30,7 @@ script:
- source bootstrap.sh
- if [[ ${COVERAGE} == true ]]; then ./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True; else ./configure; fi;
- make
- git clone --depth=1 https://github.com/mapnik/test-data test-data
- git clone --depth=1 https://github.com/mapbox/mapnik-test-data tests/data/mapnik-test-data
- make test
- if [[ ${COVERAGE} == true ]]; then

View file

@ -86,12 +86,12 @@ SECTION("registration") {
REQUIRE( mapnik::freetype_engine::face_names().size() == 0 );
// bogus, emtpy file that looks like font
REQUIRE( mapnik::freetype_engine::register_font("tests/data/fonts/fake.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_fonts("tests/data/fonts/fake.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_font("test-data/fonts/fake.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_fonts("test-data/fonts/fake.ttf") == false );
REQUIRE( mapnik::freetype_engine::face_names().size() == 0 );
REQUIRE( mapnik::freetype_engine::register_font("tests/data/fonts/intentionally-broken.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_fonts("tests/data/fonts/intentionally-broken.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_font("test-data/fonts/intentionally-broken.ttf") == false );
REQUIRE( mapnik::freetype_engine::register_fonts("test-data/fonts/intentionally-broken.ttf") == false );
REQUIRE( mapnik::freetype_engine::face_names().size() == 0 );
// now restore the original severity
@ -109,7 +109,7 @@ SECTION("registration") {
REQUIRE( face_names.size() == 1 );
// single dejavu font in separate location
std::string dejavu_bold_oblique("tests/data/fonts/DejaVuSansMono-BoldOblique.ttf");
std::string dejavu_bold_oblique("test-data/fonts/DejaVuSansMono-BoldOblique.ttf");
REQUIRE( mapnik::freetype_engine::register_font(dejavu_bold_oblique) );
face_names = mapnik::freetype_engine::face_names();
REQUIRE( face_names.size() == 2 );
@ -164,7 +164,7 @@ SECTION("registration") {
// check that we can correctly read a .ttc containing
// multiple valid faces
// https://github.com/mapnik/mapnik/issues/2274
REQUIRE( mapnik::freetype_engine::register_font("tests/data/fonts/NotoSans-Regular.ttc") );
REQUIRE( mapnik::freetype_engine::register_font("test-data/fonts/NotoSans-Regular.ttc") );
face_names = mapnik::freetype_engine::face_names();
REQUIRE( face_names.size() == 24 );

View file

@ -9,7 +9,8 @@
TEST_CASE("geometry") {
SECTION("json point") {
mapnik::util::file input("./tests/data/json/fixtures/point1.json");
mapnik::util::file input("./test-data/json/point1.json");
REQUIRE( input.open() );
auto json = input.data();
mapnik::geometry::geometry<double> geom;
std::string json_string(json.get());
@ -23,7 +24,8 @@ SECTION("json point") {
}
SECTION("json point reversed") {
mapnik::util::file input("./tests/data/json/fixtures/point2.json");
mapnik::util::file input("./test-data/json/point2.json");
REQUIRE( input.open() );
auto json = input.data();
mapnik::geometry::geometry<double> geom;
std::string json_string(json.get());

View file

@ -21,7 +21,7 @@ SECTION("readers") {
try
{
#if defined(HAVE_JPEG)
should_throw = "./test/unit/data/blank.jpg";
should_throw = "./test-data/images/blank.jpg";
REQUIRE( mapnik::util::exists( should_throw ) );
type = mapnik::type_from_filename(should_throw);
REQUIRE( type );
@ -59,7 +59,7 @@ SECTION("readers") {
#endif
#if defined(HAVE_PNG)
should_throw = "./test/unit/data/blank.png";
should_throw = "./test-data/images/blank.png";
REQUIRE( mapnik::util::exists( should_throw ) );
type = mapnik::type_from_filename(should_throw);
REQUIRE( type );
@ -73,7 +73,7 @@ SECTION("readers") {
REQUIRE( true );
}
should_throw = "./tests/data/images/xcode-CgBI.png";
should_throw = "./test-data/images/xcode-CgBI.png";
REQUIRE( mapnik::util::exists( should_throw ) );
type = mapnik::type_from_filename(should_throw);
REQUIRE( type );
@ -89,7 +89,7 @@ SECTION("readers") {
#endif
#if defined(HAVE_TIFF)
should_throw = "./test/unit/data/blank.tiff";
should_throw = "./test-data/images/blank.tiff";
REQUIRE( mapnik::util::exists( should_throw ) );
type = mapnik::type_from_filename(should_throw);
REQUIRE( type );
@ -105,7 +105,7 @@ SECTION("readers") {
#endif
#if defined(HAVE_WEBP)
should_throw = "./test/unit/data/blank.webp";
should_throw = "./test-data/images/blank.webp";
REQUIRE( mapnik::util::exists( should_throw ) );
type = mapnik::type_from_filename(should_throw);
REQUIRE( type );

View file

@ -59,7 +59,7 @@
TEST_CASE("tiff io") {
SECTION("scan rgb8 striped") {
std::string filename("./tests/data/tiff/scan_512x512_rgb8_striped.tif");
std::string filename("./test-data/tiff/scan_512x512_rgb8_striped.tif");
mapnik::tiff_reader<boost::iostreams::file_source> tiff_reader(filename);
REQUIRE( tiff_reader.width() == 512 );
REQUIRE( tiff_reader.height() == 512 );
@ -89,7 +89,7 @@ SECTION("scan rgb8 striped") {
}
SECTION("scan rgb8 tiled") {
std::string filename("./tests/data/tiff/scan_512x512_rgb8_tiled.tif");
std::string filename("./test-data/tiff/scan_512x512_rgb8_tiled.tif");
mapnik::tiff_reader<boost::iostreams::file_source> tiff_reader(filename);
REQUIRE( tiff_reader.width() == 512 );
REQUIRE( tiff_reader.height() == 512 );
@ -119,7 +119,7 @@ SECTION("scan rgb8 tiled") {
}
SECTION("rgba8 striped") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_rgba8_striped.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_rgba8_striped.tif")
REQUIRE( tiff_reader.rows_per_strip() == 1 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == false );
@ -135,7 +135,7 @@ SECTION("rgba8 striped") {
}
SECTION("rgba8 tiled") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_rgba8_tiled.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_rgba8_tiled.tif")
REQUIRE( tiff_reader.rows_per_strip() == 0 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == true );
@ -151,7 +151,7 @@ SECTION("rgba8 tiled") {
}
SECTION("rgb8 striped") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_rgb8_striped.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_rgb8_striped.tif")
REQUIRE( tiff_reader.rows_per_strip() == 10 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == false );
@ -167,7 +167,7 @@ SECTION("rgb8 striped") {
}
SECTION("rgb8 tiled") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_rgb8_tiled.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_rgb8_tiled.tif")
REQUIRE( tiff_reader.rows_per_strip() == 0 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == true );
@ -183,7 +183,7 @@ SECTION("rgb8 tiled") {
}
SECTION("gray8 striped") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray8_striped.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray8_striped.tif")
REQUIRE( tiff_reader.rows_per_strip() == 32 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == false );
@ -199,7 +199,7 @@ SECTION("gray8 striped") {
}
SECTION("gray8 tiled") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray8_tiled.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray8_tiled.tif")
REQUIRE( tiff_reader.rows_per_strip() == 0 );
REQUIRE( tiff_reader.bits_per_sample() == 8 );
REQUIRE( tiff_reader.is_tiled() == true );
@ -215,7 +215,7 @@ SECTION("gray8 tiled") {
}
SECTION("gray16 striped") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray16_striped.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray16_striped.tif")
REQUIRE( tiff_reader.rows_per_strip() == 16 );
REQUIRE( tiff_reader.bits_per_sample() == 16 );
REQUIRE( tiff_reader.is_tiled() == false );
@ -231,7 +231,7 @@ SECTION("gray16 striped") {
}
SECTION("gray16 tiled") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray16_tiled.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray16_tiled.tif")
REQUIRE( tiff_reader.rows_per_strip() == 0 );
REQUIRE( tiff_reader.bits_per_sample() == 16 );
REQUIRE( tiff_reader.is_tiled() == true );
@ -247,7 +247,7 @@ SECTION("gray16 tiled") {
}
SECTION("gray32f striped") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray32f_striped.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray32f_striped.tif")
REQUIRE( tiff_reader.rows_per_strip() == 8 );
REQUIRE( tiff_reader.bits_per_sample() == 32 );
REQUIRE( tiff_reader.is_tiled() == false );
@ -263,7 +263,7 @@ SECTION("gray32f striped") {
}
SECTION("gray32f tiled") {
TIFF_ASSERT("./tests/data/tiff/ndvi_256x256_gray32f_tiled.tif")
TIFF_ASSERT("./test-data/tiff/ndvi_256x256_gray32f_tiled.tif")
REQUIRE( tiff_reader.rows_per_strip() == 0 );
REQUIRE( tiff_reader.bits_per_sample() == 32 );
REQUIRE( tiff_reader.is_tiled() == true );