gio: Define cleanup scope and lists for gio tests

https://bugzilla.gnome.org/show_bug.cgi?id=711799
This commit is contained in:
Stef Walter
2013-11-10 16:51:02 +01:00
parent ced68f1587
commit 3e7a2cfda3
23 changed files with 45 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ LDADD = \
$(top_builddir)/gmodule/libgmodule-2.0.la \
$(top_builddir)/gio/libgio-2.0.la
AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\" -DG_CLEANUP_SCOPE=gio_tests_cleanup
AM_CFLAGS = $(GLIB_WARN_CFLAGS)
# -----------------------------------------------------------------------------

View File

@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <string.h>
G_CLEANUP_DEFINE;
#define G_TYPE_EXPANDER_CONVERTER (g_expander_converter_get_type ())
#define G_EXPANDER_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EXPANDER_CONVERTER, GExpanderConverter))
#define G_EXPANDER_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EXPANDER_CONVERTER, GExpanderConverterClass))

View File

@@ -24,6 +24,8 @@
#include "gdbus-sessionbus.h"
G_CLEANUP_DEFINE;
static GDesktopAppInfo *appinfo;
static int current_state;
static gboolean saw_startup_id;

View File

@@ -2,6 +2,8 @@
#include <stdlib.h>
#include <string.h>
G_CLEANUP_DEFINE;
static int
command_line (GApplication *application,
GApplicationCommandLine *cmdline)

View File

@@ -2,6 +2,8 @@
#include <stdlib.h>
#include <string.h>
G_CLEANUP_DEFINE;
static void
activate (GApplication *application)
{

View File

@@ -6,6 +6,8 @@
#include "gdbus-tests.h"
#include "gdbus-sessionbus.h"
G_CLEANUP_DEFINE;
static gint outstanding_watches;
static GMainLoop *main_loop;

View File

@@ -26,6 +26,8 @@
#include "gdbus-tests.h"
G_CLEANUP_DEFINE;
static GDBusConnection *the_connection = NULL;
#define MY_TYPE_OBJECT (my_object_get_type ())

View File

@@ -41,6 +41,8 @@
#include "gdbus-tests.h"
G_CLEANUP_DEFINE;
#define CLOSE_TIME_MS 1
#define N_REPEATS_SLOW 5000
#define N_REPEATS 100

View File

@@ -31,6 +31,8 @@
#include "test-io-stream.h"
#include "test-pipe-unix.h"
G_CLEANUP_DEFINE;
#define MY_TYPE_OUTPUT_STREAM \
(my_output_stream_get_type ())
#define MY_OUTPUT_STREAM(o) \

View File

@@ -3,6 +3,8 @@
#include "gdbusdaemon.h"
#include <glib/gi18n.h>
G_CLEANUP_DEFINE;
int
main (int argc, char *argv[])
{

View File

@@ -3,6 +3,8 @@
/* ---------------------------------------------------------------------------------------------------- */
G_CLEANUP_DEFINE;
/* The object we want to export */
typedef struct _MyObjectClass MyObjectClass;
typedef struct _MyObject MyObject;

View File

@@ -1,6 +1,8 @@
#include <gio/gio.h>
G_CLEANUP_DEFINE;
/* ---------------------------------------------------------------------------------------------------- */
/* The D-Bus interface definition we want to create a GDBusProxy-derived type for: */
/* ---------------------------------------------------------------------------------------------------- */

View File

@@ -34,6 +34,8 @@
#include "gdbus-tests.h"
G_CLEANUP_DEFINE;
static GMainLoop *loop = NULL;
/* ---------------------------------------------------------------------------------------------------- */

View File

@@ -30,6 +30,8 @@
#include <string.h>
#include <unistd.h>
G_CLEANUP_DEFINE;
typedef struct {
GDBusInterfaceSkeleton parent;
gint number;

View File

@@ -29,6 +29,8 @@
#include "gdbus-test-codegen-generated.h"
G_CLEANUP_DEFINE;
/* ---------------------------------------------------------------------------------------------------- */
static guint

View File

@@ -2,6 +2,8 @@
#include "gdbus-sessionbus.h"
G_CLEANUP_DEFINE;
/* Markup printing {{{1 */
/* This used to be part of GLib, but it was removed before the stable

View File

@@ -8,6 +8,8 @@
#include "testenum.h"
G_CLEANUP_DEFINE;
static gboolean backend_set;
/* These tests rely on the schemas in org.gtk.test.gschema.xml

View File

@@ -32,6 +32,8 @@
#include "gtlsconsoleinteraction.h"
G_CLEANUP_DEFINE;
/*
* WARNING: This is not the example you're looking for [slow hand wave]. This
* is not industrial strength, it's just for testing. It uses embarassing

View File

@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <string.h>
G_CLEANUP_DEFINE;
typedef struct
{
GIOStream parent;

View File

@@ -48,6 +48,8 @@
* (GTestAltProxyResolver) always returns [ proxy_a.uri ].
*/
G_CLEANUP_DEFINE;
typedef struct {
gchar *proxy_command;
gchar *supported_protocol;

View File

@@ -14,6 +14,8 @@
#include <gio/gio.h>
#include <string.h>
G_CLEANUP_DEFINE;
#define MAX_PIECE_SIZE 100
#define MAX_PIECES 60

View File

@@ -26,6 +26,8 @@
#include "gtesttlsbackend.h"
G_CLEANUP_DEFINE;
typedef struct
{
gchar *cert_pems[3];

View File

@@ -26,6 +26,8 @@
#include "gtesttlsbackend.h"
G_CLEANUP_DEFINE;
static GPtrArray *fixtures = NULL;
typedef struct {