mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-17 02:42:54 +02:00
gio: Define cleanup scope and lists for gio tests
https://bugzilla.gnome.org/show_bug.cgi?id=711799
This commit is contained in:
@@ -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)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@@ -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))
|
||||
|
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "gdbus-sessionbus.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static GDesktopAppInfo *appinfo;
|
||||
static int current_state;
|
||||
static gboolean saw_startup_id;
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static int
|
||||
command_line (GApplication *application,
|
||||
GApplicationCommandLine *cmdline)
|
||||
|
@@ -2,6 +2,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static void
|
||||
activate (GApplication *application)
|
||||
{
|
||||
|
@@ -6,6 +6,8 @@
|
||||
#include "gdbus-tests.h"
|
||||
#include "gdbus-sessionbus.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static gint outstanding_watches;
|
||||
static GMainLoop *main_loop;
|
||||
|
||||
|
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "gdbus-tests.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static GDBusConnection *the_connection = NULL;
|
||||
|
||||
#define MY_TYPE_OBJECT (my_object_get_type ())
|
||||
|
@@ -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
|
||||
|
@@ -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) \
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#include "gdbusdaemon.h"
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
/* The object we want to export */
|
||||
typedef struct _MyObjectClass MyObjectClass;
|
||||
typedef struct _MyObject MyObject;
|
||||
|
@@ -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: */
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "gdbus-tests.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static GMainLoop *loop = NULL;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
@@ -30,6 +30,8 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
typedef struct {
|
||||
GDBusInterfaceSkeleton parent;
|
||||
gint number;
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "gdbus-test-codegen-generated.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
static guint
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -25,6 +25,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GIOStream parent;
|
||||
|
@@ -48,6 +48,8 @@
|
||||
* (GTestAltProxyResolver) always returns [ proxy_a.uri ].
|
||||
*/
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
typedef struct {
|
||||
gchar *proxy_command;
|
||||
gchar *supported_protocol;
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#include <gio/gio.h>
|
||||
#include <string.h>
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
#define MAX_PIECE_SIZE 100
|
||||
#define MAX_PIECES 60
|
||||
|
||||
|
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "gtesttlsbackend.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gchar *cert_pems[3];
|
||||
|
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "gtesttlsbackend.h"
|
||||
|
||||
G_CLEANUP_DEFINE;
|
||||
|
||||
static GPtrArray *fixtures = NULL;
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user