tests: Test custom types in lookup expressions

This commit is contained in:
James Westman 2022-04-30 16:13:40 -05:00
parent 76a482affb
commit cd33266452
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
11 changed files with 93 additions and 7 deletions

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
.MyWidget widget {}
.MyOtherWidget other_widget {
property: bind ((.MyObject) widget.something).other;
expr-prop: (.MyObject obj) => obj.other;
}

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="MyWidget" id="widget"></object>
<object class="MyOtherWidget" id="other_widget">
<binding name="property">
<lookup name="other" type="MyObject">
<lookup name="something" type="MyWidget">
<constant>widget</constant>
</lookup>
</lookup>
</binding>
<property name="expr-prop">
<lookup name="other" type="MyObject"/>
</property>
</object>
</interface>