mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
validation: Writable/construct-only properties
Add two new errors, one for non-writable properties and another for binding construct-only properties.
This commit is contained in:
parent
3b39e0d541
commit
f78478bea1
5 changed files with 31 additions and 1 deletions
6
tests/sample_errors/read_only_properties.blp
Normal file
6
tests/sample_errors/read_only_properties.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
ComboBox combo_box {
|
||||
has-entry: bind combo_box.visible;
|
||||
scale-factor: 2;
|
||||
}
|
2
tests/sample_errors/read_only_properties.err
Normal file
2
tests/sample_errors/read_only_properties.err
Normal file
|
@ -0,0 +1,2 @@
|
|||
4,14,4,ComboBox.has-entry can't be bound because it is construct-only
|
||||
5,3,12,Widget.scale-factor is not writable
|
|
@ -190,6 +190,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample_error("obj_in_string_list")
|
||||
self.assert_sample_error("obj_prop_type")
|
||||
self.assert_sample_error("property_dne")
|
||||
self.assert_sample_error("read_only_properties")
|
||||
self.assert_sample_error("signal_dne")
|
||||
self.assert_sample_error("signal_object_dne")
|
||||
self.assert_sample_error("size_group_non_widget")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue