[gtk-doc] tests: add a undocumented object



commit 28380a862cfa50725a9b69f5004ce04edb5f91fb
Author: Stefan Sauer <ensonic users sf net>
Date:   Fri Feb 14 21:14:23 2014 +0100

    tests: add a undocumented object
    
    Test case for bug#593282

 tests/gobject/docs-tmpl/tester-docs.xml     |    1 +
 tests/gobject/docs-tmpl/tester-sections.txt |    9 ++++++++
 tests/gobject/docs/tester-docs.xml          |    1 +
 tests/gobject/docs/tester-sections.txt      |    9 ++++++++
 tests/gobject/src/gobject.c                 |   28 +++++++++++++++++++++++++++
 tests/gobject/src/gobject.h                 |   14 +++++++++++++
 6 files changed, 62 insertions(+), 0 deletions(-)
---
diff --git a/tests/gobject/docs-tmpl/tester-docs.xml b/tests/gobject/docs-tmpl/tester-docs.xml
index 917fe1a..fc620bf 100644
--- a/tests/gobject/docs-tmpl/tester-docs.xml
+++ b/tests/gobject/docs-tmpl/tester-docs.xml
@@ -36,6 +36,7 @@
       <title>Tests</title>
       <xi:include href="xml/object.xml"/>
       <xi:include href="xml/object2.xml"/>
+      <xi:include href="xml/object3.xml"/>
       <xi:include href="xml/iface.xml"/>
       <xi:include href="xml/iface2.xml"/>
       <xi:include href="xml/types.xml"/>
diff --git a/tests/gobject/docs-tmpl/tester-sections.txt b/tests/gobject/docs-tmpl/tester-sections.txt
index 49191fd..250217f 100644
--- a/tests/gobject/docs-tmpl/tester-sections.txt
+++ b/tests/gobject/docs-tmpl/tester-sections.txt
@@ -29,6 +29,15 @@ gtkdoc_object2_get_type
 </SECTION>
 
 <SECTION>
+<FILE>object3</FILE>
+<SUBSECTION Standard>
+GtkdocObject3
+GtkdocObject3Class
+GTKDOC_TYPE_OBJECT3
+gtkdoc_object3_get_type
+</SECTION>
+
+<SECTION>
 <FILE>iface</FILE>
 GtkdocIface
 GtkdocIfaceInterface
diff --git a/tests/gobject/docs/tester-docs.xml b/tests/gobject/docs/tester-docs.xml
index b13ce5a..13883f2 100644
--- a/tests/gobject/docs/tester-docs.xml
+++ b/tests/gobject/docs/tester-docs.xml
@@ -49,6 +49,7 @@
       <title>Tests</title>
       <xi:include href="xml/object.xml"/>
       <xi:include href="xml/object2.xml"/>
+      <xi:include href="xml/object3.xml"/>
       <xi:include href="xml/iface.xml"/>
       <xi:include href="xml/iface2.xml"/>
       <xi:include href="xml/types.xml"/>
diff --git a/tests/gobject/docs/tester-sections.txt b/tests/gobject/docs/tester-sections.txt
index 49191fd..250217f 100644
--- a/tests/gobject/docs/tester-sections.txt
+++ b/tests/gobject/docs/tester-sections.txt
@@ -29,6 +29,15 @@ gtkdoc_object2_get_type
 </SECTION>
 
 <SECTION>
+<FILE>object3</FILE>
+<SUBSECTION Standard>
+GtkdocObject3
+GtkdocObject3Class
+GTKDOC_TYPE_OBJECT3
+gtkdoc_object3_get_type
+</SECTION>
+
+<SECTION>
 <FILE>iface</FILE>
 GtkdocIface
 GtkdocIfaceInterface
diff --git a/tests/gobject/src/gobject.c b/tests/gobject/src/gobject.c
index a297d54..7679562 100644
--- a/tests/gobject/src/gobject.c
+++ b/tests/gobject/src/gobject.c
@@ -152,6 +152,14 @@
  * - single item list
  */
 
+/**
+ * SECTION:object3
+ * @title: GtkdocObject3
+ * @short_description: class that is mostly undocuemnted
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ */
+
 #include <glib.h>
 #include <glib-object.h>
 
@@ -424,3 +432,23 @@ GType gtkdoc_object2_get_type (void) {
   return type;
 }
 
+GType gtkdoc_object3_get_type (void) {
+  static GType type = 0;
+  if (type == 0) {
+    static const GTypeInfo info = {
+      (guint16)sizeof(GtkdocObject3Class),
+      NULL, // base_init
+      NULL, // base_finalize
+      NULL, // class_init
+      NULL, // class_finalize
+      NULL, // class_data
+      (guint16)sizeof(GtkdocObject3),
+      0,    // n_preallocs
+      NULL, // instance_init
+      NULL  // value_table
+    };
+    type = g_type_register_static(G_TYPE_OBJECT,"GtkdocObject3",&info,0);
+  }
+  return type;
+}
+
diff --git a/tests/gobject/src/gobject.h b/tests/gobject/src/gobject.h
index 79e6cf8..35cfbc2 100644
--- a/tests/gobject/src/gobject.h
+++ b/tests/gobject/src/gobject.h
@@ -15,6 +15,8 @@
 
 #define GTKDOC_TYPE_OBJECT2           (gtkdoc_object2_get_type ())
 
+#define GTKDOC_TYPE_OBJECT3           (gtkdoc_object3_get_type ())
+
 /* type structs */
 
 typedef struct _GtkdocObject GtkdocObject;
@@ -23,6 +25,9 @@ typedef struct _GtkdocObjectClass GtkdocObjectClass;
 typedef struct _GtkdocObject2 GtkdocObject2;
 typedef struct _GtkdocObject2Class GtkdocObject2Class;
 
+typedef struct _GtkdocObject3 GtkdocObject3;
+typedef struct _GtkdocObject3Class GtkdocObject3Class;
+
 /* in gtkdoc-scan::ScanHeader() we currently skip the enums, but output a decl
 * to -decl.txt and -decl-list.txt for the struct
 * If the symbol has no docs, we get a warning in -unused.txt for the struct, but
@@ -81,6 +86,14 @@ struct _GtkdocObject2Class {
   GObjectClass parent;
 };
 
+struct _GtkdocObject3 {
+  GObject parent;
+};
+
+struct _GtkdocObject3Class {
+  GObjectClass parent;
+};
+
 
 struct GtkdocHelperStruct {
   int a;
@@ -93,6 +106,7 @@ enum GtkdocHelperEnum {
 
 GType  gtkdoc_object_get_type(void) G_GNUC_CONST;
 GType  gtkdoc_object2_get_type(void) G_GNUC_CONST;
+GType  gtkdoc_object3_get_type(void) G_GNUC_CONST;
 
 GtkdocObject *gtkdoc_object_new(void);
 #ifndef GTKDOC_TESTER_DISABLE_DEPRECATED


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