summaryrefslogtreecommitdiff
path: root/test/gl/bucket.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/gl/bucket.test.cpp')
-rw-r--r--test/gl/bucket.test.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp
index 9b28b2e01a..04e6447ad8 100644
--- a/test/gl/bucket.test.cpp
+++ b/test/gl/bucket.test.cpp
@@ -52,7 +52,7 @@ TEST(Buckets, CircleBucket) {
ASSERT_FALSE(bucket.needsUpload());
GeometryCollection point { { { 0, 0 } } };
- bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point);
+ bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point, {}, PatternLayerMap());
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
@@ -64,14 +64,15 @@ TEST(Buckets, CircleBucket) {
TEST(Buckets, FillBucket) {
HeadlessBackend backend({ 512, 256 });
BackendScope scope { backend };
+ style::Properties<>::PossiblyEvaluated layout;
gl::Context context;
- FillBucket bucket { { {0, 0, 0}, MapMode::Static, 1.0 }, {} };
+ FillBucket bucket { layout, {}, 5.0f, 1};
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
GeometryCollection polygon { { { 0, 0 }, { 0, 1 }, { 1, 1 } } };
- bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Polygon, polygon, properties }, polygon);
+ bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Polygon, polygon, properties }, polygon, {}, PatternLayerMap());
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
@@ -82,19 +83,20 @@ TEST(Buckets, FillBucket) {
TEST(Buckets, LineBucket) {
HeadlessBackend backend({ 512, 256 });
BackendScope scope { backend };
+ style::LineLayoutProperties::PossiblyEvaluated layout;
gl::Context context;
- LineBucket bucket { { {0, 0, 0}, MapMode::Static, 1.0 }, {}, {} };
+ LineBucket bucket { layout, {}, 10.0f, 1 };
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
// Ignore invalid feature type.
GeometryCollection point { { { 0, 0 } } };
- bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point);
+ bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point, {}, PatternLayerMap());
ASSERT_FALSE(bucket.hasData());
GeometryCollection line { { { 0, 0 }, { 1, 1 } } };
- bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::LineString, line, properties }, line);
+ bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::LineString, line, properties }, line, {}, PatternLayerMap());
ASSERT_TRUE(bucket.hasData());
ASSERT_TRUE(bucket.needsUpload());
@@ -123,7 +125,7 @@ TEST(Buckets, SymbolBucket) {
// SymbolBucket::addFeature() is a no-op.
GeometryCollection point { { { 0, 0 } } };
- bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point);
+ bucket.addFeature(StubGeometryTileFeature { {}, FeatureType::Point, point, properties }, point, {}, PatternLayerMap());
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());