diff options
author | zmiao <miao.zhao@mapbox.com> | 2020-01-29 12:46:16 +0200 |
---|---|---|
committer | zmiao <miao.zhao@mapbox.com> | 2020-02-12 12:24:05 +0200 |
commit | 3e99c08ea610d791b21f1631308451687c464d98 (patch) | |
tree | c7f3e20ad9ddc161ab3378d37bde9aa31675da83 /test/gl | |
parent | 4f18d5fa92df175ac30f856a9273a00349b56cc3 (diff) | |
download | qtlocation-mapboxgl-3e99c08ea610d791b21f1631308451687c464d98.tar.gz |
Enable parse within expression
Add geometry type checker
Diffstat (limited to 'test/gl')
-rw-r--r-- | test/gl/bucket.test.cpp | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp index c7636dabcf..9f780fcffa 100644 --- a/test/gl/bucket.test.cpp +++ b/test/gl/bucket.test.cpp @@ -52,8 +52,12 @@ TEST(Buckets, CircleBucket) { ASSERT_FALSE(bucket.needsUpload()); GeometryCollection point { { { 0, 0 } } }; - bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, point, properties}, point, {}, PatternLayerMap(), - 0); + bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, point, properties}, + point, + {}, + PatternLayerMap(), + 0, + CanonicalTileID(0, 0, 0)); ASSERT_TRUE(bucket.hasData()); ASSERT_TRUE(bucket.needsUpload()); @@ -75,8 +79,12 @@ TEST(Buckets, FillBucket) { ASSERT_FALSE(bucket.needsUpload()); GeometryCollection polygon { { { 0, 0 }, { 0, 1 }, { 1, 1 } } }; - bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Polygon, polygon, properties}, polygon, {}, - PatternLayerMap(), 0); + bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Polygon, polygon, properties}, + polygon, + {}, + PatternLayerMap(), + 0, + CanonicalTileID(0, 0, 0)); ASSERT_TRUE(bucket.hasData()); ASSERT_TRUE(bucket.needsUpload()); @@ -98,13 +106,21 @@ TEST(Buckets, LineBucket) { // Ignore invalid feature type. GeometryCollection point { { { 0, 0 } } }; - bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, point, properties}, point, {}, PatternLayerMap(), - 0); + bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, point, properties}, + point, + {}, + PatternLayerMap(), + 0, + CanonicalTileID(0, 0, 0)); ASSERT_FALSE(bucket.hasData()); GeometryCollection line { { { 0, 0 }, { 1, 1 } } }; - bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::LineString, line, properties}, line, {}, - PatternLayerMap(), 1); + bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::LineString, line, properties}, + line, + {}, + PatternLayerMap(), + 1, + CanonicalTileID(0, 0, 0)); ASSERT_TRUE(bucket.hasData()); ASSERT_TRUE(bucket.needsUpload()); @@ -152,8 +168,12 @@ TEST(Buckets, SymbolBucket) { // SymbolBucket::addFeature() is a no-op. GeometryCollection point { { { 0, 0 } } }; - bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, std::move(point), properties}, point, {}, - PatternLayerMap(), 0); + bucket.addFeature(StubGeometryTileFeature{{}, FeatureType::Point, std::move(point), properties}, + point, + {}, + PatternLayerMap(), + 0, + CanonicalTileID(0, 0, 0)); ASSERT_FALSE(bucket.hasData()); ASSERT_FALSE(bucket.needsUpload()); |