[glib] compile schemas test: open ranges for all types



commit d95b750a1d936d962b4c00be2d65ea1606f143cb
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Mar 31 15:12:34 2011 +0530

    compile schemas test: open ranges for all types
    
    We need to make sure that every value in the table actually parses with
    GVariant.

 gio/tests/gschema-compile.c                        |    3 +-
 gio/tests/schema-tests/range-type-test.gschema.xml |   76 ++++++++++++++++++++
 2 files changed, 78 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c
index 65c5c3a..ee40974 100644
--- a/gio/tests/gschema-compile.c
+++ b/gio/tests/gschema-compile.c
@@ -118,7 +118,8 @@ static const SchemaTest tests[] = {
   { "flags-more-than-one-bit",      NULL, "*flags values must have at most 1 bit set*"          },
   { "flags-with-enum-attr",         NULL, "*<enum id='flags'> not (yet) defined*"               },
   { "flags-with-enum-tag",          NULL, "*<flags id='flags'> not (yet) defined*"              },
-  { "inherit-gettext-domain",       NULL, NULL                                                  }
+  { "inherit-gettext-domain",       NULL, NULL                                                  },
+  { "range-type-test",              NULL, NULL                                                  }
 };
 
 
diff --git a/gio/tests/schema-tests/range-type-test.gschema.xml b/gio/tests/schema-tests/range-type-test.gschema.xml
new file mode 100644
index 0000000..80072bb
--- /dev/null
+++ b/gio/tests/schema-tests/range-type-test.gschema.xml
@@ -0,0 +1,76 @@
+<schemalist>
+  <schema id="test">
+
+    <key name="y-min" type="y">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="y-max" type="y">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="n-min" type="n">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="n-max" type="n">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="q-min" type="q">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="q-max" type="q">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="i-min" type="i">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="i-max" type="i">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="u-min" type="u">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="u-max" type="u">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="x-min" type="x">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="x-max" type="x">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="t-min" type="t">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="t-max" type="t">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+
+    <key name="d-min" type="d">
+      <range min="0"/>
+      <default>0</default>
+    </key>
+    <key name="d-max" type="d">
+      <range max="0"/>
+      <default>0</default>
+    </key>
+  </schema>
+</schemalist>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]