[glib: 5/33] gtestutils: Move a documentation comment to the symbol it documents



commit f27532e7843c528006c57782b839018288aabcce
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Nov 30 13:06:12 2018 +0000

    gtestutils: Move a documentation comment to the symbol it documents
    
    Seems a bit odd to have the documentation comment miles from what it’s
    actually documenting.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://gitlab.gnome.org/GNOME/glib/issues/538

 glib/gtestutils.c | 22 ----------------------
 glib/gtestutils.h | 20 +++++++++++++++++++-
 2 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 42fccacf5..72f62af19 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -3781,25 +3781,3 @@ g_test_get_filename (GTestFileType  file_type,
 
   return result;
 }
-
-/* --- macros docs START --- */
-/**
- * g_test_add:
- * @testpath:  The test path for a new test case.
- * @Fixture:   The type of a fixture data structure.
- * @tdata:     Data argument for the test functions.
- * @fsetup:    The function to set up the fixture data.
- * @ftest:     The actual test function.
- * @fteardown: The function to tear down the fixture data.
- *
- * Hook up a new test case at @testpath, similar to g_test_add_func().
- * A fixture data structure with setup and teardown functions may be provided,
- * similar to g_test_create_case().
- *
- * g_test_add() is implemented as a macro, so that the fsetup(), ftest() and
- * fteardown() callbacks can expect a @Fixture pointer as their first argument
- * in a type safe manner. They otherwise have type #GTestFixtureFunc.
- *
- * Since: 2.16
- **/
-/* --- macros docs END --- */
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 4e1293bc8..3028514fb 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -230,7 +230,25 @@ gboolean g_test_failed                  (void);
 GLIB_AVAILABLE_IN_2_38
 void    g_test_set_nonfatal_assertions  (void);
 
-/* hook up a test with fixture under test path */
+/**
+ * g_test_add:
+ * @testpath:  The test path for a new test case.
+ * @Fixture:   The type of a fixture data structure.
+ * @tdata:     Data argument for the test functions.
+ * @fsetup:    The function to set up the fixture data.
+ * @ftest:     The actual test function.
+ * @fteardown: The function to tear down the fixture data.
+ *
+ * Hook up a new test case at @testpath, similar to g_test_add_func().
+ * A fixture data structure with setup and teardown functions may be provided,
+ * similar to g_test_create_case().
+ *
+ * g_test_add() is implemented as a macro, so that the fsetup(), ftest() and
+ * fteardown() callbacks can expect a @Fixture pointer as their first argument
+ * in a type safe manner. They otherwise have type #GTestFixtureFunc.
+ *
+ * Since: 2.16
+ */
 #define g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \
                                        G_STMT_START {                  \
                                          void (*add_vtable) (const char*,       \


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