/* test-utils.c generated by valac 0.21.1.1-0d6f, the Vala compiler
 * generated from test-utils.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 * Copyright (C) 2012 Philip Withnall
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Travis Reitter <travis.reitter@collabora.com>
 *          Philip Withnall <philip@tecnocode.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <folks/folks.h>
#include <config.h>
#include <gobject/gvaluecollector.h>


#define FOLKS_TYPE_TEST_UTILS (folks_test_utils_get_type ())
#define FOLKS_TEST_UTILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_TEST_UTILS, FolksTestUtils))
#define FOLKS_TEST_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_TEST_UTILS, FolksTestUtilsClass))
#define FOLKS_IS_TEST_UTILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_TEST_UTILS))
#define FOLKS_IS_TEST_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_TEST_UTILS))
#define FOLKS_TEST_UTILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_TEST_UTILS, FolksTestUtilsClass))

typedef struct _FolksTestUtils FolksTestUtils;
typedef struct _FolksTestUtilsClass FolksTestUtilsClass;
typedef struct _FolksTestUtilsPrivate FolksTestUtilsPrivate;
#define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FolksTestUtilsLoadableIconsContentEqualData FolksTestUtilsLoadableIconsContentEqualData;
typedef struct _Block2Data Block2Data;
typedef struct _FolksTestUtilsBackendPrepareAndWaitForQuiescenceData FolksTestUtilsBackendPrepareAndWaitForQuiescenceData;
typedef struct _Block3Data Block3Data;
typedef struct _FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData;
typedef struct _FolksParamSpecTestUtils FolksParamSpecTestUtils;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _FolksTestUtils {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FolksTestUtilsPrivate * priv;
};

struct _FolksTestUtilsClass {
	GTypeClass parent_class;
	void (*finalize) (FolksTestUtils *self);
};

struct _Block1Data {
	int _ref_count_;
	GMainLoop* loop;
};

struct _FolksTestUtilsLoadableIconsContentEqualData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GLoadableIcon* a;
	GLoadableIcon* b;
	gint icon_size;
	gboolean result;
	gboolean retval;
	GLoadableIcon* _tmp0_;
	GLoadableIcon* _tmp1_;
	gboolean _tmp2_;
	GLoadableIcon* _tmp3_;
	GLoadableIcon* _tmp4_;
	gboolean _tmp5_;
	gchar* a_type;
	GInputStream* a_input;
	GLoadableIcon* _tmp6_;
	gint _tmp7_;
	gchar* _tmp8_;
	GInputStream* _tmp9_;
	gchar* b_type;
	GInputStream* b_input;
	GLoadableIcon* _tmp10_;
	gint _tmp11_;
	gchar* _tmp12_;
	GInputStream* _tmp13_;
	gsize bufsize;
	guint8* a_data;
	gsize _tmp14_;
	guint8* _tmp15_;
	gint a_data_length1;
	gint _a_data_size_;
	guint8* b_data;
	gsize _tmp16_;
	guint8* _tmp17_;
	gint b_data_length1;
	gint _b_data_size_;
	gsize a_read_size;
	gboolean _tmp18_;
	gboolean _tmp19_;
	gsize _tmp20_;
	gssize _tmp21_;
	GInputStream* _tmp22_;
	guint8* _tmp23_;
	gint _tmp23__length1;
	gssize _tmp24_;
	gssize b_read_size;
	GInputStream* _tmp25_;
	guint8* _tmp26_;
	gint _tmp26__length1;
	gssize _tmp27_;
	gboolean _tmp28_;
	gsize _tmp29_;
	gssize _tmp30_;
	guint8* _tmp31_;
	gint _tmp31__length1;
	guint8* _tmp32_;
	gint _tmp32__length1;
	gsize _tmp33_;
	gint _tmp34_;
	gboolean _tmp35_;
	GInputStream* _tmp36_;
	GInputStream* _tmp37_;
	GError* e1;
	GError* _tmp38_;
	const gchar* _tmp39_;
	GError * _inner_error_;
};

struct _Block2Data {
	int _ref_count_;
	gboolean has_yielded;
	gpointer _async_data_;
};

struct _FolksTestUtilsBackendPrepareAndWaitForQuiescenceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksBackend* backend;
	Block2Data* _data2_;
	gulong signal_id;
	FolksBackend* _tmp0_;
	gulong _tmp1_;
	FolksBackend* _tmp2_;
	FolksBackend* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	FolksBackend* _tmp6_;
	gulong _tmp7_;
	FolksBackend* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GError * _inner_error_;
};

struct _Block3Data {
	int _ref_count_;
	gboolean has_yielded;
	gpointer _async_data_;
};

struct _FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividualAggregator* aggregator;
	Block3Data* _data3_;
	gulong signal_id;
	FolksIndividualAggregator* _tmp0_;
	gulong _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	FolksIndividualAggregator* _tmp6_;
	gulong _tmp7_;
	FolksIndividualAggregator* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GError * _inner_error_;
};

struct _FolksParamSpecTestUtils {
	GParamSpec parent_instance;
};


static gpointer folks_test_utils_parent_class = NULL;

gpointer folks_test_utils_ref (gpointer instance);
void folks_test_utils_unref (gpointer instance);
GParamSpec* folks_param_spec_test_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void folks_value_set_test_utils (GValue* value, gpointer v_object);
void folks_value_take_test_utils (GValue* value, gpointer v_object);
gpointer folks_value_get_test_utils (const GValue* value);
GType folks_test_utils_get_type (void) G_GNUC_CONST;
enum  {
	FOLKS_TEST_UTILS_DUMMY_PROPERTY
};
gboolean haze_remove_directory (const gchar* path);
gint folks_test_utils_multiply_timeout (gint timeout);
void folks_test_utils_loop_run_with_timeout (GMainLoop* loop, gint timeout);
static gboolean __lambda2_ (void);
static gboolean ___lambda2__gsource_func (gpointer self);
void folks_test_utils_loop_run_with_non_fatal_timeout (GMainLoop* loop, gint timeout) G_GNUC_DEPRECATED;
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean __lambda3_ (Block1Data* _data1_);
static gboolean ___lambda3__gsource_func (gpointer self);
static void folks_test_utils_loadable_icons_content_equal_data_free (gpointer _data);
void folks_test_utils_loadable_icons_content_equal (GLoadableIcon* a, GLoadableIcon* b, gint icon_size, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean folks_test_utils_loadable_icons_content_equal_finish (GAsyncResult* _res_);
static gboolean folks_test_utils_loadable_icons_content_equal_co (FolksTestUtilsLoadableIconsContentEqualData* _data_);
static void folks_test_utils_loadable_icons_content_equal_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_test_utils_backend_prepare_and_wait_for_quiescence_data_free (gpointer _data);
void folks_test_utils_backend_prepare_and_wait_for_quiescence (FolksBackend* backend, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_test_utils_backend_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error);
static gboolean folks_test_utils_backend_prepare_and_wait_for_quiescence_co (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void __lambda4_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec);
static void ___lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void folks_test_utils_backend_prepare_and_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_data_free (gpointer _data);
void folks_test_utils_aggregator_prepare_and_wait_for_quiescence (FolksIndividualAggregator* aggregator, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error);
static gboolean folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void __lambda5_ (Block3Data* _data3_, GObject* obj, GParamSpec* pspec);
static void ___lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void folks_test_utils_run_test_helper_sync (gchar** argv, int argv_length1, gchar** capture_stdout, GError** error);
static gchar** _vala_array_dup1 (gchar** self, int length);
gchar* folks_test_utils_get_source_test_data (const gchar* filename);
gchar* folks_test_utils_get_built_test_data (const gchar* filename);
FolksTestUtils* folks_test_utils_new (void);
FolksTestUtils* folks_test_utils_construct (GType object_type);
static void folks_test_utils_finalize (FolksTestUtils* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


/**
   * Apply an arbitrary fudge factor to the timeout, which might be
   * appropriate for any debuggers or other slow wrappers we're using.
   *
   * @param timeout A timeout in any units
   * @return A revised timeout in the same units
   */
gint folks_test_utils_multiply_timeout (gint timeout) {
	gint result = 0;
	gint _result_ = 0;
	gint _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 42 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = timeout;
#line 42 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_result_ = _tmp0_;
#line 44 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = g_getenv ("FOLKS_TEST_VALGRIND");
#line 44 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp1_ != NULL) {
#line 286 "test-utils.c"
		gint _tmp2_ = 0;
#line 46 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp2_ = _result_;
#line 46 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_result_ = _tmp2_ * 10;
#line 292 "test-utils.c"
	}
#line 49 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3_ = g_getenv ("FOLKS_TEST_CALLGRIND");
#line 49 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp3_ != NULL) {
#line 298 "test-utils.c"
		gint _tmp4_ = 0;
#line 51 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp4_ = _result_;
#line 51 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_result_ = _tmp4_ * 10;
#line 304 "test-utils.c"
	}
#line 54 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	result = _result_;
#line 54 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 310 "test-utils.c"
}


/**
   * Run //loop// with a timeout. Something should call ``loop.quit()``
   * before the timeout is reached. If not, a fatal error occurs.
   *
   * @param loop A main loop.
   * @param timeout A timeout, initially in seconds, defaulting to long
   *    enough to do something "reasonably fast". It will be adjusted with
   *    multiply_timeout() before use.
   */
static gboolean __lambda2_ (void) {
	gboolean result = FALSE;
#line 70 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_error ("test-utils.vala:70: Timed out");
#line 70 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 329 "test-utils.c"
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ ();
#line 70 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 338 "test-utils.c"
}


void folks_test_utils_loop_run_with_timeout (GMainLoop* loop, gint timeout) {
	GSource* source = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	GSource* _tmp2_ = NULL;
	GMainLoop* _tmp3_ = NULL;
	GMainContext* _tmp4_ = NULL;
	GMainLoop* _tmp5_ = NULL;
#line 66 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (loop != NULL);
#line 68 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = timeout;
#line 68 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = folks_test_utils_multiply_timeout (_tmp0_);
#line 68 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp2_ = g_timeout_source_new_seconds ((guint) _tmp1_);
#line 68 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	source = _tmp2_;
#line 70 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_set_callback (source, ___lambda2__gsource_func, NULL, NULL);
#line 71 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3_ = loop;
#line 71 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp4_ = g_main_loop_get_context (_tmp3_);
#line 71 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_attach (source, _tmp4_);
#line 73 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp5_ = loop;
#line 73 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_main_loop_run (_tmp5_);
#line 75 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_destroy (source);
#line 66 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_source_unref0 (source);
#line 376 "test-utils.c"
}


/**
   * Run //loop// with a timeout. Something should call ``loop.quit()``
   * before the timeout is reached. If not, the timeout callback will do so.
   *
   * This function is a bad idea: we don't want things to run for an arbitrary
   * time. Use loop_run_with_timeout() instead.
   *
   * FIXME: Remove this when it has no more callers.
   *
   * @param loop A main loop.
   * @param timeout A timeout, initially in seconds, defaulting to long
   *    enough to do something "reasonably fast". It will be adjusted with
   *    multiply_timeout() before use.
   */
static gpointer _g_main_loop_ref0 (gpointer self) {
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return self ? g_main_loop_ref (self) : NULL;
#line 397 "test-utils.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return _data1_;
#line 406 "test-utils.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_main_loop_unref0 (_data1_->loop);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_slice_free (Block1Data, _data1_);
#line 419 "test-utils.c"
	}
}


static gboolean __lambda3_ (Block1Data* _data1_) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_ = NULL;
#line 100 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data1_->loop;
#line 100 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_main_loop_quit (_tmp0_);
#line 101 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	result = FALSE;
#line 101 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 435 "test-utils.c"
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
#line 98 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 444 "test-utils.c"
}


void folks_test_utils_loop_run_with_non_fatal_timeout (GMainLoop* loop, gint timeout) {
	Block1Data* _data1_;
	GMainLoop* _tmp0_ = NULL;
	GMainLoop* _tmp1_ = NULL;
	GSource* source = NULL;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	GSource* _tmp4_ = NULL;
	GMainLoop* _tmp5_ = NULL;
	GMainContext* _tmp6_ = NULL;
	GMainLoop* _tmp7_ = NULL;
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (loop != NULL);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data1_->_ref_count_ = 1;
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = loop;
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_main_loop_ref0 (_tmp0_);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_main_loop_unref0 (_data1_->loop);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data1_->loop = _tmp1_;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp2_ = timeout;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3_ = folks_test_utils_multiply_timeout (_tmp2_);
#line 96 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp4_ = g_timeout_source_new_seconds ((guint) _tmp3_);
#line 96 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	source = _tmp4_;
#line 98 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_set_callback (source, ___lambda3__gsource_func, block1_data_ref (_data1_), block1_data_unref);
#line 103 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp5_ = _data1_->loop;
#line 103 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp6_ = g_main_loop_get_context (_tmp5_);
#line 103 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_attach (source, _tmp6_);
#line 105 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp7_ = _data1_->loop;
#line 105 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_main_loop_run (_tmp7_);
#line 107 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_source_destroy (source);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_source_unref0 (source);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	block1_data_unref (_data1_);
#line 93 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data1_ = NULL;
#line 501 "test-utils.c"
}


static void folks_test_utils_loadable_icons_content_equal_data_free (gpointer _data) {
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->a);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->b);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsLoadableIconsContentEqualData, _data_);
#line 514 "test-utils.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return self ? g_object_ref (self) : NULL;
#line 521 "test-utils.c"
}


void folks_test_utils_loadable_icons_content_equal (GLoadableIcon* a, GLoadableIcon* b, gint icon_size, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
	GLoadableIcon* _tmp0_ = NULL;
	GLoadableIcon* _tmp1_ = NULL;
	GLoadableIcon* _tmp2_ = NULL;
	GLoadableIcon* _tmp3_ = NULL;
	gint _tmp4_ = 0;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsLoadableIconsContentEqualData);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_test_utils_loadable_icons_content_equal);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_test_utils_loadable_icons_content_equal_data_free);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = a;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->a);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->a = _tmp1_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp2_ = b;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->b);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->b = _tmp3_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp4_ = icon_size;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->icon_size = _tmp4_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_loadable_icons_content_equal_co (_data_);
#line 560 "test-utils.c"
}


gboolean folks_test_utils_loadable_icons_content_equal_finish (GAsyncResult* _res_) {
	gboolean result;
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	result = _data_->result;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 573 "test-utils.c"
}


/**
   * Compare the content of two {@link LoadableIcon}s for equality.
   *
   * This is in contrast to {@link Icon.equal}, which returns ``false`` for
   * identical icons stored in different subclasses or in different storage
   * locations.
   *
   * This function is particularly useful for tests which compare an avatar set
   * on an {@link AvatarDetails}'s with that object's final avatar, since it may
   * be stored in a location in the avatar cache.
   *
   * @param a the first icon
   * @param b the second icon
   * @param size the size at which to compare the icons
   * @return ``true`` if the instances are equal, ``false`` otherwise
   */
static void folks_test_utils_loadable_icons_content_equal_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_loadable_icons_content_equal_co (_data_);
#line 603 "test-utils.c"
}


static gboolean folks_test_utils_loadable_icons_content_equal_co (FolksTestUtilsLoadableIconsContentEqualData* _data_) {
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 0:
#line 612 "test-utils.c"
		goto _state_0;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 1:
#line 616 "test-utils.c"
		goto _state_1;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 2:
#line 620 "test-utils.c"
		goto _state_2;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 3:
#line 624 "test-utils.c"
		goto _state_3;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 4:
#line 628 "test-utils.c"
		goto _state_4;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 5:
#line 632 "test-utils.c"
		goto _state_5;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 6:
#line 636 "test-utils.c"
		goto _state_6;
		default:
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 641 "test-utils.c"
	}
	_state_0:
#line 130 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->retval = FALSE;
#line 132 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 132 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->a;
#line 132 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = NULL;
#line 132 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = _data_->b;
#line 132 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp0_ == _data_->_tmp1_) {
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->result = TRUE;
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 662 "test-utils.c"
		} else {
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 666 "test-utils.c"
		}
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 133 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 672 "test-utils.c"
	}
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = NULL;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = _data_->a;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp3_ != NULL) {
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = NULL;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = _data_->b;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->_tmp4_ != NULL;
#line 686 "test-utils.c"
	} else {
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = FALSE;
#line 690 "test-utils.c"
	}
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = FALSE;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = _data_->_tmp2_;
#line 135 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp5_) {
#line 698 "test-utils.c"
		{
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = NULL;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = _data_->a;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp7_ = 0;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp7_ = _data_->icon_size;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp8_ = NULL;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 1;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_loadable_icon_load_async (_data_->_tmp6_, _data_->_tmp7_, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 716 "test-utils.c"
			_state_1:
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp9_ = NULL;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp9_ = g_loadable_icon_load_finish (_data_->_tmp6_, _data_->_res_, &_data_->_tmp8_, &_data_->_inner_error_);
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->a_type);
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_type = _data_->_tmp8_;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_input = _data_->_tmp9_;
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			if (_data_->_inner_error_ != NULL) {
#line 140 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 732 "test-utils.c"
				goto __catch0_g_error;
			}
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = NULL;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = _data_->b;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp11_ = 0;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp11_ = _data_->icon_size;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp12_ = NULL;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_loadable_icon_load_async (_data_->_tmp10_, _data_->_tmp11_, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 751 "test-utils.c"
			_state_2:
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp13_ = NULL;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp13_ = g_loadable_icon_load_finish (_data_->_tmp10_, _data_->_res_, &_data_->_tmp12_, &_data_->_inner_error_);
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->b_type);
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_type = _data_->_tmp12_;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_input = _data_->_tmp13_;
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			if (_data_->_inner_error_ != NULL) {
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 142 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 771 "test-utils.c"
				goto __catch0_g_error;
			}
#line 145 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->bufsize = (gsize) 2048;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp14_ = 0UL;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp14_ = _data_->bufsize;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp15_ = NULL;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp15_ = g_new0 (guint8, _data_->_tmp14_);
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_data_length1 = 0;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_a_data_size_ = 0;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_data = _data_->_tmp15_;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_data_length1 = _data_->_tmp14_;
#line 146 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_a_data_size_ = _data_->a_data_length1;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp16_ = 0UL;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp16_ = _data_->bufsize;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp17_ = NULL;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp17_ = g_new0 (guint8, _data_->_tmp16_);
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_data_length1 = 0;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_b_data_size_ = 0;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_data = _data_->_tmp17_;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_data_length1 = _data_->_tmp16_;
#line 147 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_b_data_size_ = _data_->b_data_length1;
#line 150 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->retval = TRUE;
#line 151 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_read_size = (gsize) (-1);
#line 816 "test-utils.c"
			{
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_data_->_tmp18_ = TRUE;
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				while (TRUE) {
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp19_ = FALSE;
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp19_ = _data_->_tmp18_;
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					if (!_data_->_tmp19_) {
#line 164 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp20_ = 0UL;
#line 164 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp20_ = _data_->a_read_size;
#line 164 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						if (!(_data_->_tmp20_ > ((gsize) 0))) {
#line 164 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
							break;
#line 836 "test-utils.c"
						}
					}
#line 152 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp18_ = FALSE;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp22_ = NULL;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp22_ = _data_->a_input;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp23_ = NULL;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp23__length1 = 0;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp23_ = _data_->a_data;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp23__length1 = _data_->a_data_length1;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_state_ = 3;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					g_input_stream_read_async (_data_->_tmp22_, _data_->_tmp23_, (gsize) _data_->_tmp23__length1, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					return FALSE;
#line 859 "test-utils.c"
					_state_3:
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp24_ = 0L;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp24_ = g_input_stream_read_finish (_data_->_tmp22_, _data_->_res_, &_data_->_inner_error_);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp21_ = _data_->_tmp24_;
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					if (_data_->_inner_error_ != NULL) {
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->b_data = (g_free (_data_->b_data), NULL);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->a_data = (g_free (_data_->a_data), NULL);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->b_input);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->b_type);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->a_input);
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->a_type);
#line 881 "test-utils.c"
						goto __catch0_g_error;
					}
#line 154 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->a_read_size = (gsize) _data_->_tmp21_;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp25_ = NULL;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp25_ = _data_->b_input;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp26_ = NULL;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp26__length1 = 0;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp26_ = _data_->b_data;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp26__length1 = _data_->b_data_length1;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_state_ = 4;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					g_input_stream_read_async (_data_->_tmp25_, _data_->_tmp26_, (gsize) _data_->_tmp26__length1, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					return FALSE;
#line 904 "test-utils.c"
					_state_4:
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp27_ = 0L;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp27_ = g_input_stream_read_finish (_data_->_tmp25_, _data_->_res_, &_data_->_inner_error_);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->b_read_size = _data_->_tmp27_;
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					if (_data_->_inner_error_ != NULL) {
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->b_data = (g_free (_data_->b_data), NULL);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->a_data = (g_free (_data_->a_data), NULL);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->b_input);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->b_type);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->a_input);
#line 155 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->a_type);
#line 926 "test-utils.c"
						goto __catch0_g_error;
					}
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp29_ = 0UL;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp29_ = _data_->a_read_size;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp30_ = 0L;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp30_ = _data_->b_read_size;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					if (_data_->_tmp29_ != ((gsize) _data_->_tmp30_)) {
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp28_ = TRUE;
#line 941 "test-utils.c"
					} else {
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp31_ = NULL;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp31__length1 = 0;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp31_ = _data_->a_data;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp31__length1 = _data_->a_data_length1;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp32_ = NULL;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp32__length1 = 0;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp32_ = _data_->b_data;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp32__length1 = _data_->b_data_length1;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp33_ = 0UL;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp33_ = _data_->a_read_size;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp34_ = 0;
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp34_ = memcmp (_data_->_tmp31_, _data_->_tmp32_, _data_->_tmp33_);
#line 158 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->_tmp28_ = _data_->_tmp34_ != 0;
#line 969 "test-utils.c"
					}
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp35_ = FALSE;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					_data_->_tmp35_ = _data_->_tmp28_;
#line 157 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
					if (_data_->_tmp35_) {
#line 160 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						_data_->retval = FALSE;
#line 161 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
						break;
#line 981 "test-utils.c"
					}
				}
			}
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp36_ = NULL;
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp36_ = _data_->a_input;
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 5;
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_input_stream_close_async (_data_->_tmp36_, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 995 "test-utils.c"
			_state_5:
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_input_stream_close_finish (_data_->_tmp36_, _data_->_res_, &_data_->_inner_error_);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			if (_data_->_inner_error_ != NULL) {
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_data_->b_data = (g_free (_data_->b_data), NULL);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_data_->a_data = (g_free (_data_->a_data), NULL);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->b_input);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 166 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 1013 "test-utils.c"
				goto __catch0_g_error;
			}
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp37_ = NULL;
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp37_ = _data_->b_input;
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 6;
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_input_stream_close_async (_data_->_tmp37_, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1026 "test-utils.c"
			_state_6:
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_input_stream_close_finish (_data_->_tmp37_, _data_->_res_, &_data_->_inner_error_);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			if (_data_->_inner_error_ != NULL) {
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_data_->b_data = (g_free (_data_->b_data), NULL);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_data_->a_data = (g_free (_data_->a_data), NULL);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->b_input);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 167 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 1044 "test-utils.c"
				goto __catch0_g_error;
			}
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->b_data = (g_free (_data_->b_data), NULL);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->a_data = (g_free (_data_->a_data), NULL);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (_data_->b_input);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->b_type);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (_data_->a_input);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->a_type);
#line 1059 "test-utils.c"
		}
		goto __finally0;
		__catch0_g_error:
		{
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->e1 = _data_->_inner_error_;
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_inner_error_ = NULL;
#line 171 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->retval = FALSE;
#line 172 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp38_ = NULL;
#line 172 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp38_ = _data_->e1;
#line 172 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp39_ = NULL;
#line 172 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_tmp39_ = _data_->_tmp38_->message;
#line 172 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_warning ("test-utils.vala:172: Failed to read loadable icon for comparison: %s", _data_->_tmp39_);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_g_error_free0 (_data_->e1);
#line 1082 "test-utils.c"
		}
		__finally0:
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_inner_error_ != NULL) {
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_clear_error (&_data_->_inner_error_);
#line 137 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1093 "test-utils.c"
		}
	}
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->result = _data_->retval;
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1102 "test-utils.c"
	} else {
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1106 "test-utils.c"
	}
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 177 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1116 "test-utils.c"
	} else {
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1120 "test-utils.c"
	}
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 126 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1126 "test-utils.c"
}


static void folks_test_utils_backend_prepare_and_wait_for_quiescence_data_free (gpointer _data) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->backend);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData, _data_);
#line 1137 "test-utils.c"
}


void folks_test_utils_backend_prepare_and_wait_for_quiescence (FolksBackend* backend, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
	FolksBackend* _tmp0_ = NULL;
	FolksBackend* _tmp1_ = NULL;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_test_utils_backend_prepare_and_wait_for_quiescence);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_test_utils_backend_prepare_and_wait_for_quiescence_data_free);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = backend;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->backend);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->backend = _tmp1_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data_);
#line 1161 "test-utils.c"
}


void folks_test_utils_backend_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return;
#line 1171 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1175 "test-utils.c"
}


/**
   * Prepare a backend and wait for it to reach quiescence.
   *
   * This will prepare the given {@link Backend} then yield until it reaches
   * quiescence. No timeout is used, so if the backend never reaches quiescence,
   * this function will never return; callers must add their own timeout to
   * avoid this if necessary.
   *
   * When this returns, the backend is guaranteed to be quiescent.
   *
   * @param backend the backend to prepare
   */
static Block2Data* block2_data_ref (Block2Data* _data2_) {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return _data2_;
#line 1196 "test-utils.c"
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_slice_free (Block2Data, _data2_);
#line 1207 "test-utils.c"
	}
}


static void __lambda4_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec) {
	gboolean _tmp0_ = FALSE;
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (obj != NULL);
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (pspec != NULL);
#line 198 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data2_->has_yielded;
#line 198 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp0_ == TRUE) {
#line 200 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data2_->_async_data_);
#line 1224 "test-utils.c"
	}
}


static void ___lambda4__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	__lambda4_ (self, _sender, pspec);
#line 1232 "test-utils.c"
}


static void folks_test_utils_backend_prepare_and_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data_);
#line 1246 "test-utils.c"
}


static gboolean folks_test_utils_backend_prepare_and_wait_for_quiescence_co (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_) {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 0:
#line 1255 "test-utils.c"
		goto _state_0;
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 1:
#line 1259 "test-utils.c"
		goto _state_1;
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 2:
#line 1263 "test-utils.c"
		goto _state_2;
		default:
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 1268 "test-utils.c"
	}
	_state_0:
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data2_ = g_slice_new0 (Block2Data);
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data2_->_ref_count_ = 1;
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data2_->_async_data_ = _data_;
#line 195 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data2_->has_yielded = FALSE;
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->backend;
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = 0UL;
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = g_signal_connect_data ((GObject*) _data_->_tmp0_, "notify::is-quiescent", (GCallback) ___lambda4__g_object_notify, block2_data_ref (_data_->_data2_), (GClosureNotify) block2_data_unref, 0);
#line 196 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp1_;
#line 1289 "test-utils.c"
	{
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = NULL;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->backend;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_state_ = 1;
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_backend_prepare (_data_->_tmp2_, folks_test_utils_backend_prepare_and_wait_for_quiescence_ready, _data_);
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1301 "test-utils.c"
		_state_1:
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_backend_prepare_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
#line 206 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_inner_error_ != NULL) {
#line 1307 "test-utils.c"
			goto __finally1;
		}
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = NULL;
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = _data_->backend;
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = FALSE;
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = folks_backend_get_is_quiescent (_data_->_tmp3_);
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = FALSE;
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = _data_->_tmp4_;
#line 208 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_tmp5_ == FALSE) {
#line 210 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_data2_->has_yielded = TRUE;
#line 211 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 211 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1330 "test-utils.c"
			_state_2:
			;
		}
	}
	__finally1:
	{
#line 216 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = NULL;
#line 216 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = _data_->backend;
#line 216 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = 0UL;
#line 216 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = _data_->signal_id;
#line 216 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_signal_handler_disconnect ((GObject*) _data_->_tmp6_, _data_->_tmp7_);
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = NULL;
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = _data_->backend;
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = FALSE;
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = folks_backend_get_is_quiescent (_data_->_tmp8_);
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = FALSE;
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 217 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_vala_assert (_data_->_tmp10_ == TRUE, "backend.is_quiescent == true");
#line 1361 "test-utils.c"
	}
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_inner_error_ != NULL) {
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_error_free (_data_->_inner_error_);
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		block2_data_unref (_data_->_data2_);
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_data2_ = NULL;
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1377 "test-utils.c"
		} else {
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1381 "test-utils.c"
		}
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 204 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1387 "test-utils.c"
	}
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	block2_data_unref (_data_->_data2_);
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data2_ = NULL;
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1397 "test-utils.c"
	} else {
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1401 "test-utils.c"
	}
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 192 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1407 "test-utils.c"
}


static void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_data_free (gpointer _data) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData, _data_);
#line 1418 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_quiescence (FolksIndividualAggregator* aggregator, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
	FolksIndividualAggregator* _tmp0_ = NULL;
	FolksIndividualAggregator* _tmp1_ = NULL;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_test_utils_aggregator_prepare_and_wait_for_quiescence);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_test_utils_aggregator_prepare_and_wait_for_quiescence_data_free);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = aggregator;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->aggregator = _tmp1_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data_);
#line 1442 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return;
#line 1452 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1456 "test-utils.c"
}


/**
   * Prepare an aggregator and wait for it to reach quiescence.
   *
   * This will prepare the given {@link IndividualAggregator} then yield until
   * it reaches quiescence. No timeout is used, so if the aggregator never
   * reaches quiescence, this function will never return; callers must add their
   * own timeout to avoid this if necessary.
   *
   * When this returns, the aggregator is guaranteed to be quiescent.
   *
   * @param aggregator the aggregator to prepare
   */
static Block3Data* block3_data_ref (Block3Data* _data3_) {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return _data3_;
#line 1477 "test-utils.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_slice_free (Block3Data, _data3_);
#line 1488 "test-utils.c"
	}
}


static void __lambda5_ (Block3Data* _data3_, GObject* obj, GParamSpec* pspec) {
	gboolean _tmp0_ = FALSE;
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (obj != NULL);
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (pspec != NULL);
#line 239 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data3_->has_yielded;
#line 239 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp0_ == TRUE) {
#line 241 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data3_->_async_data_);
#line 1505 "test-utils.c"
	}
}


static void ___lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	__lambda5_ (self, _sender, pspec);
#line 1513 "test-utils.c"
}


static void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data_);
#line 1527 "test-utils.c"
}


static gboolean folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_) {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 0:
#line 1536 "test-utils.c"
		goto _state_0;
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 1:
#line 1540 "test-utils.c"
		goto _state_1;
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		case 2:
#line 1544 "test-utils.c"
		goto _state_2;
		default:
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 1549 "test-utils.c"
	}
	_state_0:
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data3_ = g_slice_new0 (Block3Data);
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data3_->_ref_count_ = 1;
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data3_->_async_data_ = _data_;
#line 236 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data3_->has_yielded = FALSE;
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->aggregator;
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = 0UL;
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = g_signal_connect_data ((GObject*) _data_->_tmp0_, "notify::is-quiescent", (GCallback) ___lambda5__g_object_notify, block3_data_ref (_data_->_data3_), (GClosureNotify) block3_data_unref, 0);
#line 237 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp1_;
#line 1570 "test-utils.c"
	{
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = NULL;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->aggregator;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_state_ = 1;
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare (_data_->_tmp2_, folks_test_utils_aggregator_prepare_and_wait_for_quiescence_ready, _data_);
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1582 "test-utils.c"
		_state_1:
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
#line 247 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_inner_error_ != NULL) {
#line 1588 "test-utils.c"
			goto __finally2;
		}
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = NULL;
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = _data_->aggregator;
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = FALSE;
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp3_);
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = FALSE;
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = _data_->_tmp4_;
#line 249 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_tmp5_ == FALSE) {
#line 251 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_data3_->has_yielded = TRUE;
#line 252 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 252 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1611 "test-utils.c"
			_state_2:
			;
		}
	}
	__finally2:
	{
#line 257 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = NULL;
#line 257 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = _data_->aggregator;
#line 257 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = 0UL;
#line 257 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = _data_->signal_id;
#line 257 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_signal_handler_disconnect ((GObject*) _data_->_tmp6_, _data_->_tmp7_);
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = NULL;
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = _data_->aggregator;
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = FALSE;
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp8_);
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = FALSE;
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 258 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_vala_assert (_data_->_tmp10_ == TRUE, "aggregator.is_quiescent == true");
#line 1642 "test-utils.c"
	}
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_inner_error_ != NULL) {
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_error_free (_data_->_inner_error_);
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		block3_data_unref (_data_->_data3_);
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_data_->_data3_ = NULL;
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1658 "test-utils.c"
		} else {
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1662 "test-utils.c"
		}
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 245 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1668 "test-utils.c"
	}
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	block3_data_unref (_data_->_data3_);
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_data_->_data3_ = NULL;
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1678 "test-utils.c"
	} else {
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1682 "test-utils.c"
	}
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 233 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1688 "test-utils.c"
}


/**
   * Run a helper executable.
   *
   * @param argv Arguments for the executable. The first is the path of
   *  the executable itself, relative to ${builddir}/tests.
   * @param capture_stdout If non-null, the executable's standard output is
   *  placed here. If null, the executable's standard output goes to the
   *  same place as the test's standard output.
   */
static gchar** _vala_array_dup1 (gchar** self, int length) {
	gchar** result;
	int i;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	result = g_new0 (gchar*, length + 1);
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	for (i = 0; i < length; i++) {
#line 1708 "test-utils.c"
		gchar* _tmp0_ = NULL;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp0_ = g_strdup (self[i]);
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		result[i] = _tmp0_;
#line 1714 "test-utils.c"
	}
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return result;
#line 1718 "test-utils.c"
}


void folks_test_utils_run_test_helper_sync (gchar** argv, int argv_length1, gchar** capture_stdout, GError** error) {
	gchar* _vala_capture_stdout = NULL;
	gchar* execdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar** argv_ = NULL;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gint argv__length1 = 0;
	gint _argv__size_ = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar** _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gint exit_status = 0;
	gchar** _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
	gchar* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	GError * _inner_error_ = NULL;
#line 276 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 276 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 1756 "test-utils.c"
		gchar* _tmp1_ = NULL;
#line 278 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp1_ = g_strdup (PKGLIBEXECDIR "/tests");
#line 278 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 278 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		execdir = _tmp1_;
#line 1764 "test-utils.c"
	} else {
		gchar* _tmp2_ = NULL;
#line 282 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strdup (ABS_TOP_BUILDDIR "/tests");
#line 282 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 282 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		execdir = _tmp2_;
#line 1773 "test-utils.c"
	}
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3_ = argv;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp3__length1 = argv_length1;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp4_ = argv;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp4__length1 = argv_length1;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp5_ = ((_tmp3_ + 0) != NULL) ? _vala_array_dup1 (_tmp3_ + 0, _tmp4__length1 - 0) : ((gpointer) (_tmp3_ + 0));
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp5__length1 = _tmp4__length1 - 0;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	argv_ = _tmp5_;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	argv__length1 = _tmp5__length1;
#line 285 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_argv__size_ = argv__length1;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp6_ = argv_;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp6__length1 = argv__length1;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp7_ = execdir;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp8_ = g_strconcat (_tmp7_, "/", NULL);
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp9_ = _tmp8_;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp10_ = argv_;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp10__length1 = argv__length1;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp11_ = _tmp10_[0];
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp12_ = g_strconcat (_tmp9_, _tmp11_, NULL);
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_free0 (_tmp6_[0]);
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp6_[0] = _tmp12_;
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp13_ = _tmp6_[0];
#line 286 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_free0 (_tmp9_);
#line 288 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	exit_status = -1;
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp14_ = argv_;
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp14__length1 = argv__length1;
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_spawn_sync (NULL, _tmp14_, NULL, 0, NULL, NULL, &_tmp15_, NULL, &_tmp16_, &_inner_error_);
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_free0 (_vala_capture_stdout);
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_vala_capture_stdout = _tmp15_;
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	exit_status = _tmp16_;
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_inner_error_ != NULL) {
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_propagate_error (error, _inner_error_);
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 289 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return;
#line 1843 "test-utils.c"
	}
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp17_ = exit_status;
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_spawn_check_exit_status (_tmp17_, &_inner_error_);
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_inner_error_ != NULL) {
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_propagate_error (error, _inner_error_);
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 298 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return;
#line 1859 "test-utils.c"
	}
#line 271 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 271 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_g_free0 (execdir);
#line 271 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (capture_stdout) {
#line 271 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		*capture_stdout = _vala_capture_stdout;
#line 1869 "test-utils.c"
	} else {
#line 271 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_g_free0 (_vala_capture_stdout);
#line 1873 "test-utils.c"
	}
}


/**
   * Return the path to a test file that is distributed in the source tarball
   * and, if installed, is installed into ${pkgdatadir}/tests.
   *
   * @param filename A filename relative to ${top_srcdir}/tests
   *  or ${pkgdatadir}/tests (or equivalently, ${datadir}/folks/tests).
   */
gchar* folks_test_utils_get_source_test_data (const gchar* filename) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
#line 308 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 310 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 310 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 1894 "test-utils.c"
		const gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
#line 312 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp1_ = filename;
#line 312 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strconcat (PACKAGE_DATADIR "/tests/", _tmp1_, NULL);
#line 312 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		result = _tmp2_;
#line 312 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return result;
#line 1905 "test-utils.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 316 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp3_ = filename;
#line 316 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp4_ = g_strconcat (ABS_TOP_SRCDIR "/tests/", _tmp3_, NULL);
#line 316 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		result = _tmp4_;
#line 316 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return result;
#line 1917 "test-utils.c"
	}
}


/**
   * Return the path to a test file that is built by "make"
   * and, if installed, is installed into ${pkgdatadir}/tests.
   *
   * @param filename A filename relative to ${top_builddir}/tests
   *  or ${pkgdatadir}/tests (or equivalently, ${datadir}/folks/tests).
   */
gchar* folks_test_utils_get_built_test_data (const gchar* filename) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
#line 327 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 329 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 329 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 1938 "test-utils.c"
		const gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
#line 331 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp1_ = filename;
#line 331 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strconcat (PACKAGE_DATADIR "/tests/", _tmp1_, NULL);
#line 331 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		result = _tmp2_;
#line 331 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return result;
#line 1949 "test-utils.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 335 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp3_ = filename;
#line 335 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		_tmp4_ = g_strconcat (ABS_TOP_BUILDDIR "/tests/", _tmp3_, NULL);
#line 335 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		result = _tmp4_;
#line 335 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return result;
#line 1961 "test-utils.c"
	}
}


FolksTestUtils* folks_test_utils_construct (GType object_type) {
	FolksTestUtils* self = NULL;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	self = (FolksTestUtils*) g_type_create_instance (object_type);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return self;
#line 1972 "test-utils.c"
}


FolksTestUtils* folks_test_utils_new (void) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return folks_test_utils_construct (FOLKS_TYPE_TEST_UTILS);
#line 1979 "test-utils.c"
}


static void folks_value_test_utils_init (GValue* value) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	value->data[0].v_pointer = NULL;
#line 1986 "test-utils.c"
}


static void folks_value_test_utils_free_value (GValue* value) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (value->data[0].v_pointer) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (value->data[0].v_pointer);
#line 1995 "test-utils.c"
	}
}


static void folks_value_test_utils_copy_value (const GValue* src_value, GValue* dest_value) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (src_value->data[0].v_pointer) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		dest_value->data[0].v_pointer = folks_test_utils_ref (src_value->data[0].v_pointer);
#line 2005 "test-utils.c"
	} else {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		dest_value->data[0].v_pointer = NULL;
#line 2009 "test-utils.c"
	}
}


static gpointer folks_value_test_utils_peek_pointer (const GValue* value) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return value->data[0].v_pointer;
#line 2017 "test-utils.c"
}


static gchar* folks_value_test_utils_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (collect_values[0].v_pointer) {
#line 2024 "test-utils.c"
		FolksTestUtils* object;
		object = collect_values[0].v_pointer;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		if (object->parent_instance.g_class == NULL) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2031 "test-utils.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2035 "test-utils.c"
		}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = folks_test_utils_ref (object);
#line 2039 "test-utils.c"
	} else {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 2043 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return NULL;
#line 2047 "test-utils.c"
}


static gchar* folks_value_test_utils_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FolksTestUtils** object_p;
	object_p = collect_values[0].v_pointer;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (!object_p) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 2058 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (!value->data[0].v_pointer) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		*object_p = NULL;
#line 2064 "test-utils.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		*object_p = value->data[0].v_pointer;
#line 2068 "test-utils.c"
	} else {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		*object_p = folks_test_utils_ref (value->data[0].v_pointer);
#line 2072 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return NULL;
#line 2076 "test-utils.c"
}


GParamSpec* folks_param_spec_test_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FolksParamSpecTestUtils* spec;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (g_type_is_a (object_type, FOLKS_TYPE_TEST_UTILS), NULL);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return G_PARAM_SPEC (spec);
#line 2090 "test-utils.c"
}


gpointer folks_value_get_test_utils (const GValue* value) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS), NULL);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return value->data[0].v_pointer;
#line 2099 "test-utils.c"
}


void folks_value_set_test_utils (GValue* value, gpointer v_object) {
	FolksTestUtils* old;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	old = value->data[0].v_pointer;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (v_object) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TYPE_TEST_UTILS));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = v_object;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_ref (value->data[0].v_pointer);
#line 2119 "test-utils.c"
	} else {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 2123 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (old) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (old);
#line 2129 "test-utils.c"
	}
}


void folks_value_take_test_utils (GValue* value, gpointer v_object) {
	FolksTestUtils* old;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	old = value->data[0].v_pointer;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (v_object) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TYPE_TEST_UTILS));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = v_object;
#line 2148 "test-utils.c"
	} else {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 2152 "test-utils.c"
	}
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (old) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (old);
#line 2158 "test-utils.c"
	}
}


static void folks_test_utils_class_init (FolksTestUtilsClass * klass) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	folks_test_utils_parent_class = g_type_class_peek_parent (klass);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	FOLKS_TEST_UTILS_CLASS (klass)->finalize = folks_test_utils_finalize;
#line 2168 "test-utils.c"
}


static void folks_test_utils_instance_init (FolksTestUtils * self) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	self->ref_count = 1;
#line 2175 "test-utils.c"
}


static void folks_test_utils_finalize (FolksTestUtils* obj) {
	FolksTestUtils * self;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_TEST_UTILS, FolksTestUtils);
#line 2183 "test-utils.c"
}


GType folks_test_utils_get_type (void) {
	static volatile gsize folks_test_utils_type_id__volatile = 0;
	if (g_once_init_enter (&folks_test_utils_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { folks_value_test_utils_init, folks_value_test_utils_free_value, folks_value_test_utils_copy_value, folks_value_test_utils_peek_pointer, "p", folks_value_test_utils_collect_value, "p", folks_value_test_utils_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FolksTestUtilsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_test_utils_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksTestUtils), 0, (GInstanceInitFunc) folks_test_utils_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType folks_test_utils_type_id;
		folks_test_utils_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FolksTestUtils", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&folks_test_utils_type_id__volatile, folks_test_utils_type_id);
	}
	return folks_test_utils_type_id__volatile;
}


gpointer folks_test_utils_ref (gpointer instance) {
	FolksTestUtils* self;
	self = instance;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&self->ref_count);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	return instance;
#line 2208 "test-utils.c"
}


void folks_test_utils_unref (gpointer instance) {
	FolksTestUtils* self;
	self = instance;
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		FOLKS_TEST_UTILS_GET_CLASS (self)->finalize (self);
#line 26 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 2221 "test-utils.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



