Color class (#5361)

* Color class

* Switch to list initialization
This commit is contained in:
Young Hahn
2016-06-15 11:38:22 -04:00
committed by GitHub
parent fe64238b4c
commit 24b66bc8cd
40 changed files with 105 additions and 62 deletions

View File

@@ -9,6 +9,7 @@
#include <mbgl/util/io.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/util/color.hpp>
using namespace mbgl;
using namespace mbgl::style;
@@ -67,7 +68,7 @@ TEST(Map, AddLayer) {
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
auto layer = std::make_unique<BackgroundLayer>("background");
layer->setBackgroundColor({{{ 1, 0, 0, 1 }}});
layer->setBackgroundColor({{ 1, 0, 0, 1 }});
map.addLayer(std::move(layer));
test::checkImage("test/fixtures/map/add_layer", test::render(map));
@@ -80,7 +81,7 @@ TEST(Map, RemoveLayer) {
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
auto layer = std::make_unique<BackgroundLayer>("background");
layer->setBackgroundColor({{{ 1, 0, 0, 1 }}});
layer->setBackgroundColor({{ 1, 0, 0, 1 }});
map.addLayer(std::move(layer));
map.removeLayer("background");