#include #include #include #include using namespace mbgl; using namespace mbgl::style; using namespace mbgl::style::conversion; using namespace std::literals::chrono_literals; std::unique_ptr parseLayer(const std::string& src) { Error error; return std::move(*convertJSON>(src, error)); } TEST(StyleConversion, LayerTransition) { auto layer = parseLayer(R"JSON({ "type": "background", "id": "background", "paint": { "background-color-transition": { "duration": 400, "delay": 500 } } })JSON"); ASSERT_EQ(400ms, *layer->as()->impl().paint .get().options.duration); ASSERT_EQ(500ms, *layer->as()->impl().paint .get().options.delay); }