[gtk-doc] tests: add test for varargs functions and macros



commit 2fc158fc7f90c716b7b8d68d5e181e7ea7bdc5e2
Author: Stefan Kost <ensonic users sf net>
Date:   Fri Apr 22 15:42:19 2011 -0400

    tests: add test for varargs functions and macros

 tests/bugs/docs/tester-sections.txt |    3 +++
 tests/bugs/src/tester.c             |   12 ++++++++++++
 tests/bugs/src/tester.h             |   23 ++++++++++++++++++++++-
 3 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 4a6cf47..a4ea291 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -11,6 +11,9 @@ Bug512154
 Bug642998
 Bug644291
 <SUBSECTION Functions>
+bug_000000_va1
+BUG_000000_VA2
+BUG_000000_VA3
 bug_141869_a
 bug_141869_b
 bug_379466
diff --git a/tests/bugs/src/tester.c b/tests/bugs/src/tester.c
index 01f3d52..b8b7d7f 100644
--- a/tests/bugs/src/tester.c
+++ b/tests/bugs/src/tester.c
@@ -337,3 +337,15 @@ _bug_000000a (const gchar *name)
   return NULL;
 }
 
+/* varargs */
+
+/**
+ * bug_000000_va1:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */
+void bug_000000_va1 (gchar name, ...)
+{
+}
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index bd520fa..aea05a0 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -375,5 +375,26 @@ typedef enum
   BUG_644291_ASSIGN_TO = '*'
 } Bug644291;
 
-#endif // GTKDOC_TESTER_H
+/* varargs */
+
+extern void bug_000000_va1 (gchar name, ...);
+
+/**
+ * BUG_000000_VA2:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */
+#define BUG_000000_VA2(name,...)
 
+/**
+ * BUG_000000_VA3:
+ * @name: a name
+ * @...: A printf-style message to output
+ *
+ * Outputs a message.
+ */
+#define BUG_000000_VA3(name,args...)
+
+#endif // GTKDOC_TESTER_H



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