mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Make ComponentDefinition::properties only list the public properties as it should
Fixes #242
This commit is contained in:
parent
ea8e8318b6
commit
236011d17c
4 changed files with 47 additions and 2 deletions
|
@ -314,6 +314,23 @@ SCENARIO("Component Definition Properties")
|
|||
REQUIRE(properties[0].property_type == Value::Type::String);
|
||||
}
|
||||
|
||||
SCENARIO("Component Definition Properties / Two-way bindings")
|
||||
{
|
||||
using namespace sixtyfps::interpreter;
|
||||
using namespace sixtyfps;
|
||||
|
||||
ComponentCompiler compiler;
|
||||
auto comp_def = *compiler.build_from_source(
|
||||
"export Dummy := Rectangle { property <string> test <=> sub_object.test; "
|
||||
" sub_object := Rectangle { property <string> test; }"
|
||||
"}",
|
||||
"");
|
||||
auto properties = comp_def.properties();
|
||||
REQUIRE(properties.size() == 1);
|
||||
REQUIRE(properties[0].property_name == "test");
|
||||
REQUIRE(properties[0].property_type == Value::Type::String);
|
||||
}
|
||||
|
||||
SCENARIO("Invoke callback")
|
||||
{
|
||||
using namespace sixtyfps::interpreter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue