Add missing C++ sixtyfps::ComponentDefinition::name()

It was already present in Rust
This commit is contained in:
Simon Hausmann 2021-06-07 11:30:22 +02:00
parent 6a4cd0087f
commit fb19588c8c
3 changed files with 29 additions and 2 deletions

View file

@ -404,3 +404,13 @@ SCENARIO("Array between .60 and C++")
REQUIRE(actual_array == cpp_array);
}
}
SCENARIO("Component Definition Name")
{
using namespace sixtyfps::interpreter;
using namespace sixtyfps;
ComponentCompiler compiler;
auto comp_def = *compiler.build_from_source("export IHaveAName := Rectangle { }", "");
REQUIRE(comp_def.name() == "IHaveAName");
}