Fix some glib docs warnings

Remove some symbols from glib-sections.txt that gtk-doc has no idea
about.

Add proper callback typedefs for GTester (gtk-doc dislikes inline
function types).

Fix some other minor issues.
This commit is contained in:
Ryan Lortie
2010-07-12 16:37:56 -04:00
parent dc8cf867c8
commit 7791fce38a
9 changed files with 121 additions and 43 deletions

View File

@@ -34,6 +34,10 @@ G_BEGIN_DECLS
typedef struct GTestCase GTestCase;
typedef struct GTestSuite GTestSuite;
typedef void (*GTestFunc) (void);
typedef void (*GTestDataFunc) (gconstpointer user_data);
typedef void (*GTestFixtureFunc) (gpointer fixture,
gconstpointer user_data);
/* assertion API */
#define g_assert_cmpstr(s1, cmp, s2) do { const char *__s1 = (s1), *__s2 = (s2); \
@@ -98,10 +102,12 @@ void g_test_init (int *argc,
int g_test_run (void);
/* hook up a test functions under test path */
void g_test_add_func (const char *testpath,
void (*test_func) (void));
GTestFunc test_func);
void g_test_add_data_func (const char *testpath,
gconstpointer test_data,
void (*test_func) (gconstpointer));
GTestDataFunc test_func);
/* hook up a test with fixture under test path */
#define g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \
G_STMT_START { \
@@ -158,13 +164,13 @@ double g_test_rand_double_range (double range_start,
double range_end);
/* semi-internal API */
GTestCase* g_test_create_case (const char *test_name,
gsize data_size,
gconstpointer test_data,
void (*data_setup) (void),
void (*data_test) (void),
void (*data_teardown) (void));
GTestSuite* g_test_create_suite (const char *suite_name);
GTestCase* g_test_create_case (const char *test_name,
gsize data_size,
gconstpointer test_data,
GTestFixtureFunc data_setup,
GTestFixtureFunc data_test,
GTestFixtureFunc data_teardown);
GTestSuite* g_test_create_suite (const char *suite_name);
GTestSuite* g_test_get_root (void);
void g_test_suite_add (GTestSuite *suite,
GTestCase *test_case);
@@ -217,9 +223,9 @@ void g_assertion_message_error (const char *domain,
void g_test_add_vtable (const char *testpath,
gsize data_size,
gconstpointer test_data,
void (*data_setup) (void),
void (*data_test) (void),
void (*data_teardown) (void));
GTestFixtureFunc data_setup,
GTestFixtureFunc data_test,
GTestFixtureFunc data_teardown);
typedef struct {
gboolean test_initialized;
gboolean test_quick; /* disable thorough tests */