|
|
|
|
@@ -31,7 +31,7 @@ void checkRendering(Map& map, const char * name) {
|
|
|
|
|
TEST(Annotations, PointAnnotation) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -44,7 +44,7 @@ TEST(Annotations, PointAnnotation) {
|
|
|
|
|
TEST(Annotations, LineAnnotation) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -63,7 +63,7 @@ TEST(Annotations, LineAnnotation) {
|
|
|
|
|
TEST(Annotations, FillAnnotation) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -81,7 +81,7 @@ TEST(Annotations, FillAnnotation) {
|
|
|
|
|
TEST(Annotations, StyleSourcedShapeAnnotation) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"), "");
|
|
|
|
|
@@ -96,7 +96,7 @@ TEST(Annotations, StyleSourcedShapeAnnotation) {
|
|
|
|
|
TEST(Annotations, AddMultiple) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -113,7 +113,7 @@ TEST(Annotations, AddMultiple) {
|
|
|
|
|
TEST(Annotations, NonImmediateAdd) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -133,7 +133,7 @@ TEST(Annotations, NonImmediateAdd) {
|
|
|
|
|
TEST(Annotations, UpdatePoint) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -152,7 +152,7 @@ TEST(Annotations, UpdatePoint) {
|
|
|
|
|
TEST(Annotations, RemovePoint) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
@@ -169,7 +169,7 @@ TEST(Annotations, RemovePoint) {
|
|
|
|
|
TEST(Annotations, RemoveShape) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
AnnotationSegments segments = {{ {{ { 0, 0 }, { 45, 45 } }} }};
|
|
|
|
|
|
|
|
|
|
@@ -191,7 +191,7 @@ TEST(Annotations, RemoveShape) {
|
|
|
|
|
TEST(Annotations, ImmediateRemoveShape) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
|
|
|
|
|
map.removeAnnotation(map.addShapeAnnotation(ShapeAnnotation({}, {})));
|
|
|
|
|
@@ -203,7 +203,7 @@ TEST(Annotations, ImmediateRemoveShape) {
|
|
|
|
|
TEST(Annotations, SwitchStyle) {
|
|
|
|
|
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
|
|
|
|
HeadlessView view(display, 1);
|
|
|
|
|
OnlineFileSource fileSource(nullptr);
|
|
|
|
|
OnlineFileSource fileSource;
|
|
|
|
|
|
|
|
|
|
Map map(view, fileSource, MapMode::Still);
|
|
|
|
|
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
|
|
|
|
|