Add tests for GtkLevelBar builder parser

This commit is contained in:
Matthias Clasen 2015-04-26 11:45:21 -04:00
parent afd6621743
commit f11fedb719
13 changed files with 65 additions and 0 deletions

View File

@ -192,6 +192,12 @@ test_ui = \
ui/scale5.ui ui/scale5.expected \
ui/scale6.ui ui/scale6.expected \
ui/scale7.ui ui/scale7.expected \
ui/levelbar1.ui ui/levelbar1.expected \
ui/levelbar2.ui ui/levelbar2.expected \
ui/levelbar3.ui ui/levelbar3.expected \
ui/levelbar4.ui ui/levelbar4.expected \
ui/levelbar5.ui ui/levelbar5.expected \
ui/levelbar6.ui ui/levelbar6.expected \
$(NULL)
EXTRA_DIST += \

View File

@ -0,0 +1 @@
SUCCESS

View File

@ -0,0 +1,8 @@
<!-- test all valid levelbar markup -->
<interface>
<object class="GtkLevelBar">
<offsets>
<offset name="one" value="1"/>
</offsets>
</object>
</interface>

View File

@ -0,0 +1,2 @@
ERROR: g-markup-error-quark 6
.:5:27 element 'offset' requires attribute 'value'

View File

@ -0,0 +1,8 @@
<!-- missing levelbar attribute -->
<interface>
<object class="GtkLevelBar">
<offsets>
<offset name="one"/>
</offsets>
</object>
</interface>

View File

@ -0,0 +1,2 @@
ERROR: g-markup-error-quark 6
.:5:26 element 'offset' requires attribute 'name'

View File

@ -0,0 +1,8 @@
<!-- missing levelbar offset attribute -->
<interface>
<object class="GtkLevelBar">
<offsets>
<offset value="1"/>
</offsets>
</object>
</interface>

View File

@ -0,0 +1,2 @@
ERROR: gtk-builder-error-quark 6
.:5:41 Could not parse double `xyzzy'

View File

@ -0,0 +1,8 @@
<!-- invalid levelbar attribute value -->
<interface>
<object class="GtkLevelBar">
<offsets>
<offset name="one" value="xyzzy"/>
</offsets>
</object>
</interface>

View File

@ -0,0 +1,2 @@
ERROR: gtk-builder-error-quark 1
.:5:15 Unsupported tag for GtkLevelBar: <warbl>

View File

@ -0,0 +1,8 @@
<!-- invalid element in levelbar markup -->
<interface>
<object class="GtkLevelBar">
<offsets>
<warbl/>
</offsets>
</object>
</interface>

View File

@ -0,0 +1,2 @@
ERROR: gtk-builder-error-quark 1
Unhandled tag: <warbl>

View File

@ -0,0 +1,8 @@
<!-- invalid element in levelbar markup -->
<interface>
<object class="GtkLevelBar">
<offsets>
</offsets>
<warbl/>
</object>
</interface>