forked from AuroraMiddleware/gtk
Add tests for the GtkCellLayout builder parser
These tests check various error conditions in GtkCellLayout custom tags.
This commit is contained in:
parent
5e7fd924c4
commit
d416f352ad
@ -178,6 +178,13 @@ test_ui = \
|
||||
ui/label3.ui ui/label3.expected \
|
||||
ui/label4.ui ui/label4.expected \
|
||||
ui/label5.ui ui/label5.expected \
|
||||
ui/celllayout1.ui ui/celllayout1.expected \
|
||||
ui/celllayout2.ui ui/celllayout2.expected \
|
||||
ui/celllayout3.ui ui/celllayout3.expected \
|
||||
ui/celllayout4.ui ui/celllayout4.expected \
|
||||
ui/celllayout5.ui ui/celllayout5.expected \
|
||||
ui/celllayout6.ui ui/celllayout6.expected \
|
||||
ui/celllayout7.ui ui/celllayout7.expected \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
1
testsuite/gtk/ui/celllayout1.expected
Normal file
1
testsuite/gtk/ui/celllayout1.expected
Normal file
@ -0,0 +1 @@
|
||||
SUCCESS
|
16
testsuite/gtk/ui/celllayout1.ui
Normal file
16
testsuite/gtk/ui/celllayout1.ui
Normal file
@ -0,0 +1,16 @@
|
||||
<!-- test valid cell layout custom tags -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
<cell-packing>
|
||||
<property name="align" translatable="yes" comments="foo" context="bar">True</property>
|
||||
<property name="expand">False</property>
|
||||
</cell-packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout2.expected
Normal file
2
testsuite/gtk/ui/celllayout2.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 6
|
||||
.:9:1 Could not parse integer `blue'
|
12
testsuite/gtk/ui/celllayout2.ui
Normal file
12
testsuite/gtk/ui/celllayout2.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout attribute value -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">blue</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout3.expected
Normal file
2
testsuite/gtk/ui/celllayout3.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 4
|
||||
.:8:45 attribute 'food' invalid for element 'attribute'
|
12
testsuite/gtk/ui/celllayout3.ui
Normal file
12
testsuite/gtk/ui/celllayout3.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout attribute name -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text" food="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout4.expected
Normal file
2
testsuite/gtk/ui/celllayout4.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:8:17 Unsupported tag for GtkCellLayout: <warbl>
|
12
testsuite/gtk/ui/celllayout4.ui
Normal file
12
testsuite/gtk/ui/celllayout4.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout attribute -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<attributes>
|
||||
<warbl/>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout5.expected
Normal file
2
testsuite/gtk/ui/celllayout5.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
Unhandled tag: <warbl>
|
12
testsuite/gtk/ui/celllayout5.ui
Normal file
12
testsuite/gtk/ui/celllayout5.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout attribute -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<attributes>
|
||||
</attributes>
|
||||
<warbl/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout6.expected
Normal file
2
testsuite/gtk/ui/celllayout6.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: g-markup-error-quark 4
|
||||
.:8:44 attribute 'food' invalid for element 'property'
|
12
testsuite/gtk/ui/celllayout6.ui
Normal file
12
testsuite/gtk/ui/celllayout6.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout custom attribute value -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<cell-packing>
|
||||
<property name="name" food="food">1</property>
|
||||
</cell-packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
2
testsuite/gtk/ui/celllayout7.expected
Normal file
2
testsuite/gtk/ui/celllayout7.expected
Normal file
@ -0,0 +1,2 @@
|
||||
ERROR: gtk-builder-error-quark 1
|
||||
.:8:17 Unsupported tag for GtkCellLayout: <warbl>
|
12
testsuite/gtk/ui/celllayout7.ui
Normal file
12
testsuite/gtk/ui/celllayout7.ui
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- test invalid cell layout custom element -->
|
||||
<interface>
|
||||
<object class="GtkIconView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
</object>
|
||||
<cell-packing>
|
||||
<warbl/>
|
||||
</cell-packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user