[glib: 22/26] tests: Ignore deprecated functions in a few main loop and timer tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 22/26] tests: Ignore deprecated functions in a few main loop and timer tests
- Date: Mon, 29 Jul 2019 13:02:09 +0000 (UTC)
commit 2df27e3416a96bd7b77a5002174d4d193207a945
Author: Philip Withnall <withnall endlessm com>
Date: Wed Jul 24 14:24:33 2019 +0100
tests: Ignore deprecated functions in a few main loop and timer tests
Signed-off-by: Philip Withnall <withnall endlessm com>
Helps: #1438
glib/tests/mainloop.c | 6 +++++-
glib/tests/timer.c | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index e46357ae3..a7778153b 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -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));
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index 01e4dc3dd..149b3af4b 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]