summaryrefslogtreecommitdiff
path: root/test/gl/bucket.test.cpp
blob: 1ab6623122a8a2e4173c9a118ba8aef785ed7414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <mbgl/test/util.hpp>

#include <mbgl/renderer/circle_bucket.hpp>
#include <mbgl/renderer/fill_bucket.hpp>
#include <mbgl/renderer/line_bucket.hpp>
#include <mbgl/renderer/symbol_bucket.hpp>
#include <mbgl/style/bucket_parameters.hpp>
#include <mbgl/style/layers/symbol_layer_properties.hpp>

#include <mbgl/map/mode.hpp>

using namespace mbgl;

TEST(Buckets, CircleBucket) {
    CircleBucket bucket { { {0, 0, 0}, MapMode::Still }, {} };
    ASSERT_FALSE(bucket.hasData());
}

TEST(Buckets, FillBucket) {
    FillBucket bucket { { {0, 0, 0}, MapMode::Still }, {} };
    ASSERT_FALSE(bucket.hasData());
}

TEST(Buckets, LineBucket) {
    LineBucket bucket { { {0, 0, 0}, MapMode::Still }, {}, {} };
    ASSERT_FALSE(bucket.hasData());
}

TEST(Buckets, SymbolBucket) {
    style::SymbolLayoutProperties::PossiblyEvaluated layout;
    bool sdfIcons = false;
    bool iconsNeedLinear = false;

    SymbolBucket bucket { layout, {}, 0, sdfIcons, iconsNeedLinear };
    ASSERT_FALSE(bucket.hasIconData());
    ASSERT_FALSE(bucket.hasTextData());
    ASSERT_FALSE(bucket.hasCollisionBoxData());
}