diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:46:45 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:47:35 -0700 |
commit | 1fb96d38a0036532ed8d9f5a818d8aabdfa942da (patch) | |
tree | 1640d3ece3a35890e8cc51df1c97482f423eef4e | |
parent | 2c8d225cf2fc50093bf076e5db3c3d4361403c50 (diff) | |
download | qtlocation-mapboxgl-1fb96d38a0036532ed8d9f5a818d8aabdfa942da.tar.gz |
[tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 2 | ||||
-rw-r--r-- | test/api/annotations.cpp | 2 | ||||
-rw-r--r-- | test/fixtures/annotations/line_annotation/expected.png | bin | 2088 -> 2964 bytes |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index a2dc4c8093..283e736c6d 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -27,7 +27,7 @@ struct ToGeoJSONVT { geojsonvt::ProjectedFeature operator()(const LineString<double>& line) const { geojsonvt::ProjectedRings converted; - converted.push_back(convertPoints(geojsonvt::ProjectedFeatureType::Polygon, line)); + converted.push_back(convertPoints(geojsonvt::ProjectedFeatureType::LineString, line)); return convertFeature(geojsonvt::ProjectedFeatureType::LineString, converted); } diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp index 07e169cf94..ce5aaa8607 100644 --- a/test/api/annotations.cpp +++ b/test/api/annotations.cpp @@ -46,7 +46,7 @@ TEST(Annotations, SymbolAnnotation) { TEST(Annotations, LineAnnotation) { AnnotationTest test; - LineString<double> line = {{ { 0, 0 }, { 45, 45 } }}; + LineString<double> line = {{ { 0, 0 }, { 45, 45 }, { 30, 0 } }}; LineAnnotation annotation { line }; annotation.color = {{ 255, 0, 0, 1 }}; annotation.width = 5; diff --git a/test/fixtures/annotations/line_annotation/expected.png b/test/fixtures/annotations/line_annotation/expected.png Binary files differindex b86570f990..4f89e59318 100644 --- a/test/fixtures/annotations/line_annotation/expected.png +++ b/test/fixtures/annotations/line_annotation/expected.png |