diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-05 14:37:49 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-06 16:17:58 +0300 |
commit | a1ed9f879408a12e462196d961075c2ae3d7486e (patch) | |
tree | c986802e5f39995981c94a32cb733d64142b7786 /test/gl | |
parent | 754d2f377aa1b8993ca5365109dfec98475e6de4 (diff) | |
download | qtlocation-mapboxgl-a1ed9f879408a12e462196d961075c2ae3d7486e.tar.gz |
[core] Don't upload empty buckets
Diffstat (limited to 'test/gl')
-rw-r--r-- | test/gl/bucket.test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp index ee9ea54414..feca82998f 100644 --- a/test/gl/bucket.test.cpp +++ b/test/gl/bucket.test.cpp @@ -16,16 +16,19 @@ using namespace mbgl; TEST(Buckets, CircleBucket) { CircleBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {} }; ASSERT_FALSE(bucket.hasData()); + ASSERT_FALSE(bucket.needsUpload()); } TEST(Buckets, FillBucket) { FillBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {} }; ASSERT_FALSE(bucket.hasData()); + ASSERT_FALSE(bucket.needsUpload()); } TEST(Buckets, LineBucket) { LineBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {}, {} }; ASSERT_FALSE(bucket.hasData()); + ASSERT_FALSE(bucket.needsUpload()); } TEST(Buckets, SymbolBucket) { @@ -37,6 +40,8 @@ TEST(Buckets, SymbolBucket) { ASSERT_FALSE(bucket.hasIconData()); ASSERT_FALSE(bucket.hasTextData()); ASSERT_FALSE(bucket.hasCollisionBoxData()); + ASSERT_FALSE(bucket.hasData()); + ASSERT_FALSE(bucket.needsUpload()); } TEST(Buckets, RasterBucket) { @@ -44,6 +49,7 @@ TEST(Buckets, RasterBucket) { UnassociatedImage rgba({ 1, 1 }); RasterBucket bucket = { std::move(rgba) }; + ASSERT_TRUE(bucket.hasData()); ASSERT_TRUE(bucket.needsUpload()); bucket.upload(context); |