mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Add the boilerplate for Struct in C++
This commit is contained in:
parent
533b7f05ce
commit
02c1150fa7
3 changed files with 118 additions and 11 deletions
|
@ -113,4 +113,15 @@ SCENARIO("Value API")
|
|||
REQUIRE(brush_opt.has_value());
|
||||
REQUIRE(brush_opt.value() == brush);
|
||||
}
|
||||
|
||||
SECTION("Construct a struct")
|
||||
{
|
||||
REQUIRE(!value.to_struct().has_value());
|
||||
sixtyfps::interpreter::Struct struc;
|
||||
value = Value(struc);
|
||||
REQUIRE(value.type() == Value::Type::Struct);
|
||||
|
||||
auto struct_opt = value.to_struct();
|
||||
REQUIRE(struct_opt.has_value());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue