mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add errors for duplicate properties and blocks
This commit is contained in:
parent
f18c8b7a2d
commit
824476bda1
12 changed files with 122 additions and 0 deletions
45
tests/sample_errors/duplicates.blp
Normal file
45
tests/sample_errors/duplicates.blp
Normal file
|
@ -0,0 +1,45 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Label {
|
||||
visible: true;
|
||||
visible: false;
|
||||
|
||||
styles [""]
|
||||
styles [""]
|
||||
|
||||
accessibility {
|
||||
label: "label";
|
||||
label: "label";
|
||||
}
|
||||
accessibility {}
|
||||
}
|
||||
|
||||
FileFilter {
|
||||
suffixes []
|
||||
patterns []
|
||||
mime-types []
|
||||
suffixes []
|
||||
patterns []
|
||||
mime-types []
|
||||
}
|
||||
|
||||
ComboBoxText {
|
||||
layout {
|
||||
orientation: vertical;
|
||||
orientation: vertical;
|
||||
}
|
||||
layout {}
|
||||
|
||||
items []
|
||||
items []
|
||||
}
|
||||
|
||||
SizeGroup {
|
||||
widgets []
|
||||
widgets []
|
||||
}
|
||||
|
||||
StringList {
|
||||
strings []
|
||||
strings []
|
||||
}
|
12
tests/sample_errors/duplicates.err
Normal file
12
tests/sample_errors/duplicates.err
Normal file
|
@ -0,0 +1,12 @@
|
|||
5,3,7,Duplicate property 'visible'
|
||||
8,3,6,Duplicate styles block
|
||||
12,5,5,Duplicate accessibility attribute 'label'
|
||||
14,3,13,Duplicate accessibility block
|
||||
21,3,8,Duplicate suffixes block
|
||||
22,3,8,Duplicate patterns block
|
||||
23,3,10,Duplicate mime-types block
|
||||
29,5,11,Duplicate layout property 'orientation'
|
||||
31,3,6,Duplicate layout block
|
||||
34,3,5,Duplicate items block
|
||||
39,3,7,Duplicate widgets block
|
||||
44,3,7,Duplicate strings block
|
|
@ -179,6 +179,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample_error("consecutive_unexpected_tokens")
|
||||
self.assert_sample_error("does_not_implement")
|
||||
self.assert_sample_error("duplicate_obj_id")
|
||||
self.assert_sample_error("duplicates")
|
||||
self.assert_sample_error("enum_member_dne")
|
||||
self.assert_sample_error("filters_in_non_file_filter")
|
||||
self.assert_sample_error("gtk_3")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue