[glib] tests/gdbus-introspection: Add a less trivial test case for _IGNORE_QUALIFIED



commit 5280c03368299bbb4f721f3e47213aa01d9d0142
Author: Colin Walters <walters verbum org>
Date:   Tue Oct 29 09:47:34 2013 -0400

    tests/gdbus-introspection: Add a less trivial test case for _IGNORE_QUALIFIED
    
    This is distilled from PackageKit which currently aborts on startup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665634

 gio/tests/gdbus-introspection.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/gio/tests/gdbus-introspection.c b/gio/tests/gdbus-introspection.c
index 3846efe..79daacb 100644
--- a/gio/tests/gdbus-introspection.c
+++ b/gio/tests/gdbus-introspection.c
@@ -259,10 +259,6 @@ test_default_direction (void)
   g_dbus_node_info_unref (info);
 }
 
-#if 0
-/* XXX: need to figure out how generous we want to be here */
-/* test that extraneous attributes are ignored
- */
 static void
 test_extra_data (void)
 {
@@ -270,11 +266,18 @@ test_extra_data (void)
   const gchar *data =
   "  <node>"
   "    <interface name='com.example.Frob' version='1.0'>"
-  "      <annotation name='foo' value='bar' extra='bla'/>"
-  "      <method name='PairReturn' anotherattribute='bla'>"
-  "        <annotation name='org.freedesktop.DBus.GLib.Async' value=''/>"
-  "        <arg type='u' name='somenumber' direction='in' spin='left'/>"
-  "        <arg type='s' name='somestring' direction='out'/>"
+  "      <doc:doc><doc:description><doc:para>Blah blah</doc:para></doc:description></doc:doc>"
+  "      <method name='DownloadPackages'>"
+  "        <arg type='u' name='somenumber' direction='in'>"
+  "          <doc:doc><doc:summary><doc:para>"
+  "            See <doc:ulink url='http:///example.com'>example</doc:ulink>"
+  "          </doc:para></doc:summary></doc:doc>"
+  "        </arg>"
+  "        <arg type='s' name='somestring' direction='out'>"
+  "          <doc:doc><doc:summary><doc:para>"
+  "            More docs"
+  "          </doc:para></doc:summary></doc:doc>"
+  "        </arg>"
   "      </method>"
   "      <signal name='HelloWorld'>"
   "        <arg type='s' name='somestring'/>"
@@ -293,7 +296,6 @@ test_extra_data (void)
 
   g_dbus_node_info_unref (info);
 }
-#endif
 
 /* ---------------------------------------------------------------------------------------------------- */
 
@@ -313,10 +315,7 @@ main (int   argc,
   g_test_add_func ("/gdbus/introspection-parser", test_introspection_parser);
   g_test_add_func ("/gdbus/introspection-generate", test_generate);
   g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction);
-#if 0
-  /* XXX: need to figure out how generous we want to be here */
   g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data);
-#endif
 
   ret = g_test_run ();
 


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