blob: 3b1d3be337b4e150c800e8d0428bdbb43b49848b (
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
|
#include <mbgl/test/util.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/layer/background_layer.hpp>
using namespace mbgl;
TEST(StyleLayer, Create) {
std::unique_ptr<StyleLayer> layer = std::make_unique<BackgroundLayer>();
EXPECT_TRUE(reinterpret_cast<BackgroundLayer*>(layer.get()));
}
TEST(StyleLayer, Clone) {
std::unique_ptr<StyleLayer> layer = std::make_unique<BackgroundLayer>();
std::unique_ptr<StyleLayer> clone = layer->clone();
EXPECT_NE(layer.get(), clone.get());
EXPECT_TRUE(reinterpret_cast<BackgroundLayer*>(layer.get()));
}
TEST(StyleLayer, CloneCopiesBaseProperties) {
std::unique_ptr<BackgroundLayer> layer = std::make_unique<BackgroundLayer>();
layer->id = "test";
EXPECT_EQ("test", layer->clone()->id);
}
|