diff options
author | Dane Springmeyer <dane@mapbox.com> | 2017-01-12 14:44:29 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-28 10:13:35 -0700 |
commit | cfb26c0a7951e773ca3d01d692e988a2f060b244 (patch) | |
tree | a61c7ba7d801053bfa3de538b2579bbdd3985192 | |
parent | 348cffa1195e605d8012c2339a2b480727b59fba (diff) | |
download | qtlocation-mapboxgl-cfb26c0a7951e773ca3d01d692e988a2f060b244.tar.gz |
[test] Fix polygon construction to compile with clang 3.9.x
-rw-r--r-- | test/api/annotations.test.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp index 30027d8610..87d64d53de 100644 --- a/test/api/annotations.test.cpp +++ b/test/api/annotations.test.cpp @@ -73,7 +73,7 @@ TEST(Annotations, LineAnnotation) { TEST(Annotations, FillAnnotation) { AnnotationTest test; - Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; FillAnnotation annotation { polygon }; annotation.color = Color::red(); @@ -98,7 +98,7 @@ TEST(Annotations, AntimeridianAnnotationSmall) { lineAnnotation.width = { 2 }; test.map.addAnnotation(lineAnnotation); - Polygon<double> polygon = {{ {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} }}; + Polygon<double> polygon = { {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} }; FillAnnotation polygonAnnotation { polygon }; polygonAnnotation.color = Color::blue(); test.map.addAnnotation(polygonAnnotation); @@ -119,7 +119,7 @@ TEST(Annotations, AntimeridianAnnotationLarge) { lineAnnotation.width = { 2 }; test.map.addAnnotation(lineAnnotation); - Polygon<double> polygon = {{ {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} }}; + Polygon<double> polygon = { {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} }; FillAnnotation polygonAnnotation { polygon }; polygonAnnotation.color = Color::blue(); test.map.addAnnotation(polygonAnnotation); @@ -130,7 +130,7 @@ TEST(Annotations, AntimeridianAnnotationLarge) { TEST(Annotations, OverlappingFillAnnotation) { AnnotationTest test; - Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; FillAnnotation underlaidAnnotation { polygon }; underlaidAnnotation.color = Color::green(); FillAnnotation overlaidAnnotation { polygon }; @@ -145,7 +145,7 @@ TEST(Annotations, OverlappingFillAnnotation) { TEST(Annotations, StyleSourcedShapeAnnotation) { AnnotationTest test; - Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; test.map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json")); test.map.addAnnotation(StyleSourcedAnnotation { polygon, "annotation" }); @@ -171,7 +171,7 @@ TEST(Annotations, NonImmediateAdd) { test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json")); test::render(test.map, test.view); - Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; FillAnnotation annotation { polygon }; annotation.color = Color::red(); @@ -245,7 +245,7 @@ TEST(Annotations, UpdateLineAnnotationStyle) { TEST(Annotations, UpdateFillAnnotationGeometry) { AnnotationTest test; - FillAnnotation annotation { Polygon<double> {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }} }; + FillAnnotation annotation { Polygon<double> { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} } }; annotation.color = Color::red(); test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json")); @@ -253,7 +253,7 @@ TEST(Annotations, UpdateFillAnnotationGeometry) { test::render(test.map, test.view); - annotation.geometry = Polygon<double> {{ {{ { 0, 0 }, { 0, 45 }, { 45, 0 } }} }}; + annotation.geometry = Polygon<double> { {{ { 0, 0 }, { 0, 45 }, { 45, 0 } }} }; test.map.updateAnnotation(fill, annotation); test.checkRendering("update_fill_geometry"); } @@ -261,7 +261,7 @@ TEST(Annotations, UpdateFillAnnotationGeometry) { TEST(Annotations, UpdateFillAnnotationStyle) { AnnotationTest test; - Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; FillAnnotation annotation { polygon }; annotation.color = Color::red(); |