/* test-utils.c generated by valac 0.28.0.16-b1323, 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 <gee.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 _Block4Data Block4Data;
typedef struct _FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData;
typedef struct _Block5Data Block5Data;
typedef struct _FolksTestUtilsAggregatorWaitForIndividualsData FolksTestUtilsAggregatorWaitForIndividualsData;
typedef struct _Block6Data Block6Data;
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);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (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_;
	gchar* a_type;
	GInputStream* a_input;
	GLoadableIcon* _tmp5_;
	gint _tmp6_;
	gchar* _tmp7_;
	GInputStream* _tmp8_;
	gchar* b_type;
	GInputStream* b_input;
	GLoadableIcon* _tmp9_;
	gint _tmp10_;
	gchar* _tmp11_;
	GInputStream* _tmp12_;
	gsize bufsize;
	guint8* a_data;
	gsize _tmp13_;
	guint8* _tmp14_;
	gint a_data_length1;
	gint _a_data_size_;
	guint8* b_data;
	gsize _tmp15_;
	guint8* _tmp16_;
	gint b_data_length1;
	gint _b_data_size_;
	gsize a_read_size;
	gboolean _tmp17_;
	gsize _tmp18_;
	gssize _tmp19_;
	GInputStream* _tmp20_;
	guint8* _tmp21_;
	gint _tmp21__length1;
	gssize _tmp22_;
	gssize b_read_size;
	GInputStream* _tmp23_;
	guint8* _tmp24_;
	gint _tmp24__length1;
	gssize _tmp25_;
	gboolean _tmp26_;
	gsize _tmp27_;
	gssize _tmp28_;
	guint8* _tmp29_;
	gint _tmp29__length1;
	guint8* _tmp30_;
	gint _tmp30__length1;
	gsize _tmp31_;
	gint _tmp32_;
	GInputStream* _tmp33_;
	GInputStream* _tmp34_;
	GError* e1;
	const gchar* _tmp35_;
	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 _Block4Data {
	int _ref_count_;
	GeeHashSet* expected;
	gboolean has_yielded;
	gpointer _async_data_;
};

struct _FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividualAggregator* aggregator;
	gchar** expected_persona_names;
	gint expected_persona_names_length1;
	Block4Data* _data4_;
	GeeHashSet* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar** name_collection;
	gint name_collection_length1;
	gint _name_collection_size_;
	gint name_it;
	gchar* _tmp2_;
	gchar* name;
	GeeHashSet* _tmp3_;
	const gchar* _tmp4_;
	gulong signal_id;
	FolksIndividualAggregator* _tmp5_;
	gulong _tmp6_;
	FolksIndividualAggregator* _tmp7_;
	GeeHashSet* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	FolksIndividualAggregator* _tmp11_;
	gulong _tmp12_;
	GeeHashSet* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	GError * _inner_error_;
};

struct _Block5Data {
	int _ref_count_;
	GeeHashSet* expected_added;
	GeeHashSet* expected_removed;
	gpointer _async_data_;
};

struct _FolksTestUtilsAggregatorWaitForIndividualsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksIndividualAggregator* aggregator;
	gchar** expected_added_persona_names;
	gint expected_added_persona_names_length1;
	gchar** expected_removed_persona_names;
	gint expected_removed_persona_names_length1;
	Block5Data* _data5_;
	gboolean _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar** _tmp2_;
	gint _tmp2__length1;
	GeeHashSet* _tmp3_;
	GeeHashSet* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar** name_collection;
	gint name_collection_length1;
	gint _name_collection_size_;
	gint name_it;
	gchar* _tmp6_;
	gchar* name;
	GeeHashSet* _tmp7_;
	const gchar* _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gchar** _vala1_name_collection;
	gint _vala1_name_collection_length1;
	gint __vala1_name_collection_size_;
	gint _vala1_name_it;
	gchar* _tmp10_;
	gchar* _vala1_name;
	GeeHashSet* _tmp11_;
	const gchar* _tmp12_;
	gulong signal_id;
	FolksIndividualAggregator* _tmp13_;
	gulong _tmp14_;
	FolksIndividualAggregator* _tmp15_;
	gulong _tmp16_;
	gboolean _tmp17_;
	GeeHashSet* _tmp18_;
	gint _tmp19_;
	gint _tmp20_;
	GeeHashSet* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
};

struct _Block6Data {
	int _ref_count_;
	GMainLoop* main_loop;
};

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 __lambda4_ (void);
static gboolean ___lambda4__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 __lambda5_ (Block1Data* _data1_);
static gboolean ___lambda5__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 __lambda6_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec);
static void ___lambda6__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 __lambda7_ (Block3Data* _data3_, GObject* obj, GParamSpec* pspec);
static void ___lambda7__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_);
static void folks_test_utils_aggregator_prepare_and_wait_for_individuals_data_free (gpointer _data);
void folks_test_utils_aggregator_prepare_and_wait_for_individuals (FolksIndividualAggregator* aggregator, gchar** expected_persona_names, int expected_persona_names_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_test_utils_aggregator_prepare_and_wait_for_individuals_finish (GAsyncResult* _res_, GError** error);
static gboolean folks_test_utils_aggregator_prepare_and_wait_for_individuals_co (FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void __lambda8_ (Block4Data* _data4_, GeeMultiMap* changes);
static void ___lambda8__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void folks_test_utils_aggregator_prepare_and_wait_for_individuals_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_test_utils_aggregator_wait_for_individuals_data_free (gpointer _data);
void folks_test_utils_aggregator_wait_for_individuals (FolksIndividualAggregator* aggregator, gchar** expected_added_persona_names, int expected_added_persona_names_length1, gchar** expected_removed_persona_names, int expected_removed_persona_names_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_test_utils_aggregator_wait_for_individuals_finish (GAsyncResult* _res_);
static gboolean folks_test_utils_aggregator_wait_for_individuals_co (FolksTestUtilsAggregatorWaitForIndividualsData* _data_);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static void __lambda9_ (Block5Data* _data5_, GeeMultiMap* changes);
static void ___lambda9__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
void folks_test_utils_aggregator_prepare_and_wait_for_individuals_sync_with_timeout (FolksIndividualAggregator* aggregator, gchar** expected_persona_names, int expected_persona_names_length1, gint timeout);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void __lambda10_ (Block6Data* _data6_, GObject* o, GAsyncResult* r);
static void ___lambda10__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
FolksIndividual* folks_test_utils_get_individual_by_name (FolksIndividualAggregator* aggregator, const gchar* full_name);
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);
gboolean folks_test_utils_main_context_is_empty (GMainContext* context);
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 43 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = timeout;
#line 43 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_result_ = _tmp0_;
#line 45 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = g_getenv ("FOLKS_TEST_VALGRIND");
#line 45 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp1_ != NULL) {
#line 421 "test-utils.c"
		gint _tmp2_ = 0;
#line 47 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp2_ = _result_;
#line 47 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_result_ = _tmp2_ * 10;
#line 427 "test-utils.c"
	}
#line 50 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = g_getenv ("FOLKS_TEST_CALLGRIND");
#line 50 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp3_ != NULL) {
#line 433 "test-utils.c"
		gint _tmp4_ = 0;
#line 52 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = _result_;
#line 52 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_result_ = _tmp4_ * 10;
#line 439 "test-utils.c"
	}
#line 55 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	result = _result_;
#line 55 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 445 "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 __lambda4_ (void) {
	gboolean result = FALSE;
#line 71 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_error ("test-utils.vala:71: Timed out");
#line 71 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 464 "test-utils.c"
}


static gboolean ___lambda4__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda4_ ();
#line 71 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 473 "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 67 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (loop != NULL);
#line 69 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = timeout;
#line 69 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = folks_test_utils_multiply_timeout (_tmp0_);
#line 69 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = g_timeout_source_new_seconds ((guint) _tmp1_);
#line 69 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	source = _tmp2_;
#line 71 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_set_callback (source, ___lambda4__gsource_func, NULL, NULL);
#line 72 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = loop;
#line 72 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp4_ = g_main_loop_get_context (_tmp3_);
#line 72 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_attach (source, _tmp4_);
#line 74 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp5_ = loop;
#line 74 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_main_loop_run (_tmp5_);
#line 76 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_destroy (source);
#line 67 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_source_unref0 (source);
#line 511 "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 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return self ? g_main_loop_ref (self) : NULL;
#line 532 "test-utils.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data1_;
#line 541 "test-utils.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_main_loop_unref0 (_data1_->loop);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block1Data, _data1_);
#line 554 "test-utils.c"
	}
}


static gboolean __lambda5_ (Block1Data* _data1_) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_ = NULL;
#line 101 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data1_->loop;
#line 101 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_main_loop_quit (_tmp0_);
#line 102 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	result = FALSE;
#line 102 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 570 "test-utils.c"
}


static gboolean ___lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda5_ (self);
#line 99 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 579 "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 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (loop != NULL);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data1_ = g_slice_new0 (Block1Data);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data1_->_ref_count_ = 1;
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = loop;
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_main_loop_ref0 (_tmp0_);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_main_loop_unref0 (_data1_->loop);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data1_->loop = _tmp1_;
#line 97 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = timeout;
#line 97 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = folks_test_utils_multiply_timeout (_tmp2_);
#line 97 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp4_ = g_timeout_source_new_seconds ((guint) _tmp3_);
#line 97 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	source = _tmp4_;
#line 99 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_set_callback (source, ___lambda5__gsource_func, block1_data_ref (_data1_), block1_data_unref);
#line 104 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp5_ = _data1_->loop;
#line 104 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp6_ = g_main_loop_get_context (_tmp5_);
#line 104 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_attach (source, _tmp6_);
#line 106 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp7_ = _data1_->loop;
#line 106 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_main_loop_run (_tmp7_);
#line 108 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_source_destroy (source);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_source_unref0 (source);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block1_data_unref (_data1_);
#line 94 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data1_ = NULL;
#line 636 "test-utils.c"
}


static void folks_test_utils_loadable_icons_content_equal_data_free (gpointer _data) {
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
	_data_ = _data;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->a);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->b);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsLoadableIconsContentEqualData, _data_);
#line 649 "test-utils.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return self ? g_object_ref (self) : NULL;
#line 656 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsLoadableIconsContentEqualData);
#line 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = a;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->a);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->a = _tmp1_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = b;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->b);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->b = _tmp3_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp4_ = icon_size;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->icon_size = _tmp4_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_loadable_icons_content_equal_co (_data_);
#line 695 "test-utils.c"
}


gboolean folks_test_utils_loadable_icons_content_equal_finish (GAsyncResult* _res_) {
	gboolean result;
	FolksTestUtilsLoadableIconsContentEqualData* _data_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	result = _data_->result;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 708 "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 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_loadable_icons_content_equal_co (_data_);
#line 738 "test-utils.c"
}


static gboolean folks_test_utils_loadable_icons_content_equal_co (FolksTestUtilsLoadableIconsContentEqualData* _data_) {
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 0:
#line 747 "test-utils.c"
		goto _state_0;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 1:
#line 751 "test-utils.c"
		goto _state_1;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 2:
#line 755 "test-utils.c"
		goto _state_2;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 3:
#line 759 "test-utils.c"
		goto _state_3;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 4:
#line 763 "test-utils.c"
		goto _state_4;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 5:
#line 767 "test-utils.c"
		goto _state_5;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 6:
#line 771 "test-utils.c"
		goto _state_6;
		default:
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 776 "test-utils.c"
	}
	_state_0:
#line 131 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->retval = FALSE;
#line 133 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 133 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->a;
#line 133 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = NULL;
#line 133 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = _data_->b;
#line 133 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp0_ == _data_->_tmp1_) {
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->result = TRUE;
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 797 "test-utils.c"
		} else {
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 801 "test-utils.c"
		}
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 134 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 807 "test-utils.c"
	}
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = NULL;
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = _data_->a;
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp3_ != NULL) {
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = NULL;
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = _data_->b;
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->_tmp4_ != NULL;
#line 821 "test-utils.c"
	} else {
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = FALSE;
#line 825 "test-utils.c"
	}
#line 136 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp2_) {
#line 829 "test-utils.c"
		{
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp5_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp5_ = _data_->a;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = 0;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = _data_->icon_size;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp7_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 1;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_loadable_icon_load_async (_data_->_tmp5_, _data_->_tmp6_, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 847 "test-utils.c"
			_state_1:
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp8_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp8_ = g_loadable_icon_load_finish (_data_->_tmp5_, _data_->_res_, &_data_->_tmp7_, &_data_->_inner_error_);
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->a_type);
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_type = _data_->_tmp7_;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_input = _data_->_tmp8_;
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 141 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 863 "test-utils.c"
				goto __catch1_g_error;
			}
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp9_ = NULL;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp9_ = _data_->b;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = 0;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = _data_->icon_size;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp11_ = NULL;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_loadable_icon_load_async (_data_->_tmp9_, _data_->_tmp10_, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 882 "test-utils.c"
			_state_2:
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp12_ = NULL;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp12_ = g_loadable_icon_load_finish (_data_->_tmp9_, _data_->_res_, &_data_->_tmp11_, &_data_->_inner_error_);
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->b_type);
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_type = _data_->_tmp11_;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_input = _data_->_tmp12_;
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 143 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 902 "test-utils.c"
				goto __catch1_g_error;
			}
#line 146 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->bufsize = (gsize) 2048;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp13_ = 0UL;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp13_ = _data_->bufsize;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp14_ = NULL;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp14_ = g_new0 (guint8, _data_->_tmp13_);
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_data_length1 = 0;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_a_data_size_ = 0;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_data = _data_->_tmp14_;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_data_length1 = _data_->_tmp13_;
#line 147 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_a_data_size_ = _data_->a_data_length1;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp15_ = 0UL;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp15_ = _data_->bufsize;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp16_ = NULL;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp16_ = g_new0 (guint8, _data_->_tmp15_);
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_data_length1 = 0;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_b_data_size_ = 0;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_data = _data_->_tmp16_;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_data_length1 = _data_->_tmp15_;
#line 148 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_b_data_size_ = _data_->b_data_length1;
#line 151 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->retval = TRUE;
#line 152 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_read_size = (gsize) (-1);
#line 947 "test-utils.c"
			{
#line 153 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp17_ = TRUE;
#line 153 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				while (TRUE) {
#line 153 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					if (!_data_->_tmp17_) {
#line 165 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp18_ = 0UL;
#line 165 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp18_ = _data_->a_read_size;
#line 165 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						if (!(_data_->_tmp18_ > ((gsize) 0))) {
#line 165 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
							break;
#line 963 "test-utils.c"
						}
					}
#line 153 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp17_ = FALSE;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp20_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp20_ = _data_->a_input;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp21_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp21__length1 = 0;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp21_ = _data_->a_data;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp21__length1 = _data_->a_data_length1;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_state_ = 3;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					g_input_stream_read_async (_data_->_tmp20_, _data_->_tmp21_, (gsize) _data_->_tmp21__length1, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					return FALSE;
#line 986 "test-utils.c"
					_state_3:
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp22_ = 0L;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp22_ = g_input_stream_read_finish (_data_->_tmp20_, _data_->_res_, &_data_->_inner_error_);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp19_ = _data_->_tmp22_;
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->b_data = (g_free (_data_->b_data), NULL);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->a_data = (g_free (_data_->a_data), NULL);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->b_input);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->b_type);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->a_input);
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->a_type);
#line 1008 "test-utils.c"
						goto __catch1_g_error;
					}
#line 155 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->a_read_size = (gsize) _data_->_tmp19_;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp23_ = NULL;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp23_ = _data_->b_input;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp24_ = NULL;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp24__length1 = 0;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp24_ = _data_->b_data;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp24__length1 = _data_->b_data_length1;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_state_ = 4;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					g_input_stream_read_async (_data_->_tmp23_, _data_->_tmp24_, (gsize) _data_->_tmp24__length1, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					return FALSE;
#line 1031 "test-utils.c"
					_state_4:
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp25_ = 0L;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp25_ = g_input_stream_read_finish (_data_->_tmp23_, _data_->_res_, &_data_->_inner_error_);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->b_read_size = _data_->_tmp25_;
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->b_data = (g_free (_data_->b_data), NULL);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->a_data = (g_free (_data_->a_data), NULL);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->b_input);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->b_type);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_object_unref0 (_data_->a_input);
#line 156 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_g_free0 (_data_->a_type);
#line 1053 "test-utils.c"
						goto __catch1_g_error;
					}
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp27_ = 0UL;
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp27_ = _data_->a_read_size;
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp28_ = 0L;
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					_data_->_tmp28_ = _data_->b_read_size;
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					if (_data_->_tmp27_ != ((gsize) _data_->_tmp28_)) {
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp26_ = TRUE;
#line 1068 "test-utils.c"
					} else {
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp29_ = NULL;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp29__length1 = 0;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp29_ = _data_->a_data;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp29__length1 = _data_->a_data_length1;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp30_ = NULL;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp30__length1 = 0;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp30_ = _data_->b_data;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp30__length1 = _data_->b_data_length1;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp31_ = 0UL;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp31_ = _data_->a_read_size;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp32_ = 0;
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp32_ = memcmp (_data_->_tmp29_, _data_->_tmp30_, _data_->_tmp31_);
#line 159 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->_tmp26_ = _data_->_tmp32_ != 0;
#line 1096 "test-utils.c"
					}
#line 158 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
					if (_data_->_tmp26_) {
#line 161 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						_data_->retval = FALSE;
#line 162 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
						break;
#line 1104 "test-utils.c"
					}
				}
			}
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp33_ = NULL;
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp33_ = _data_->a_input;
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 5;
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_input_stream_close_async (_data_->_tmp33_, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1118 "test-utils.c"
			_state_5:
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_input_stream_close_finish (_data_->_tmp33_, _data_->_res_, &_data_->_inner_error_);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->b_data = (g_free (_data_->b_data), NULL);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->a_data = (g_free (_data_->a_data), NULL);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->b_input);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 167 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 1136 "test-utils.c"
				goto __catch1_g_error;
			}
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp34_ = NULL;
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp34_ = _data_->b_input;
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 6;
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_input_stream_close_async (_data_->_tmp34_, G_PRIORITY_DEFAULT, NULL, folks_test_utils_loadable_icons_content_equal_ready, _data_);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1149 "test-utils.c"
			_state_6:
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_input_stream_close_finish (_data_->_tmp34_, _data_->_res_, &_data_->_inner_error_);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->b_data = (g_free (_data_->b_data), NULL);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->a_data = (g_free (_data_->a_data), NULL);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->b_input);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->b_type);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_data_->a_input);
#line 168 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->a_type);
#line 1167 "test-utils.c"
				goto __catch1_g_error;
			}
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->b_data = (g_free (_data_->b_data), NULL);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->a_data = (g_free (_data_->a_data), NULL);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (_data_->b_input);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->b_type);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (_data_->a_input);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_free0 (_data_->a_type);
#line 1182 "test-utils.c"
		}
		goto __finally1;
		__catch1_g_error:
		{
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->e1 = _data_->_inner_error_;
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_inner_error_ = NULL;
#line 172 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->retval = FALSE;
#line 173 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp35_ = NULL;
#line 173 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp35_ = _data_->e1->message;
#line 173 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_error ("test-utils.vala:173: Failed to read loadable icon for comparison: %s", _data_->_tmp35_);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_error_free0 (_data_->e1);
#line 1201 "test-utils.c"
		}
		__finally1:
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 138 "/opt/gnome3/source/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 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_clear_error (&_data_->_inner_error_);
#line 138 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1212 "test-utils.c"
		}
	}
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->result = _data_->retval;
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1221 "test-utils.c"
	} else {
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1225 "test-utils.c"
	}
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 178 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1235 "test-utils.c"
	} else {
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1239 "test-utils.c"
	}
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 127 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1245 "test-utils.c"
}


static void folks_test_utils_backend_prepare_and_wait_for_quiescence_data_free (gpointer _data) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
	_data_ = _data;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->backend);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData, _data_);
#line 1256 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData);
#line 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = backend;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->backend);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->backend = _tmp1_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data_);
#line 1280 "test-utils.c"
}


void folks_test_utils_backend_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error) {
	FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 1290 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1294 "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 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data2_;
#line 1315 "test-utils.c"
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block2Data, _data2_);
#line 1326 "test-utils.c"
	}
}


static void __lambda6_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec) {
	gboolean _tmp0_ = FALSE;
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (obj != NULL);
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (pspec != NULL);
#line 199 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data2_->has_yielded;
#line 199 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ == TRUE) {
#line 201 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data2_->_async_data_);
#line 1343 "test-utils.c"
	}
}


static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	__lambda6_ (self, _sender, pspec);
#line 1351 "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 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_backend_prepare_and_wait_for_quiescence_co (_data_);
#line 1365 "test-utils.c"
}


static gboolean folks_test_utils_backend_prepare_and_wait_for_quiescence_co (FolksTestUtilsBackendPrepareAndWaitForQuiescenceData* _data_) {
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 0:
#line 1374 "test-utils.c"
		goto _state_0;
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 1:
#line 1378 "test-utils.c"
		goto _state_1;
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 2:
#line 1382 "test-utils.c"
		goto _state_2;
		default:
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 1387 "test-utils.c"
	}
	_state_0:
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data2_ = g_slice_new0 (Block2Data);
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data2_->_ref_count_ = 1;
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data2_->_async_data_ = _data_;
#line 196 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data2_->has_yielded = FALSE;
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->backend;
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = 0UL;
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = g_signal_connect_data ((GObject*) _data_->_tmp0_, "notify::is-quiescent", (GCallback) ___lambda6__g_object_notify, block2_data_ref (_data_->_data2_), (GClosureNotify) block2_data_unref, 0);
#line 197 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp1_;
#line 1408 "test-utils.c"
	{
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = NULL;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->backend;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_state_ = 1;
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_backend_prepare (_data_->_tmp2_, folks_test_utils_backend_prepare_and_wait_for_quiescence_ready, _data_);
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1420 "test-utils.c"
		_state_1:
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_backend_prepare_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
#line 207 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1426 "test-utils.c"
			goto __finally2;
		}
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = NULL;
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = _data_->backend;
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = FALSE;
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = folks_backend_get_is_quiescent (_data_->_tmp3_);
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = FALSE;
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = _data_->_tmp4_;
#line 209 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_tmp5_ == FALSE) {
#line 211 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_data2_->has_yielded = TRUE;
#line 212 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 212 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1449 "test-utils.c"
			_state_2:
			;
		}
	}
	__finally2:
	{
#line 217 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = NULL;
#line 217 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = _data_->backend;
#line 217 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = 0UL;
#line 217 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = _data_->signal_id;
#line 217 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_signal_handler_disconnect ((GObject*) _data_->_tmp6_, _data_->_tmp7_);
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = NULL;
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = _data_->backend;
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = FALSE;
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = folks_backend_get_is_quiescent (_data_->_tmp8_);
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = FALSE;
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 218 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_vala_assert (_data_->_tmp10_ == TRUE, "backend.is_quiescent == true");
#line 1480 "test-utils.c"
	}
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_error_free (_data_->_inner_error_);
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		block2_data_unref (_data_->_data2_);
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_data2_ = NULL;
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1496 "test-utils.c"
		} else {
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1500 "test-utils.c"
		}
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 205 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1506 "test-utils.c"
	}
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block2_data_unref (_data_->_data2_);
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data2_ = NULL;
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1516 "test-utils.c"
	} else {
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1520 "test-utils.c"
	}
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 193 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1526 "test-utils.c"
}


static void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_data_free (gpointer _data) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
	_data_ = _data;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData, _data_);
#line 1537 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData);
#line 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = aggregator;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->aggregator = _tmp1_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data_);
#line 1561 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_quiescence_finish (GAsyncResult* _res_, GError** error) {
	FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 1571 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1575 "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 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data3_->_ref_count_);
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data3_;
#line 1596 "test-utils.c"
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block3Data, _data3_);
#line 1607 "test-utils.c"
	}
}


static void __lambda7_ (Block3Data* _data3_, GObject* obj, GParamSpec* pspec) {
	gboolean _tmp0_ = FALSE;
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (obj != NULL);
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (pspec != NULL);
#line 240 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = _data3_->has_yielded;
#line 240 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ == TRUE) {
#line 242 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data3_->_async_data_);
#line 1624 "test-utils.c"
	}
}


static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	__lambda7_ (self, _sender, pspec);
#line 1632 "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 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (_data_);
#line 1646 "test-utils.c"
}


static gboolean folks_test_utils_aggregator_prepare_and_wait_for_quiescence_co (FolksTestUtilsAggregatorPrepareAndWaitForQuiescenceData* _data_) {
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 0:
#line 1655 "test-utils.c"
		goto _state_0;
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 1:
#line 1659 "test-utils.c"
		goto _state_1;
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 2:
#line 1663 "test-utils.c"
		goto _state_2;
		default:
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 1668 "test-utils.c"
	}
	_state_0:
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data3_ = g_slice_new0 (Block3Data);
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data3_->_ref_count_ = 1;
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data3_->_async_data_ = _data_;
#line 237 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data3_->has_yielded = FALSE;
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = _data_->aggregator;
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = 0UL;
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = g_signal_connect_data ((GObject*) _data_->_tmp0_, "notify::is-quiescent", (GCallback) ___lambda7__g_object_notify, block3_data_ref (_data_->_data3_), (GClosureNotify) block3_data_unref, 0);
#line 238 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp1_;
#line 1689 "test-utils.c"
	{
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = NULL;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->aggregator;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_state_ = 1;
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare (_data_->_tmp2_, folks_test_utils_aggregator_prepare_and_wait_for_quiescence_ready, _data_);
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1701 "test-utils.c"
		_state_1:
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
#line 248 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1707 "test-utils.c"
			goto __finally3;
		}
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = NULL;
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp3_ = _data_->aggregator;
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = FALSE;
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp4_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp3_);
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = FALSE;
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp5_ = _data_->_tmp4_;
#line 250 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_tmp5_ == FALSE) {
#line 252 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_data3_->has_yielded = TRUE;
#line 253 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 253 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 1730 "test-utils.c"
			_state_2:
			;
		}
	}
	__finally3:
	{
#line 258 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = NULL;
#line 258 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp6_ = _data_->aggregator;
#line 258 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = 0UL;
#line 258 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = _data_->signal_id;
#line 258 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_signal_handler_disconnect ((GObject*) _data_->_tmp6_, _data_->_tmp7_);
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = NULL;
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = _data_->aggregator;
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = FALSE;
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp8_);
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = FALSE;
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 259 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_vala_assert (_data_->_tmp10_ == TRUE, "aggregator.is_quiescent == true");
#line 1761 "test-utils.c"
	}
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_error_free (_data_->_inner_error_);
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		block3_data_unref (_data_->_data3_);
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_data3_ = NULL;
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1777 "test-utils.c"
		} else {
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1781 "test-utils.c"
		}
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 246 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 1787 "test-utils.c"
	}
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block3_data_unref (_data_->_data3_);
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data3_ = NULL;
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1797 "test-utils.c"
	} else {
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1801 "test-utils.c"
	}
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 234 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 1807 "test-utils.c"
}


static void folks_test_utils_aggregator_prepare_and_wait_for_individuals_data_free (gpointer _data) {
	FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_;
	_data_ = _data;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData, _data_);
#line 1818 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_individuals (FolksIndividualAggregator* aggregator, gchar** expected_persona_names, int expected_persona_names_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_;
	FolksIndividualAggregator* _tmp0_ = NULL;
	FolksIndividualAggregator* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData);
#line 27 "/opt/gnome3/source/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_individuals);
#line 27 "/opt/gnome3/source/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_individuals_data_free);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = aggregator;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->aggregator = _tmp1_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = expected_persona_names;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2__length1 = expected_persona_names_length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_persona_names = _tmp2_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_persona_names_length1 = _tmp2__length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_individuals_co (_data_);
#line 1852 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_individuals_finish (GAsyncResult* _res_, GError** error) {
	FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 1862 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1866 "test-utils.c"
}


/**
   * Prepare an aggregator and wait for the given personas to be added to it.
   *
   * This will prepare the given {@link IndividualAggregator} then yield until
   * all of the personas listed in ``expected_persona_names`` are added to it.
   * Each of the personas must be added in its own {@link Individual} (i.e. no
   * personas may be linked) and only additions can occur — no personas may be
   * removed. Accordingly, this function is intended for testing the behaviour
   * of a single {@link PersonaStore} without linking.
   *
   * No timeout is used, so if the aggregator never adds all the expected
   * personas, this function will never return; callers must add their own
   * timeout to avoid this if necessary. On return from this function, all of
   * the given names are guaranteed to exist in the aggregator.
   *
   * The names in ``expected_persona_names`` must be those appearing in the
   * {@link NameDetails.full_name} property of the personas (and hence of the
   * individuals).
   *
   * When this returns, the aggregator is //not// guaranteed to be quiescent.
   *
   * @param aggregator the aggregator to prepare
   * @param expected_persona_names set of full names of the expected personas
   * @throws GLib.Error if preparing the aggregator failed
   *
   * @since 0.9.7
   */
static Block4Data* block4_data_ref (Block4Data* _data4_) {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data4_->_ref_count_);
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data4_;
#line 1902 "test-utils.c"
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_data4_->expected);
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block4Data, _data4_);
#line 1915 "test-utils.c"
	}
}


static void __lambda8_ (Block4Data* _data4_, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp23_ = NULL;
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
	gboolean _tmp33_ = FALSE;
	GeeHashSet* _tmp34_ = NULL;
	gint _tmp35_ = 0;
	gint _tmp36_ = 0;
#line 302 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (changes != NULL);
#line 304 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = changes;
#line 304 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 304 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	added = _tmp1_;
#line 305 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = changes;
#line 305 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 305 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	removed = _tmp3_;
#line 1948 "test-utils.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = added;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_i_it = _tmp5_;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		while (TRUE) {
#line 1961 "test-utils.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			FolksIndividual* _tmp10_ = NULL;
			FolksIndividual* _tmp11_ = NULL;
			GeeSet* _tmp12_ = NULL;
			GeeSet* _tmp13_ = NULL;
			gint _tmp14_ = 0;
			gint _tmp15_ = 0;
			FolksNameDetails* name_details = NULL;
			FolksIndividual* _tmp16_ = NULL;
			FolksNameDetails* _tmp17_ = NULL;
			FolksNameDetails* _tmp18_ = NULL;
			GeeHashSet* _tmp19_ = NULL;
			FolksNameDetails* _tmp20_ = NULL;
			const gchar* _tmp21_ = NULL;
			const gchar* _tmp22_ = NULL;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp6_ = _i_it;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (!_tmp7_) {
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 1989 "test-utils.c"
			}
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp8_ = _i_it;
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			i = (FolksIndividual*) _tmp9_;
#line 309 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp10_ = i;
#line 309 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp10_ != NULL, "i != null");
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp11_ = i;
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp12_ = folks_individual_get_personas (_tmp11_);
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp13_ = _tmp12_;
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_);
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp15_ = _tmp14_;
#line 310 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp15_ == 1, "i.personas.size == 1");
#line 312 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp16_ = i;
#line 312 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp16_) : NULL);
#line 312 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			name_details = _tmp17_;
#line 313 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp18_ = name_details;
#line 313 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp18_ != NULL, "name_details != null");
#line 314 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp19_ = _data4_->expected;
#line 314 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp20_ = name_details;
#line 314 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp21_ = folks_name_details_get_full_name (_tmp20_);
#line 314 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp22_ = _tmp21_;
#line 314 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp19_, _tmp22_);
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (name_details);
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (i);
#line 2037 "test-utils.c"
		}
#line 307 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_i_it);
#line 2041 "test-utils.c"
	}
#line 317 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp23_ = removed;
#line 317 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp24_ = gee_collection_get_size ((GeeCollection*) _tmp23_);
#line 317 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp25_ = _tmp24_;
#line 317 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_vala_assert (_tmp25_ == 1, "removed.size == 1");
#line 2051 "test-utils.c"
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp26_ = NULL;
		GeeIterator* _tmp27_ = NULL;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp26_ = removed;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_i_it = _tmp27_;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		while (TRUE) {
#line 2064 "test-utils.c"
			GeeIterator* _tmp28_ = NULL;
			gboolean _tmp29_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp30_ = NULL;
			gpointer _tmp31_ = NULL;
			FolksIndividual* _tmp32_ = NULL;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp28_ = _i_it;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp29_ = gee_iterator_next (_tmp28_);
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (!_tmp29_) {
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 2079 "test-utils.c"
			}
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp30_ = _i_it;
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp31_ = gee_iterator_get (_tmp30_);
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			i = (FolksIndividual*) _tmp31_;
#line 320 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp32_ = i;
#line 320 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp32_ == NULL, "i == null");
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (i);
#line 2093 "test-utils.c"
		}
#line 319 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_i_it);
#line 2097 "test-utils.c"
	}
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp34_ = _data4_->expected;
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp35_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp34_);
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp36_ = _tmp35_;
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp36_ == 0) {
#line 2107 "test-utils.c"
		gboolean _tmp37_ = FALSE;
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp37_ = _data4_->has_yielded;
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp33_ = _tmp37_ == TRUE;
#line 2113 "test-utils.c"
	} else {
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp33_ = FALSE;
#line 2117 "test-utils.c"
	}
#line 323 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp33_) {
#line 324 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_individuals_co (_data4_->_async_data_);
#line 2123 "test-utils.c"
	}
#line 302 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (removed);
#line 302 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (added);
#line 2129 "test-utils.c"
}


static void ___lambda8__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	__lambda8_ (self, changes);
#line 2136 "test-utils.c"
}


static void folks_test_utils_aggregator_prepare_and_wait_for_individuals_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = _user_data_;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_source_object_ = source_object;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_res_ = _res_;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_individuals_co (_data_);
#line 2150 "test-utils.c"
}


static gboolean folks_test_utils_aggregator_prepare_and_wait_for_individuals_co (FolksTestUtilsAggregatorPrepareAndWaitForIndividualsData* _data_) {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 0:
#line 2159 "test-utils.c"
		goto _state_0;
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 1:
#line 2163 "test-utils.c"
		goto _state_1;
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 2:
#line 2167 "test-utils.c"
		goto _state_2;
		default:
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 2172 "test-utils.c"
	}
	_state_0:
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_ = g_slice_new0 (Block4Data);
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_->_ref_count_ = 1;
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_->_async_data_ = _data_;
#line 294 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = NULL;
#line 294 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 294 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_->expected = _data_->_tmp0_;
#line 295 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_->has_yielded = FALSE;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = NULL;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1__length1 = 0;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = _data_->expected_persona_names;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1__length1 = _data_->expected_persona_names_length1;
#line 2197 "test-utils.c"
	{
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection_length1 = 0;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_name_collection_size_ = 0;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection = _data_->_tmp1_;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection_length1 = _data_->_tmp1__length1;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		for (_data_->name_it = 0; _data_->name_it < _data_->_tmp1__length1; _data_->name_it = _data_->name_it + 1) {
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp2_ = NULL;
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp2_ = g_strdup (_data_->name_collection[_data_->name_it]);
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->name = _data_->_tmp2_;
#line 2215 "test-utils.c"
			{
#line 298 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp3_ = NULL;
#line 298 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp3_ = _data_->_data4_->expected;
#line 298 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp4_ = NULL;
#line 298 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp4_ = _data_->name;
#line 298 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp3_, _data_->_tmp4_);
#line 297 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->name);
#line 2229 "test-utils.c"
			}
		}
	}
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = NULL;
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = _data_->aggregator;
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp6_ = 0UL;
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp6_ = g_signal_connect_data (_data_->_tmp5_, "individuals-changed-detailed", (GCallback) ___lambda8__folks_individual_aggregator_individuals_changed_detailed, block4_data_ref (_data_->_data4_), (GClosureNotify) block4_data_unref, 0);
#line 301 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp6_;
#line 2243 "test-utils.c"
	{
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = NULL;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp7_ = _data_->aggregator;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_state_ = 1;
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare (_data_->_tmp7_, folks_test_utils_aggregator_prepare_and_wait_for_individuals_ready, _data_);
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 2255 "test-utils.c"
		_state_1:
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error_);
#line 329 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 2261 "test-utils.c"
			goto __finally4;
		}
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = NULL;
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp8_ = _data_->_data4_->expected;
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = 0;
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp9_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp8_);
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = 0;
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp10_ = _data_->_tmp9_;
#line 331 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_tmp10_ != 0) {
#line 333 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_data4_->has_yielded = TRUE;
#line 334 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_state_ = 2;
#line 334 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return FALSE;
#line 2284 "test-utils.c"
			_state_2:
			;
		}
	}
	__finally4:
	{
#line 339 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp11_ = NULL;
#line 339 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp11_ = _data_->aggregator;
#line 339 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp12_ = 0UL;
#line 339 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp12_ = _data_->signal_id;
#line 339 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_signal_handler_disconnect ((GObject*) _data_->_tmp11_, _data_->_tmp12_);
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp13_ = NULL;
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp13_ = _data_->_data4_->expected;
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp14_ = 0;
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp14_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp13_);
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp15_ = 0;
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp15_ = _data_->_tmp14_;
#line 340 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_vala_assert (_data_->_tmp15_ == 0, "expected.size == 0");
#line 2315 "test-utils.c"
	}
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_error_free (_data_->_inner_error_);
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		block4_data_unref (_data_->_data4_);
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_data4_ = NULL;
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (_data_->_state_ == 0) {
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2331 "test-utils.c"
		} else {
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2335 "test-utils.c"
		}
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_object_unref (_data_->_async_result);
#line 327 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return FALSE;
#line 2341 "test-utils.c"
	}
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block4_data_unref (_data_->_data4_);
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data4_ = NULL;
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2351 "test-utils.c"
	} else {
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2355 "test-utils.c"
	}
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 290 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 2361 "test-utils.c"
}


static void folks_test_utils_aggregator_wait_for_individuals_data_free (gpointer _data) {
	FolksTestUtilsAggregatorWaitForIndividualsData* _data_;
	_data_ = _data;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_slice_free (FolksTestUtilsAggregatorWaitForIndividualsData, _data_);
#line 2372 "test-utils.c"
}


void folks_test_utils_aggregator_wait_for_individuals (FolksIndividualAggregator* aggregator, gchar** expected_added_persona_names, int expected_added_persona_names_length1, gchar** expected_removed_persona_names, int expected_removed_persona_names_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksTestUtilsAggregatorWaitForIndividualsData* _data_;
	FolksIndividualAggregator* _tmp0_ = NULL;
	FolksIndividualAggregator* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_slice_new0 (FolksTestUtilsAggregatorWaitForIndividualsData);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_test_utils_aggregator_wait_for_individuals);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_test_utils_aggregator_wait_for_individuals_data_free);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = aggregator;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (_data_->aggregator);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->aggregator = _tmp1_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = expected_added_persona_names;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2__length1 = expected_added_persona_names_length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_added_persona_names = _tmp2_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_added_persona_names_length1 = _tmp2__length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = expected_removed_persona_names;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3__length1 = expected_removed_persona_names_length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_removed_persona_names = _tmp3_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->expected_removed_persona_names_length1 = _tmp3__length1;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_wait_for_individuals_co (_data_);
#line 2416 "test-utils.c"
}


void folks_test_utils_aggregator_wait_for_individuals_finish (GAsyncResult* _res_) {
	FolksTestUtilsAggregatorWaitForIndividualsData* _data_;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 2424 "test-utils.c"
}


/**
   * Wait for the given personas to be added to or removed from an aggregator.
   *
   * This will yield until all of the personas listed in
   * ``expected_added_persona_names`` are added to the aggregator; or until all
   * of the personas listed in ``expected_removed_persona_names`` are removed
   * from it. Only one of the two arrays may be non-empty; this method does not
   * currently implement checking of complex individual change notifications.
   *
   * No timeout is used, so if the aggregator never adds or removes all the
   * expected personas, this function will never return; callers must add their
   * own timeout to avoid this if necessary. On return from this function, all
   * of the given names are guaranteed to exist in the aggregator.
   *
   * The names in ``expected_added_persona_names`` and
   * ``expected_removed_persona_names`` must be those appearing in the
   * {@link NameDetails.full_name} property of the personas (and hence of the
   * individuals).
   *
   * @param aggregator the aggregator to check
   * @param expected_added_persona_names set of full names of the expected
   * personas to be added
   * @param expected_removed_persona_names set of full names of the expected
   * personas to be removed
   *
   * @since 0.9.7
   */
static Block5Data* block5_data_ref (Block5Data* _data5_) {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data5_->_ref_count_);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data5_;
#line 2460 "test-utils.c"
}


static void block5_data_unref (void * _userdata_) {
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_data5_->expected_removed);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_data5_->expected_added);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block5Data, _data5_);
#line 2475 "test-utils.c"
	}
}


static void __lambda9_ (Block5Data* _data5_, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	gboolean _tmp40_ = FALSE;
	GeeHashSet* _tmp41_ = NULL;
	gint _tmp42_ = 0;
	gint _tmp43_ = 0;
#line 389 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (changes != NULL);
#line 391 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = changes;
#line 391 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 391 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	added = _tmp1_;
#line 392 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = changes;
#line 392 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 392 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	removed = _tmp3_;
#line 2505 "test-utils.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = added;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_i_it = _tmp5_;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		while (TRUE) {
#line 2518 "test-utils.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			GeeHashSet* _tmp10_ = NULL;
			gint _tmp11_ = 0;
			gint _tmp12_ = 0;
			FolksIndividual* _tmp14_ = NULL;
			FolksNameDetails* name_details = NULL;
			FolksIndividual* _tmp15_ = NULL;
			FolksNameDetails* _tmp16_ = NULL;
			FolksNameDetails* _tmp17_ = NULL;
			GeeHashSet* _tmp18_ = NULL;
			FolksNameDetails* _tmp19_ = NULL;
			const gchar* _tmp20_ = NULL;
			const gchar* _tmp21_ = NULL;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp6_ = _i_it;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (!_tmp7_) {
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 2544 "test-utils.c"
			}
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp8_ = _i_it;
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			i = (FolksIndividual*) _tmp9_;
#line 396 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp10_ = _data5_->expected_added;
#line 396 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp11_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp10_);
#line 396 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp12_ = _tmp11_;
#line 396 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (_tmp12_ == 0) {
#line 2560 "test-utils.c"
				FolksIndividual* _tmp13_ = NULL;
#line 398 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_tmp13_ = i;
#line 398 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_vala_assert (_tmp13_ == NULL, "i == null");
#line 399 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (i);
#line 399 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 2570 "test-utils.c"
			}
#line 402 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp14_ = i;
#line 402 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp14_ != NULL, "i != null");
#line 404 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp15_ = i;
#line 404 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp15_) : NULL);
#line 404 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			name_details = _tmp16_;
#line 405 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp17_ = name_details;
#line 405 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp17_ != NULL, "name_details != null");
#line 406 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp18_ = _data5_->expected_added;
#line 406 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp19_ = name_details;
#line 406 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp20_ = folks_name_details_get_full_name (_tmp19_);
#line 406 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp21_ = _tmp20_;
#line 406 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp18_, _tmp21_);
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (name_details);
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (i);
#line 2600 "test-utils.c"
		}
#line 394 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_i_it);
#line 2604 "test-utils.c"
	}
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp22_ = NULL;
		GeeIterator* _tmp23_ = NULL;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp22_ = removed;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp23_ = gee_iterable_iterator ((GeeIterable*) _tmp22_);
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_i_it = _tmp23_;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		while (TRUE) {
#line 2618 "test-utils.c"
			GeeIterator* _tmp24_ = NULL;
			gboolean _tmp25_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp26_ = NULL;
			gpointer _tmp27_ = NULL;
			GeeHashSet* _tmp28_ = NULL;
			gint _tmp29_ = 0;
			gint _tmp30_ = 0;
			FolksIndividual* _tmp32_ = NULL;
			FolksNameDetails* name_details = NULL;
			FolksIndividual* _tmp33_ = NULL;
			FolksNameDetails* _tmp34_ = NULL;
			FolksNameDetails* _tmp35_ = NULL;
			GeeHashSet* _tmp36_ = NULL;
			FolksNameDetails* _tmp37_ = NULL;
			const gchar* _tmp38_ = NULL;
			const gchar* _tmp39_ = NULL;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp24_ = _i_it;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp25_ = gee_iterator_next (_tmp24_);
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (!_tmp25_) {
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 2644 "test-utils.c"
			}
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp26_ = _i_it;
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp27_ = gee_iterator_get (_tmp26_);
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			i = (FolksIndividual*) _tmp27_;
#line 411 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp28_ = _data5_->expected_removed;
#line 411 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp29_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp28_);
#line 411 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp30_ = _tmp29_;
#line 411 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (_tmp30_ == 0) {
#line 2660 "test-utils.c"
				FolksIndividual* _tmp31_ = NULL;
#line 413 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_tmp31_ = i;
#line 413 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_vala_assert (_tmp31_ == NULL, "i == null");
#line 414 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (i);
#line 414 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 2670 "test-utils.c"
			}
#line 417 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp32_ = i;
#line 417 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp32_ != NULL, "i != null");
#line 419 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp33_ = i;
#line 419 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp33_) : NULL);
#line 419 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			name_details = _tmp34_;
#line 420 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp35_ = name_details;
#line 420 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_vala_assert (_tmp35_ != NULL, "name_details != null");
#line 421 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp36_ = _data5_->expected_removed;
#line 421 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp37_ = name_details;
#line 421 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp38_ = folks_name_details_get_full_name (_tmp37_);
#line 421 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp39_ = _tmp38_;
#line 421 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp36_, _tmp39_);
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (name_details);
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (i);
#line 2700 "test-utils.c"
		}
#line 409 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_i_it);
#line 2704 "test-utils.c"
	}
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp41_ = _data5_->expected_added;
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp42_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp41_);
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp43_ = _tmp42_;
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp43_ == 0) {
#line 2714 "test-utils.c"
		GeeHashSet* _tmp44_ = NULL;
		gint _tmp45_ = 0;
		gint _tmp46_ = 0;
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp44_ = _data5_->expected_removed;
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp45_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp44_);
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp46_ = _tmp45_;
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp40_ = _tmp46_ == 0;
#line 2726 "test-utils.c"
	} else {
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp40_ = FALSE;
#line 2730 "test-utils.c"
	}
#line 426 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp40_) {
#line 427 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_aggregator_wait_for_individuals_co (_data5_->_async_data_);
#line 2736 "test-utils.c"
	}
#line 389 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (removed);
#line 389 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_object_unref0 (added);
#line 2742 "test-utils.c"
}


static void ___lambda9__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	__lambda9_ (self, changes);
#line 2749 "test-utils.c"
}


static gboolean folks_test_utils_aggregator_wait_for_individuals_co (FolksTestUtilsAggregatorWaitForIndividualsData* _data_) {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	switch (_data_->_state_) {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 0:
#line 2758 "test-utils.c"
		goto _state_0;
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		case 1:
#line 2762 "test-utils.c"
		goto _state_1;
		default:
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_assert_not_reached ();
#line 2767 "test-utils.c"
	}
	_state_0:
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_ = g_slice_new0 (Block5Data);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_->_ref_count_ = 1;
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_->_async_data_ = _data_;
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = NULL;
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1__length1 = 0;
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1_ = _data_->expected_added_persona_names;
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp1__length1 = _data_->expected_added_persona_names_length1;
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp1__length1 == 0) {
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp0_ = TRUE;
#line 2788 "test-utils.c"
	} else {
#line 377 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = NULL;
#line 377 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2__length1 = 0;
#line 377 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2_ = _data_->expected_removed_persona_names;
#line 377 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp2__length1 = _data_->expected_removed_persona_names_length1;
#line 377 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp0_ = _data_->_tmp2__length1 == 0;
#line 2800 "test-utils.c"
	}
#line 376 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_vala_assert (_data_->_tmp0_, "expected_added_persona_names.length == 0 ||               expected_removed_persona_names.length == 0");
#line 379 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = NULL;
#line 379 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp3_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 379 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_->expected_added = _data_->_tmp3_;
#line 380 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp4_ = NULL;
#line 380 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp4_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 380 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_->expected_removed = _data_->_tmp4_;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = NULL;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5__length1 = 0;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5_ = _data_->expected_added_persona_names;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp5__length1 = _data_->expected_added_persona_names_length1;
#line 2824 "test-utils.c"
	{
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection_length1 = 0;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_name_collection_size_ = 0;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection = _data_->_tmp5_;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->name_collection_length1 = _data_->_tmp5__length1;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		for (_data_->name_it = 0; _data_->name_it < _data_->_tmp5__length1; _data_->name_it = _data_->name_it + 1) {
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = NULL;
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp6_ = g_strdup (_data_->name_collection[_data_->name_it]);
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->name = _data_->_tmp6_;
#line 2842 "test-utils.c"
			{
#line 383 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp7_ = NULL;
#line 383 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp7_ = _data_->_data5_->expected_added;
#line 383 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp8_ = NULL;
#line 383 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp8_ = _data_->name;
#line 383 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp7_, _data_->_tmp8_);
#line 382 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->name);
#line 2856 "test-utils.c"
			}
		}
	}
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp9_ = NULL;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp9__length1 = 0;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp9_ = _data_->expected_removed_persona_names;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp9__length1 = _data_->expected_removed_persona_names_length1;
#line 2868 "test-utils.c"
	{
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_vala1_name_collection_length1 = 0;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->__vala1_name_collection_size_ = 0;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_vala1_name_collection = _data_->_tmp9_;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_vala1_name_collection_length1 = _data_->_tmp9__length1;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		for (_data_->_vala1_name_it = 0; _data_->_vala1_name_it < _data_->_tmp9__length1; _data_->_vala1_name_it = _data_->_vala1_name_it + 1) {
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = NULL;
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_tmp10_ = g_strdup (_data_->_vala1_name_collection[_data_->_vala1_name_it]);
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_data_->_vala1_name = _data_->_tmp10_;
#line 2886 "test-utils.c"
			{
#line 385 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp11_ = NULL;
#line 385 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp11_ = _data_->_data5_->expected_removed;
#line 385 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp12_ = NULL;
#line 385 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_data_->_tmp12_ = _data_->_vala1_name;
#line 385 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp11_, _data_->_tmp12_);
#line 384 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_free0 (_data_->_vala1_name);
#line 2900 "test-utils.c"
			}
		}
	}
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp13_ = NULL;
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp13_ = _data_->aggregator;
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp14_ = 0UL;
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp14_ = g_signal_connect_data (_data_->_tmp13_, "individuals-changed-detailed", (GCallback) ___lambda9__folks_individual_aggregator_individuals_changed_detailed, block5_data_ref (_data_->_data5_), (GClosureNotify) block5_data_unref, 0);
#line 388 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->signal_id = _data_->_tmp14_;
#line 430 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_state_ = 1;
#line 430 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 2918 "test-utils.c"
	_state_1:
	;
#line 432 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp15_ = NULL;
#line 432 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp15_ = _data_->aggregator;
#line 432 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp16_ = 0UL;
#line 432 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp16_ = _data_->signal_id;
#line 432 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_signal_handler_disconnect ((GObject*) _data_->_tmp15_, _data_->_tmp16_);
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp18_ = NULL;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp18_ = _data_->_data5_->expected_added;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp19_ = 0;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp19_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp18_);
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp20_ = 0;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_tmp20_ = _data_->_tmp19_;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_tmp20_ == 0) {
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp21_ = NULL;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp21_ = _data_->_data5_->expected_removed;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp22_ = 0;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp22_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp21_);
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp23_ = 0;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp17_ = _data_->_tmp23_ == 0;
#line 2959 "test-utils.c"
	} else {
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_data_->_tmp17_ = FALSE;
#line 2963 "test-utils.c"
	}
#line 433 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_vala_assert (_data_->_tmp17_, "expected_added.size == 0 && expected_removed.size == 0");
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block5_data_unref (_data_->_data5_);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data_->_data5_ = NULL;
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_data_->_state_ == 0) {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2975 "test-utils.c"
	} else {
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2979 "test-utils.c"
	}
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_object_unref (_data_->_async_result);
#line 371 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return FALSE;
#line 2985 "test-utils.c"
}


/**
   * Synchronously prepare an aggregator and wait for the given personas to be
   * added to it.
   *
   * This is a wrapper around
   * {@link TestUtils.aggregator_prepare_and_wait_for_individuals} and
   * {@link TestUtils.loop_run_with_timeout} which creates a main loop and runs
   * it until the given ``expected_persona_names`` are added to the
   * ``aggregator``. If an error occurs, an error message will be printed and
   * the program will abort.
   *
   * If ``timeout`` is specified, it will be passed to
   * {@link TestUtils.loop_run_with_timeout} as the test run timeout.
   *
   * See the documentation for
   * {@link TestUtils.aggregator_prepare_and_wait_for_individuals} for more
   * information.
   *
   * @param aggregator the aggregator to prepare
   * @param expected_persona_names set of full names of the expected personas
   *
   * @since 0.9.7
   */
static Block6Data* block6_data_ref (Block6Data* _data6_) {
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&_data6_->_ref_count_);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return _data6_;
#line 3017 "test-utils.c"
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_main_loop_unref0 (_data6_->main_loop);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_slice_free (Block6Data, _data6_);
#line 3030 "test-utils.c"
	}
}


static void __lambda10_ (Block6Data* _data6_, GObject* o, GAsyncResult* r) {
	GError * _inner_error_ = NULL;
#line 466 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (r != NULL);
#line 3039 "test-utils.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 470 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp0_ = r;
#line 470 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_aggregator_prepare_and_wait_for_individuals_finish (_tmp0_, &_inner_error_);
#line 470 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3048 "test-utils.c"
			goto __catch5_g_error;
		}
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e1 = NULL;
		const gchar* _tmp1_ = NULL;
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		e1 = _inner_error_;
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_inner_error_ = NULL;
#line 474 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = e1->message;
#line 474 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_error ("test-utils.vala:474: Error preparing aggregator: %s", _tmp1_);
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_error_free0 (e1);
#line 3067 "test-utils.c"
	}
	__finally5:
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_clear_error (&_inner_error_);
#line 468 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 3078 "test-utils.c"
	}
#line 477 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_main_loop_quit (_data6_->main_loop);
#line 3082 "test-utils.c"
}


static void ___lambda10__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	__lambda10_ (self, source_object, res);
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block6_data_unref (self);
#line 3091 "test-utils.c"
}


void folks_test_utils_aggregator_prepare_and_wait_for_individuals_sync_with_timeout (FolksIndividualAggregator* aggregator, gchar** expected_persona_names, int expected_persona_names_length1, gint timeout) {
	Block6Data* _data6_;
	GMainLoop* _tmp0_ = NULL;
	FolksIndividualAggregator* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (aggregator != NULL);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data6_ = g_slice_new0 (Block6Data);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data6_->_ref_count_ = 1;
#line 463 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 463 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data6_->main_loop = _tmp0_;
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp1_ = aggregator;
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = expected_persona_names;
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2__length1 = expected_persona_names_length1;
#line 465 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_aggregator_prepare_and_wait_for_individuals (_tmp1_, _tmp2_, _tmp2__length1, ___lambda10__gasync_ready_callback, block6_data_ref (_data6_));
#line 480 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = timeout;
#line 480 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_loop_run_with_timeout (_data6_->main_loop, _tmp3_);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	block6_data_unref (_data6_);
#line 459 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_data6_ = NULL;
#line 3128 "test-utils.c"
}


/**
   * Get a named individual from an {@link IndividualAggregator}.
   *
   * This returns the {@link Individual} with {@link NameDetails.full_name}
   * equal to ``full_name`` from the given ``aggregator``.
   *
   * If multiple individuals exist with the given name, the first one found is
   * returned. It is expected that tests will be constructed so that full names
   * are unique, however.
   *
   * If no individual is found with the given name, an assertion fails and the
   * program aborts.
   *
   * @param aggregator aggregator to retrieve the value from
   * @param full_name name of the individual to retrieve
   * @return individual with the given name
   *
   * @since 0.9.7
   */
FolksIndividual* folks_test_utils_get_individual_by_name (FolksIndividualAggregator* aggregator, const gchar* full_name) {
	FolksIndividual* result = NULL;
#line 502 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (aggregator != NULL, NULL);
#line 502 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (full_name != NULL, NULL);
#line 3157 "test-utils.c"
	{
		GeeIterator* _v_it = NULL;
		FolksIndividualAggregator* _tmp0_ = NULL;
		GeeMap* _tmp1_ = NULL;
		GeeMap* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeCollection* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		GeeIterator* _tmp7_ = NULL;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp0_ = aggregator;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = folks_individual_aggregator_get_individuals (_tmp0_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp2_ = _tmp1_;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp3_ = gee_map_get_values (_tmp2_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = _tmp3_;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp5_ = _tmp4_;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp7_ = _tmp6_;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_tmp5_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_v_it = _tmp7_;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		while (TRUE) {
#line 3190 "test-utils.c"
			GeeIterator* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
			FolksIndividual* v = NULL;
			GeeIterator* _tmp10_ = NULL;
			gpointer _tmp11_ = NULL;
			FolksIndividual* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp8_ = _v_it;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (!_tmp9_) {
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				break;
#line 3208 "test-utils.c"
			}
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp10_ = _v_it;
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			v = (FolksIndividual*) _tmp11_;
#line 507 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp12_ = v;
#line 507 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp13_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp12_);
#line 507 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp14_ = _tmp13_;
#line 507 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_tmp15_ = full_name;
#line 507 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			if (g_strcmp0 (_tmp14_, _tmp15_) == 0) {
#line 508 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				result = v;
#line 508 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				_g_object_unref0 (_v_it);
#line 508 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
				return result;
#line 3232 "test-utils.c"
			}
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			_g_object_unref0 (v);
#line 3236 "test-utils.c"
		}
#line 505 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_object_unref0 (_v_it);
#line 3240 "test-utils.c"
	}
#line 511 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_assert_not_reached ();
#line 3244 "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 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	result = g_new0 (gchar*, length + 1);
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	for (i = 0; i < length; i++) {
#line 3264 "test-utils.c"
		gchar* _tmp0_ = NULL;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp0_ = g_strdup (self[i]);
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		result[i] = _tmp0_;
#line 3270 "test-utils.c"
	}
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 3274 "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 528 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 528 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 3312 "test-utils.c"
		gchar* _tmp1_ = NULL;
#line 530 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = g_strdup (INSTALLED_TESTS_DIR "/");
#line 530 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 530 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		execdir = _tmp1_;
#line 3320 "test-utils.c"
	} else {
		gchar* _tmp2_ = NULL;
#line 534 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strdup (ABS_TOP_BUILDDIR "/tests");
#line 534 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 534 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		execdir = _tmp2_;
#line 3329 "test-utils.c"
	}
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = argv;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3__length1 = argv_length1;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp4_ = argv;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp4__length1 = argv_length1;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp5_ = ((_tmp3_ + 0) != NULL) ? _vala_array_dup1 (_tmp3_ + 0, _tmp4__length1 - 0) : ((gpointer) (_tmp3_ + 0));
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp5__length1 = _tmp4__length1 - 0;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	argv_ = _tmp5_;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	argv__length1 = _tmp5__length1;
#line 537 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_argv__size_ = argv__length1;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp6_ = argv_;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp6__length1 = argv__length1;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp7_ = execdir;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp8_ = g_strconcat (_tmp7_, "/", NULL);
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp9_ = _tmp8_;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp10_ = argv_;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp10__length1 = argv__length1;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp11_ = _tmp10_[0];
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp12_ = g_strconcat (_tmp9_, _tmp11_, NULL);
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_free0 (_tmp6_[0]);
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp6_[0] = _tmp12_;
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp13_ = _tmp6_[0];
#line 538 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_free0 (_tmp9_);
#line 540 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	exit_status = -1;
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp14_ = argv_;
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp14__length1 = argv__length1;
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_spawn_sync (NULL, _tmp14_, NULL, 0, NULL, NULL, &_tmp15_, NULL, &_tmp16_, &_inner_error_);
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_free0 (_vala_capture_stdout);
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_vala_capture_stdout = _tmp15_;
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	exit_status = _tmp16_;
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_propagate_error (error, _inner_error_);
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 541 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 3399 "test-utils.c"
	}
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp17_ = exit_status;
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_spawn_check_exit_status (_tmp17_, &_inner_error_);
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_propagate_error (error, _inner_error_);
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_free0 (execdir);
#line 550 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return;
#line 3415 "test-utils.c"
	}
#line 523 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	argv_ = (_vala_array_free (argv_, argv__length1, (GDestroyNotify) g_free), NULL);
#line 523 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_g_free0 (execdir);
#line 523 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (capture_stdout) {
#line 523 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		*capture_stdout = _vala_capture_stdout;
#line 3425 "test-utils.c"
	} else {
#line 523 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_g_free0 (_vala_capture_stdout);
#line 3429 "test-utils.c"
	}
}


/**
   * Return the path to a test file that is distributed in the source tarball
   * and, if installed, is installed into ${installed_tests_dir}.
   *
   * @param filename A filename relative to ${top_srcdir}/tests
   *  or ${installed_tests_dir}.
   */
gchar* folks_test_utils_get_source_test_data (const gchar* filename) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
#line 560 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 562 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 562 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 3450 "test-utils.c"
		const gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
#line 564 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = filename;
#line 564 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strconcat (INSTALLED_TESTS_DIR "/", _tmp1_, NULL);
#line 564 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		result = _tmp2_;
#line 564 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return result;
#line 3461 "test-utils.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 568 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp3_ = filename;
#line 568 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = g_strconcat (ABS_TOP_SRCDIR "/tests/", _tmp3_, NULL);
#line 568 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		result = _tmp4_;
#line 568 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return result;
#line 3473 "test-utils.c"
	}
}


/**
   * Return the path to a test file that is built by "make"
   * and, if installed, is installed into ${installed_tests_dir}.
   *
   * @param filename A filename relative to ${top_builddir}/tests
   *  or ${installed_tests_dir}.
   */
gchar* folks_test_utils_get_built_test_data (const gchar* filename) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
#line 579 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 581 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = g_getenv ("FOLKS_TESTS_INSTALLED");
#line 581 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ != NULL) {
#line 3494 "test-utils.c"
		const gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
#line 583 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = filename;
#line 583 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp2_ = g_strconcat (INSTALLED_TESTS_DIR "/", _tmp1_, NULL);
#line 583 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		result = _tmp2_;
#line 583 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return result;
#line 3505 "test-utils.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 587 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp3_ = filename;
#line 587 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp4_ = g_strconcat (ABS_TOP_BUILDDIR "/tests/", _tmp3_, NULL);
#line 587 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		result = _tmp4_;
#line 587 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return result;
#line 3517 "test-utils.c"
	}
}


/**
   * Check that there are no pending events on the given ``context``, and return
   * ``true`` if there are none.
   *
   * @param context A main context, or ``null`` to use the default main context.
   * @returns Whether there are no events pending on the context.
   * @since 0.9.7
   */
gboolean folks_test_utils_main_context_is_empty (GMainContext* context) {
	gboolean result = FALSE;
	GMainContext* _tmp0_ = NULL;
	GMainContext* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 601 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp0_ = context;
#line 601 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (_tmp0_ == NULL) {
#line 3539 "test-utils.c"
		GMainContext* _tmp1_ = NULL;
#line 602 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		_tmp1_ = g_main_context_default ();
#line 602 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		context = _tmp1_;
#line 3545 "test-utils.c"
	}
#line 604 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp2_ = context;
#line 604 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	_tmp3_ = g_main_context_pending (_tmp2_);
#line 604 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	result = !_tmp3_;
#line 604 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return result;
#line 3555 "test-utils.c"
}


FolksTestUtils* folks_test_utils_construct (GType object_type) {
	FolksTestUtils* self = NULL;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	self = (FolksTestUtils*) g_type_create_instance (object_type);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return self;
#line 3565 "test-utils.c"
}


FolksTestUtils* folks_test_utils_new (void) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return folks_test_utils_construct (FOLKS_TYPE_TEST_UTILS);
#line 3572 "test-utils.c"
}


static void folks_value_test_utils_init (GValue* value) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	value->data[0].v_pointer = NULL;
#line 3579 "test-utils.c"
}


static void folks_value_test_utils_free_value (GValue* value) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (value->data[0].v_pointer) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (value->data[0].v_pointer);
#line 3588 "test-utils.c"
	}
}


static void folks_value_test_utils_copy_value (const GValue* src_value, GValue* dest_value) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (src_value->data[0].v_pointer) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		dest_value->data[0].v_pointer = folks_test_utils_ref (src_value->data[0].v_pointer);
#line 3598 "test-utils.c"
	} else {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3602 "test-utils.c"
	}
}


static gpointer folks_value_test_utils_peek_pointer (const GValue* value) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return value->data[0].v_pointer;
#line 3610 "test-utils.c"
}


static gchar* folks_value_test_utils_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (collect_values[0].v_pointer) {
#line 3617 "test-utils.c"
		FolksTestUtils* object;
		object = collect_values[0].v_pointer;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		if (object->parent_instance.g_class == NULL) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 3624 "test-utils.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 27 "/opt/gnome3/source/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 3628 "test-utils.c"
		}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = folks_test_utils_ref (object);
#line 3632 "test-utils.c"
	} else {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 3636 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return NULL;
#line 3640 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (!object_p) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 3651 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (!value->data[0].v_pointer) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		*object_p = NULL;
#line 3657 "test-utils.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		*object_p = value->data[0].v_pointer;
#line 3661 "test-utils.c"
	} else {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		*object_p = folks_test_utils_ref (value->data[0].v_pointer);
#line 3665 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return NULL;
#line 3669 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (g_type_is_a (object_type, FOLKS_TYPE_TEST_UTILS), NULL);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return G_PARAM_SPEC (spec);
#line 3683 "test-utils.c"
}


gpointer folks_value_get_test_utils (const GValue* value) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS), NULL);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return value->data[0].v_pointer;
#line 3692 "test-utils.c"
}


void folks_value_set_test_utils (GValue* value, gpointer v_object) {
	FolksTestUtils* old;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS));
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	old = value->data[0].v_pointer;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (v_object) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TYPE_TEST_UTILS));
#line 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = v_object;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_ref (value->data[0].v_pointer);
#line 3712 "test-utils.c"
	} else {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 3716 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (old) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (old);
#line 3722 "test-utils.c"
	}
}


void folks_value_take_test_utils (GValue* value, gpointer v_object) {
	FolksTestUtils* old;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TYPE_TEST_UTILS));
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	old = value->data[0].v_pointer;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (v_object) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TYPE_TEST_UTILS));
#line 27 "/opt/gnome3/source/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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = v_object;
#line 3741 "test-utils.c"
	} else {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		value->data[0].v_pointer = NULL;
#line 3745 "test-utils.c"
	}
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (old) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		folks_test_utils_unref (old);
#line 3751 "test-utils.c"
	}
}


static void folks_test_utils_class_init (FolksTestUtilsClass * klass) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	folks_test_utils_parent_class = g_type_class_peek_parent (klass);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	((FolksTestUtilsClass *) klass)->finalize = folks_test_utils_finalize;
#line 3761 "test-utils.c"
}


static void folks_test_utils_instance_init (FolksTestUtils * self) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	self->ref_count = 1;
#line 3768 "test-utils.c"
}


static void folks_test_utils_finalize (FolksTestUtils* obj) {
	FolksTestUtils * self;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_TYPE_TEST_UTILS, FolksTestUtils);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_signal_handlers_destroy (self);
#line 3778 "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 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	g_atomic_int_inc (&self->ref_count);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	return instance;
#line 3803 "test-utils.c"
}


void folks_test_utils_unref (gpointer instance) {
	FolksTestUtils* self;
	self = instance;
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		FOLKS_TEST_UTILS_GET_CLASS (self)->finalize (self);
#line 27 "/opt/gnome3/source/folks/tests/lib/test-utils.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 3816 "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);
}



