[core] Fix most identity function with default legacy expression tests

Add handling of default value to the conversion of legacy identity
functions. The color and enum tests still don't pass though.
This commit is contained in:
Ander Conselvan de Oliveira
2019-04-02 11:59:13 +03:00
parent 11055f9a88
commit 33cfd080c2
5 changed files with 62 additions and 32 deletions

View File

@@ -108,5 +108,5 @@ TEST(StyleConversion, FormattedIdentityFunction) {
auto fn1 = parseFunction(R"({ "property": "name", "type": "identity" })");
ASSERT_TRUE(bool(fn1));
ASSERT_TRUE(fn1->isExpression());
ASSERT_EQ(fn1->asExpression().getExpression(), *format(get(literal("name"))));
ASSERT_EQ(fn1->asExpression().getExpression().serialize(), format(get(literal("name")))->serialize());
}