From cfb26c0a7951e773ca3d01d692e988a2f060b244 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 12 Jan 2017 14:44:29 -0800 Subject: [test] Fix polygon construction to compile with clang 3.9.x --- test/api/annotations.test.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') 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 polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon 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 polygon = {{ {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} }}; + Polygon 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 polygon = {{ {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} }}; + Polygon 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 polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon 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 polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon 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 polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon 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 {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }} }; + FillAnnotation annotation { Polygon { {{ { 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 {{ {{ { 0, 0 }, { 0, 45 }, { 45, 0 } }} }}; + annotation.geometry = Polygon { {{ { 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 polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }}; + Polygon polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }; FillAnnotation annotation { polygon }; annotation.color = Color::red(); -- cgit v1.2.1