add custom imagery visual test

This commit is contained in:
Konstantin Käfer
2015-07-06 16:38:31 +02:00
parent c66ec8739b
commit 1f4b5e7736
6 changed files with 93 additions and 1 deletions

View File

@@ -150,7 +150,11 @@ TEST_P(HeadlessTest, render) {
map.setLatLngZoom(mbgl::LatLng(latitude, longitude), zoom);
map.setBearing(bearing);
map.renderStill([&](std::exception_ptr, std::unique_ptr<const StillImage> image) {
map.renderStill([&](std::exception_ptr error, std::unique_ptr<const StillImage> image) {
if (error) {
promise.set_exception(error);
return;
}
const std::string png = util::compress_png(image->width, image->height, image->pixels.get());
util::write_file("test/suite/tests/" + base + "/" + name + "/actual.png", png);
promise.set_value();