[test] Fix polygon construction to compile with clang 3.9.x

This commit is contained in:
Dane Springmeyer
2017-01-12 14:44:29 -08:00
committed by John Firebaugh
parent 42ad77a888
commit 3a0abdd3a7

View File

@@ -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();