mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-06 16:19:07 -04:00
Validate parent object for accessibility and layout
This commit is contained in:
parent
2224f0958c
commit
e759569c3f
8 changed files with 40 additions and 4 deletions
6
tests/sample_errors/a11y_in_non_widget.blp
Normal file
6
tests/sample_errors/a11y_in_non_widget.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
using GObject 2.0;
|
||||
|
||||
GObject.Object {
|
||||
accessibility {}
|
||||
}
|
1
tests/sample_errors/a11y_in_non_widget.err
Normal file
1
tests/sample_errors/a11y_in_non_widget.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,3,13,GObject.Object is not a Gtk.Widget, so it doesn't have accessibility properties
|
6
tests/sample_errors/layout_in_non_widget.blp
Normal file
6
tests/sample_errors/layout_in_non_widget.blp
Normal file
|
@ -0,0 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
using GObject 2.0;
|
||||
|
||||
GObject.Object {
|
||||
layout {}
|
||||
}
|
1
tests/sample_errors/layout_in_non_widget.err
Normal file
1
tests/sample_errors/layout_in_non_widget.err
Normal file
|
@ -0,0 +1 @@
|
|||
5,3,6,GObject.Object is not a Gtk.Widget, so it doesn't have layout properties
|
|
@ -112,6 +112,7 @@ class TestSamples(unittest.TestCase):
|
|||
|
||||
|
||||
def test_sample_errors(self):
|
||||
self.assert_sample_error("a11y_in_non_widget")
|
||||
self.assert_sample_error("a11y_prop_dne")
|
||||
self.assert_sample_error("a11y_prop_obj_dne")
|
||||
self.assert_sample_error("a11y_prop_type")
|
||||
|
@ -120,6 +121,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample_error("duplicate_obj_id")
|
||||
self.assert_sample_error("enum_member_dne")
|
||||
self.assert_sample_error("invalid_bool")
|
||||
self.assert_sample_error("layout_in_non_widget")
|
||||
self.assert_sample_error("ns_not_imported")
|
||||
self.assert_sample_error("not_a_class")
|
||||
self.assert_sample_error("object_dne")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue