diff options
author | Jesse Crocker <jesse@gaiagps.com> | 2017-03-01 16:26:49 -0700 |
---|---|---|
committer | Jesse Crocker <jesse@gaiagps.com> | 2017-03-01 16:26:49 -0700 |
commit | f01e1f2bf53c09cf2f295c10677b93d15b00e56c (patch) | |
tree | 612ff819cd70f93147573af0c74fbd2b3b68b536 | |
parent | 3fcb46f48c933012cf0ad5495a538f26f03863a3 (diff) | |
download | qtlocation-mapboxgl-f01e1f2bf53c09cf2f295c10677b93d15b00e56c.tar.gz |
First test for CustomVectorSource
-rw-r--r-- | cmake/test-files.cmake | 1 | ||||
-rw-r--r-- | test/style/custom_vector_source.test.cpp | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/cmake/test-files.cmake b/cmake/test-files.cmake index 59929bbb70..c991c61dba 100644 --- a/cmake/test-files.cmake +++ b/cmake/test-files.cmake @@ -80,6 +80,7 @@ set(MBGL_TEST_FILES test/style/conversion/stringify.test.cpp # style + test/style/custom_vector_source.test.cpp test/style/filter.test.cpp # style/function diff --git a/test/style/custom_vector_source.test.cpp b/test/style/custom_vector_source.test.cpp new file mode 100644 index 0000000000..2b69737c1f --- /dev/null +++ b/test/style/custom_vector_source.test.cpp @@ -0,0 +1,22 @@ +#include <mbgl/test/util.hpp> +#include <mbgl/style/sources/geojson_source.hpp> + + +#include <mbgl/style/sources/custom_vector_source.hpp> + +using namespace mbgl; + + +TEST(CustomVectorSource, EmptyData) { + mbgl::style::GeoJSONOptions options; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-parameter" + const auto callback = ^void(uint8_t z, uint32_t x, uint32_t y) {}; +#pragma clang diagnostic pop + + auto testSource = std::make_unique<mbgl::style::CustomVectorSource>("source", options, callback); + + mbgl::FeatureCollection featureCollection; + testSource->setTileData(0, 0, 0, mbgl::GeoJSON{featureCollection}); +} |