tests: Ignore deprecated functions in a few main loop and timer tests

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
This commit is contained in:
Philip Withnall 2019-07-24 14:24:33 +01:00
parent 2ed76969d0
commit 2df27e3416
2 changed files with 8 additions and 1 deletions

View File

@ -695,7 +695,9 @@ typedef struct {
GSource *timeout1, *timeout2;
gint64 time1;
GTimeVal tv;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GTimeVal tv; /* needed for g_source_get_current_time() */
G_GNUC_END_IGNORE_DEPRECATIONS
} TimeTestData;
static gboolean
@ -730,7 +732,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
}
else
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GTimeVal tv;
G_GNUC_END_IGNORE_DEPRECATIONS
/* Second iteration */
g_assert_true (g_source_is_destroyed (data->timeout2));

View File

@ -21,6 +21,9 @@
* Author: Matthias Clasen
*/
/* We test a few deprecated APIs here. */
#define GLIB_DISABLE_DEPRECATION_WARNINGS 1
#include "glib.h"
static void