/* link-personas.c generated by valac 0.13.4, the Vala compiler
 * generated from link-personas.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * 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: Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <tracker-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gconf/gconf-client.h>
#include <gconf/gconf.h>
#include <gio/gio.h>


#define TYPE_LINK_PERSONAS_TESTS (link_personas_tests_get_type ())
#define LINK_PERSONAS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTests))
#define LINK_PERSONAS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsClass))
#define IS_LINK_PERSONAS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINK_PERSONAS_TESTS))
#define IS_LINK_PERSONAS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LINK_PERSONAS_TESTS))
#define LINK_PERSONAS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsClass))

typedef struct _LinkPersonasTests LinkPersonasTests;
typedef struct _LinkPersonasTestsClass LinkPersonasTestsClass;
typedef struct _LinkPersonasTestsPrivate LinkPersonasTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _tracker_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (tracker_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gconf_value_free0(var) ((var == NULL) ? NULL : (var = (gconf_value_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _LinkPersonasTestsTestLinkingPersonasAsyncData LinkPersonasTestsTestLinkingPersonasAsyncData;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _LinkPersonasTestsAddPersonasData LinkPersonasTestsAddPersonasData;

struct _LinkPersonasTests {
	FolksTestCase parent_instance;
	LinkPersonasTestsPrivate * priv;
};

struct _LinkPersonasTestsClass {
	FolksTestCaseClass parent_class;
};

struct _LinkPersonasTestsPrivate {
	GMainLoop* _main_loop;
	TrackerTestBackend* _tracker_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname_1;
	gchar* _persona_fullname_2;
	gchar* _proto;
	gchar* _im_address_1;
	gchar* _im_address_2;
	gboolean _linking_fired;
	gboolean _persona_found_1;
	gboolean _persona_found_2;
	gchar* _persona_iid_1;
	gchar* _persona_iid_2;
	GeeHashSet* _personas;
	gchar* _folks_config_key;
	GConfClient* _gconf_client;
	GeeHashMap* _linking_props;
};

struct _LinkPersonasTestsTestLinkingPersonasAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksPersonaStore* pstore;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GeeCollection* _tmp6_;
	GeeCollection* _tmp7_;
	GeeCollection* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	GeeIterator* _backend_it;
	GeeIterator* _tmp11_;
	gboolean _tmp12_;
	GeeIterator* _tmp13_;
	gpointer _tmp14_;
	FolksBackend* backend;
	FolksBackend* _tmp15_;
	GeeMap* _tmp16_;
	GeeMap* _tmp17_;
	gpointer _tmp18_;
	FolksPersonaStore* _tmp19_;
	FolksPersonaStore* _tmp20_;
	FolksPersonaStore* _tmp21_;
	GError* e;
	GError* _tmp22_;
	const gchar* _tmp23_;
	GError * _inner_error_;
};

struct _LinkPersonasTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasTests* self;
	FolksPersonaStore* pstore;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details1;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* v1;
	GeeHashMultiMap* _tmp7_;
	GeeHashMultiMap* im_addrs1;
	GeeHashMultiMap* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	FolksImFieldDetails* _tmp11_;
	FolksImFieldDetails* _tmp12_;
	GValue* _tmp13_;
	GeeHashMultiMap* _tmp14_;
	GHashTable* _tmp15_;
	gchar* _tmp16_;
	GValue* _tmp17_;
	GValue _tmp18_;
	GValue _tmp19_;
	GValue* _tmp20_;
	GValue* _tmp21_;
	GValue* v2;
	GValue* _tmp22_;
	const gchar* _tmp23_;
	GHashTable* _tmp24_;
	gchar* _tmp25_;
	GValue* _tmp26_;
	GHashFunc _tmp27_;
	GEqualFunc _tmp28_;
	GHashTable* _tmp29_;
	GHashTable* details2;
	GValue _tmp30_;
	GValue _tmp31_;
	GValue* _tmp32_;
	GValue* _tmp33_;
	GValue* v3;
	GeeHashMultiMap* _tmp34_;
	GeeHashMultiMap* im_addrs2;
	GeeHashMultiMap* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	FolksImFieldDetails* _tmp38_;
	FolksImFieldDetails* _tmp39_;
	GValue* _tmp40_;
	GeeHashMultiMap* _tmp41_;
	GHashTable* _tmp42_;
	gchar* _tmp43_;
	GValue* _tmp44_;
	GValue _tmp45_;
	GValue _tmp46_;
	GValue* _tmp47_;
	GValue* _tmp48_;
	GValue* v4;
	GValue* _tmp49_;
	const gchar* _tmp50_;
	GHashTable* _tmp51_;
	gchar* _tmp52_;
	GValue* _tmp53_;
	FolksIndividualAggregator* _tmp54_;
	FolksPersonaStore* _tmp55_;
	GHashTable* _tmp56_;
	FolksPersona* _tmp57_;
	FolksPersona* _tmp58_;
	FolksIndividualAggregator* _tmp59_;
	FolksPersonaStore* _tmp60_;
	GHashTable* _tmp61_;
	FolksPersona* _tmp62_;
	FolksPersona* _tmp63_;
	GError* e;
	GError* _tmp64_;
	const gchar* _tmp65_;
	GError * _inner_error_;
};


static gpointer link_personas_tests_parent_class = NULL;

GType link_personas_tests_get_type (void) G_GNUC_CONST;
#define LINK_PERSONAS_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LINK_PERSONAS_TESTS, LinkPersonasTestsPrivate))
enum  {
	LINK_PERSONAS_TESTS_DUMMY_PROPERTY
};
LinkPersonasTests* link_personas_tests_new (void);
LinkPersonasTests* link_personas_tests_construct (GType object_type);
void link_personas_tests_test_linking_personas (LinkPersonasTests* self);
static void _link_personas_tests_test_linking_personas_folks_test_case_test_method (gpointer self);
static void link_personas_tests_real_set_up (FolksTestCase* base);
static void link_personas_tests_real_tear_down (FolksTestCase* base);
static void _link_personas_tests_test_linking_personas_async (LinkPersonasTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_test_linking_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static gboolean __lambda1_ (LinkPersonasTests* self);
static gboolean ___lambda1__gsource_func (gpointer self);
static void _link_personas_tests_test_linking_personas_async_data_free (gpointer _data);
static gboolean _link_personas_tests_test_linking_personas_async_co (LinkPersonasTestsTestLinkingPersonasAsyncData* _data_);
static void _link_personas_tests_test_linking_personas_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_tests_individuals_changed_cb (LinkPersonasTests* self, GeeMultiMap* changes);
static void __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _link_personas_tests_add_personas (LinkPersonasTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_tests_add_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_);
static void _link_personas_tests_add_personas_data_free (gpointer _data);
static gboolean _link_personas_tests_add_personas_co (LinkPersonasTestsAddPersonasData* _data_);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static void _link_personas_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i);
static void _link_personas_tests_notify_cb (LinkPersonasTests* self, GObject* individual_obj, GParamSpec* ps);
static void __link_personas_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static gboolean ___lambda0_ (LinkPersonasTests* self);
static gboolean ____lambda0__gsource_func (gpointer self);
static void link_personas_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _link_personas_tests_test_linking_personas_folks_test_case_test_method (gpointer self) {
#line 52 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	link_personas_tests_test_linking_personas (self);
#line 255 "link-personas.c"
}


LinkPersonasTests* link_personas_tests_construct (GType object_type) {
	LinkPersonasTests * self = NULL;
	TrackerTestBackend* _tmp0_;
#line 48 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) folks_test_case_construct (object_type, "LinkPersonasTests");
#line 50 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = tracker_test_backend_new ();
#line 50 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 50 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_tracker_backend = _tmp0_;
#line 52 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas", _link_personas_tests_test_linking_personas_folks_test_case_test_method, self);
#line 46 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return self;
#line 274 "link-personas.c"
}


LinkPersonasTests* link_personas_tests_new (void) {
#line 46 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return link_personas_tests_construct (TYPE_LINK_PERSONAS_TESTS);
#line 281 "link-personas.c"
}


static void link_personas_tests_real_set_up (FolksTestCase* base) {
	LinkPersonasTests * self;
	GConfClient* _tmp0_ = NULL;
	TrackerTestBackend* _tmp6_;
	GError * _inner_error_ = NULL;
#line 55 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 57 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = gconf_client_get_default ();
#line 57 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_gconf_client = _tmp0_;
#line 296 "link-personas.c"
	{
		GConfValue* _tmp1_;
		GConfValue* val;
		GConfClient* _tmp2_;
		const gchar* _tmp3_;
#line 63 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp1_ = gconf_value_new (GCONF_VALUE_STRING);
#line 63 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		val = _tmp1_;
#line 64 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		gconf_value_set_string (val, "tracker");
#line 65 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp2_ = self->priv->_gconf_client;
#line 65 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp3_ = self->priv->_folks_config_key;
#line 65 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		gconf_client_set (_tmp2_, _tmp3_, val, &_inner_error_);
#line 65 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_inner_error_ != NULL) {
#line 65 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_gconf_value_free0 (val);
#line 318 "link-personas.c"
			goto __catch0_g_error;
		}
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_gconf_value_free0 (val);
#line 323 "link-personas.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		e = _inner_error_;
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_inner_error_ = NULL;
#line 69 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp4_ = e;
#line 69 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp5_ = _tmp4_->message;
#line 69 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:69: Couldn't set primary store: %s\n", _tmp5_);
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (e);
#line 343 "link-personas.c"
	}
	__finally0:
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_inner_error_ != NULL) {
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.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 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_inner_error_);
#line 61 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return;
#line 354 "link-personas.c"
	}
#line 76 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp6_ = self->priv->_tracker_backend;
#line 76 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	tracker_test_backend_set_up (_tmp6_);
#line 360 "link-personas.c"
}


static void link_personas_tests_real_tear_down (FolksTestCase* base) {
	LinkPersonasTests * self;
	TrackerTestBackend* _tmp0_;
	GError * _inner_error_ = NULL;
#line 79 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self = (LinkPersonasTests*) base;
#line 81 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_tracker_backend;
#line 81 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	tracker_test_backend_tear_down (_tmp0_);
#line 374 "link-personas.c"
	{
		GConfClient* _tmp1_;
		const gchar* _tmp2_;
#line 87 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp1_ = self->priv->_gconf_client;
#line 87 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp2_ = self->priv->_folks_config_key;
#line 87 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		gconf_client_unset (_tmp1_, _tmp2_, &_inner_error_);
#line 87 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_inner_error_ != NULL) {
#line 386 "link-personas.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		e = _inner_error_;
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_inner_error_ = NULL;
#line 91 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp3_ = e;
#line 91 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp4_ = _tmp3_->message;
#line 91 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:91: Couldn't unset primary store: %s\n", _tmp4_);
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (e);
#line 408 "link-personas.c"
	}
	__finally1:
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_inner_error_ != NULL) {
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.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 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_inner_error_);
#line 85 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return;
#line 419 "link-personas.c"
	}
}


static gboolean __lambda1_ (LinkPersonasTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 117 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_main_loop;
#line 117 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_main_loop_quit (_tmp0_);
#line 118 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_assert_not_reached ();
#line 115 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return result;
#line 435 "link-personas.c"
}


static gboolean ___lambda1__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda1_ (self);
#line 115 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return result;
#line 444 "link-personas.c"
}


void link_personas_tests_test_linking_personas (LinkPersonasTests* self) {
	GMainLoop* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GeeHashSet* _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	GeeHashMap* _tmp7_;
	const gchar* _tmp8_;
	GMainLoop* _tmp9_;
	GeeHashMap* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
#line 95 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 97 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 97 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 97 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_main_loop = _tmp0_;
#line 98 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = g_strdup ("persona #1");
#line 98 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 98 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_fullname_1 = _tmp1_;
#line 99 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp2_ = g_strdup ("persona #2");
#line 99 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 99 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_fullname_2 = _tmp2_;
#line 100 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp3_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL);
#line 100 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 100 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_personas = _tmp3_;
#line 102 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_found_1 = FALSE;
#line 103 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_found_2 = FALSE;
#line 104 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_linking_fired = FALSE;
#line 106 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp4_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 106 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 106 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_linking_props = _tmp4_;
#line 107 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp5_ = self->priv->_linking_props;
#line 107 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp6_ = self->priv->_im_address_1;
#line 107 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, "prop1", _tmp6_);
#line 108 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp7_ = self->priv->_linking_props;
#line 108 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp8_ = self->priv->_im_address_2;
#line 108 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, "prop2", _tmp8_);
#line 110 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async (self, NULL, NULL);
#line 115 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda1__gsource_func, g_object_ref (self), g_object_unref);
#line 121 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp9_ = self->priv->_main_loop;
#line 121 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_main_loop_run (_tmp9_);
#line 125 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp10_ = self->priv->_linking_props;
#line 125 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp11_ = gee_map_get_size ((GeeMap*) _tmp10_);
#line 125 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp12_ = _tmp11_;
#line 125 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_assert (_tmp12_ == 0);
#line 528 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async_data_free (gpointer _data) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
	_data_ = _data;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_slice_free (LinkPersonasTestsTestLinkingPersonasAsyncData, _data_);
#line 539 "link-personas.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return self ? g_object_ref (self) : NULL;
#line 546 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async (LinkPersonasTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
	LinkPersonasTests* _tmp0_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsTestLinkingPersonasAsyncData);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_test_linking_personas_async);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_test_linking_personas_async_data_free);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->self = _tmp0_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async_co (_data_);
#line 565 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 573 "link-personas.c"
}


static void _link_personas_tests_test_linking_personas_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasTestsTestLinkingPersonasAsyncData* _data_;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = _user_data_;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_source_object_ = source_object;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_res_ = _res_;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_test_linking_personas_async_co (_data_);
#line 587 "link-personas.c"
}


static void __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 133 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_individuals_changed_cb (self, changes);
#line 594 "link-personas.c"
}


static gboolean _link_personas_tests_test_linking_personas_async_co (LinkPersonasTestsTestLinkingPersonasAsyncData* _data_) {
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	switch (_data_->_state_) {
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 0:
#line 603 "link-personas.c"
		goto _state_0;
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 1:
#line 607 "link-personas.c"
		goto _state_1;
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 2:
#line 611 "link-personas.c"
		goto _state_2;
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 3:
#line 615 "link-personas.c"
		goto _state_3;
		default:
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_assert_not_reached ();
#line 620 "link-personas.c"
	}
	_state_0:
#line 130 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = NULL;
#line 130 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 130 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->store = _data_->_tmp0_;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_state_ = 1;
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	folks_backend_store_prepare (_data_->store, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 635 "link-personas.c"
	_state_1:
#line 131 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 132 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp1_ = folks_individual_aggregator_new ();
#line 132 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 132 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 133 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 133 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __link_personas_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 649 "link-personas.c"
	{
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 2;
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 659 "link-personas.c"
		_state_2:
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 137 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 665 "link-personas.c"
			goto __catch2_g_error;
		}
#line 139 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->pstore = NULL;
#line 670 "link-personas.c"
		{
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp4_ = folks_backend_store_get_enabled_backends (_data_->store);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp5_ = _data_->_tmp4_;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp6_ = gee_map_get_values (_data_->_tmp5_);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp7_ = _data_->_tmp6_;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp8_ = _data_->_tmp7_;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp9_ = NULL;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_tmp10_ = _data_->_tmp9_;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->_tmp8_);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_data_->_backend_it = _data_->_tmp10_;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			while (TRUE) {
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp11_ = _data_->_backend_it;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp12_ = FALSE;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp12_ = gee_iterator_next (_data_->_tmp11_);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				if (!_data_->_tmp12_) {
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					break;
#line 704 "link-personas.c"
				}
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp13_ = _data_->_backend_it;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp14_ = NULL;
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp14_ = gee_iterator_get (_data_->_tmp13_);
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->backend = (FolksBackend*) _data_->_tmp14_;
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp15_ = _data_->backend;
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp16_ = folks_backend_get_persona_stores (_data_->_tmp15_);
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp17_ = _data_->_tmp16_;
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp18_ = NULL;
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp18_ = gee_map_get (_data_->_tmp17_, "tracker");
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (_data_->pstore);
#line 142 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->pstore = (FolksPersonaStore*) _data_->_tmp18_;
#line 143 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_data_->_tmp19_ = _data_->pstore;
#line 143 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				if (_data_->_tmp19_ != NULL) {
#line 144 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_data_->backend);
#line 144 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					break;
#line 736 "link-personas.c"
				}
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (_data_->backend);
#line 740 "link-personas.c"
			}
#line 140 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->_backend_it);
#line 744 "link-personas.c"
		}
#line 146 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp20_ = _data_->pstore;
#line 146 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_assert (_data_->_tmp20_ != NULL);
#line 148 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp21_ = _data_->pstore;
#line 148 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 3;
#line 148 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_link_personas_tests_add_personas (_data_->self, _data_->_tmp21_, _link_personas_tests_test_linking_personas_async_ready, _data_);
#line 148 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 758 "link-personas.c"
		_state_3:
#line 148 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_link_personas_tests_add_personas_finish (_data_->self, _data_->_res_);
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->pstore);
#line 764 "link-personas.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 152 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp22_ = _data_->e;
#line 152 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp23_ = _data_->_tmp22_->message;
#line 152 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:152: Error when calling prepare: %s\n", _data_->_tmp23_);
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 781 "link-personas.c"
	}
	__finally2:
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->store);
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.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 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 135 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 794 "link-personas.c"
	}
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->store);
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 802 "link-personas.c"
	} else {
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 806 "link-personas.c"
	}
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 128 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 812 "link-personas.c"
}


static void _link_personas_tests_add_personas_data_free (gpointer _data) {
	LinkPersonasTestsAddPersonasData* _data_;
	_data_ = _data;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->pstore);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_slice_free (LinkPersonasTestsAddPersonasData, _data_);
#line 825 "link-personas.c"
}


static void _link_personas_tests_add_personas (LinkPersonasTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasTestsAddPersonasData* _data_;
	LinkPersonasTests* _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksPersonaStore* _tmp2_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = g_slice_new0 (LinkPersonasTestsAddPersonasData);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_tests_add_personas);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_tests_add_personas_data_free);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->self = _tmp0_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = pstore;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->pstore = _tmp2_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_add_personas_co (_data_);
#line 852 "link-personas.c"
}


static void _link_personas_tests_add_personas_finish (LinkPersonasTests* self, GAsyncResult* _res_) {
	LinkPersonasTestsAddPersonasData* _data_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 860 "link-personas.c"
}


static void _g_free0_ (gpointer var) {
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	var = (g_free (var), NULL);
#line 867 "link-personas.c"
}


static void _vala_GValue_free (GValue* self) {
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_unset (self);
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_free (self);
#line 876 "link-personas.c"
}


static void __vala_GValue_free0_ (gpointer var) {
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
#line 883 "link-personas.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 890 "link-personas.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return self ? _g_value_dup (self) : NULL;
#line 897 "link-personas.c"
}


static void _link_personas_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasTestsAddPersonasData* _data_;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_ = _user_data_;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_source_object_ = source_object;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_res_ = _res_;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_add_personas_co (_data_);
#line 911 "link-personas.c"
}


static gboolean _link_personas_tests_add_personas_co (LinkPersonasTestsAddPersonasData* _data_) {
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	switch (_data_->_state_) {
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 0:
#line 920 "link-personas.c"
		goto _state_0;
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 1:
#line 924 "link-personas.c"
		goto _state_1;
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		case 2:
#line 928 "link-personas.c"
		goto _state_2;
		default:
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_assert_not_reached ();
#line 933 "link-personas.c"
	}
	_state_0:
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp0_ = g_str_hash;
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp1_ = g_str_equal;
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
#line 166 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->details1 = _data_->_tmp2_;
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp3_, GEE_TYPE_MULTI_MAP);
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp5_ = __g_value_dup0 (&_data_->_tmp4_);
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp4_) ? (g_value_unset (&_data_->_tmp4_), NULL) : NULL;
#line 168 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v1 = _data_->_tmp6_;
#line 169 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp7_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 169 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->im_addrs1 = _data_->_tmp7_;
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp8_ = _data_->im_addrs1;
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp9_ = _data_->self->priv->_proto;
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp10_ = _data_->self->priv->_im_address_1;
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp11_ = folks_im_field_details_new (_data_->_tmp10_, NULL);
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp12_ = _data_->_tmp11_;
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp8_, _data_->_tmp9_, _data_->_tmp12_);
#line 172 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->_tmp12_);
#line 173 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp13_ = _data_->v1;
#line 173 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp14_ = _data_->im_addrs1;
#line 173 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_set_object (_data_->_tmp13_, (GObject*) _data_->_tmp14_);
#line 174 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp15_ = _data_->details1;
#line 174 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp16_ = g_strdup ("im-addresses");
#line 174 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp17_ = _data_->v1;
#line 174 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v1 = NULL;
#line 174 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp15_, _data_->_tmp16_, _data_->_tmp17_);
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp18_, 0, sizeof (GValue));
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp18_, G_TYPE_STRING);
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp19_ = _data_->_tmp18_;
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp20_ = __g_value_dup0 (&_data_->_tmp19_);
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp21_ = _data_->_tmp20_;
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp19_) ? (g_value_unset (&_data_->_tmp19_), NULL) : NULL;
#line 176 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v2 = _data_->_tmp21_;
#line 177 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp22_ = _data_->v2;
#line 177 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp23_ = _data_->self->priv->_persona_fullname_1;
#line 177 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_set_string (_data_->_tmp22_, _data_->_tmp23_);
#line 178 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp24_ = _data_->details1;
#line 178 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp25_ = g_strdup ("full-name");
#line 178 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp26_ = _data_->v2;
#line 178 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v2 = NULL;
#line 178 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp24_, _data_->_tmp25_, _data_->_tmp26_);
#line 180 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp27_ = g_str_hash;
#line 180 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp28_ = g_str_equal;
#line 180 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp29_ = g_hash_table_new_full (_data_->_tmp27_, _data_->_tmp28_, _g_free0_, __vala_GValue_free0_);
#line 180 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->details2 = _data_->_tmp29_;
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp30_, 0, sizeof (GValue));
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp30_, GEE_TYPE_MULTI_MAP);
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp31_ = _data_->_tmp30_;
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp32_ = __g_value_dup0 (&_data_->_tmp31_);
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp33_ = _data_->_tmp32_;
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp31_) ? (g_value_unset (&_data_->_tmp31_), NULL) : NULL;
#line 182 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v3 = _data_->_tmp33_;
#line 183 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp34_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
#line 183 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->im_addrs2 = _data_->_tmp34_;
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp35_ = _data_->im_addrs2;
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp36_ = _data_->self->priv->_proto;
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp37_ = _data_->self->priv->_im_address_2;
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp38_ = folks_im_field_details_new (_data_->_tmp37_, NULL);
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp39_ = _data_->_tmp38_;
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp35_, _data_->_tmp36_, _data_->_tmp39_);
#line 186 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->_tmp39_);
#line 187 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp40_ = _data_->v3;
#line 187 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp41_ = _data_->im_addrs2;
#line 187 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_set_object (_data_->_tmp40_, (GObject*) _data_->_tmp41_);
#line 188 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp42_ = _data_->details2;
#line 188 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp43_ = g_strdup ("im-addresses");
#line 188 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp44_ = _data_->v3;
#line 188 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v3 = NULL;
#line 188 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp42_, _data_->_tmp43_, _data_->_tmp44_);
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	memset (&_data_->_tmp45_, 0, sizeof (GValue));
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_init (&_data_->_tmp45_, G_TYPE_STRING);
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp46_ = _data_->_tmp45_;
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp47_ = __g_value_dup0 (&_data_->_tmp46_);
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp48_ = _data_->_tmp47_;
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_IS_VALUE (&_data_->_tmp46_) ? (g_value_unset (&_data_->_tmp46_), NULL) : NULL;
#line 190 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v4 = _data_->_tmp48_;
#line 191 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp49_ = _data_->v4;
#line 191 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp50_ = _data_->self->priv->_persona_fullname_2;
#line 191 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_value_set_string (_data_->_tmp49_, _data_->_tmp50_);
#line 192 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp51_ = _data_->details2;
#line 192 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp52_ = g_strdup ("full-name");
#line 192 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->_tmp53_ = _data_->v4;
#line 192 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_data_->v4 = NULL;
#line 192 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_hash_table_insert (_data_->_tmp51_, _data_->_tmp52_, _data_->_tmp53_);
#line 1108 "link-personas.c"
	{
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp54_ = _data_->self->priv->_aggregator;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp55_ = _data_->pstore;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp56_ = _data_->details1;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 1;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp54_, NULL, _data_->_tmp55_, _data_->_tmp56_, _link_personas_tests_add_personas_ready, _data_);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1122 "link-personas.c"
		_state_1:
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp57_ = NULL;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp57_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp54_, _data_->_res_, &_data_->_inner_error_);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp58_ = _data_->_tmp57_;
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->_tmp58_);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1136 "link-personas.c"
				goto __catch3_folks_individual_aggregator_error;
			}
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs2);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs1);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 196 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			return FALSE;
#line 1161 "link-personas.c"
		}
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp59_ = _data_->self->priv->_aggregator;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp60_ = _data_->pstore;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp61_ = _data_->details2;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_state_ = 2;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp59_, NULL, _data_->_tmp60_, _data_->_tmp61_, _link_personas_tests_add_personas_ready, _data_);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1175 "link-personas.c"
		_state_2:
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp62_ = NULL;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp62_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp59_, _data_->_res_, &_data_->_inner_error_);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp63_ = _data_->_tmp62_;
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->_tmp63_);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_data_->_inner_error_ != NULL) {
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1189 "link-personas.c"
				goto __catch3_folks_individual_aggregator_error;
			}
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v4);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs2);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v3);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v2);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (_data_->im_addrs1);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			__vala_GValue_free0 (_data_->v1);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			g_clear_error (&_data_->_inner_error_);
#line 199 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			return FALSE;
#line 1214 "link-personas.c"
		}
	}
	goto __finally3;
	__catch3_folks_individual_aggregator_error:
	{
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->e = _data_->_inner_error_;
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_inner_error_ = NULL;
#line 204 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp64_ = _data_->e;
#line 204 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_data_->_tmp65_ = _data_->_tmp64_->message;
#line 204 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_warning ("link-personas.vala:204: [AddPersonaError] add_persona_from_details: %s" \
"\n", _data_->_tmp65_);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_error_free0 (_data_->e);
#line 1232 "link-personas.c"
	}
	__finally3:
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_data_->_inner_error_ != NULL) {
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v4);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs2);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v3);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_hash_table_unref0 (_data_->details2);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v2);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_data_->im_addrs1);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		__vala_GValue_free0 (_data_->v1);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_hash_table_unref0 (_data_->details1);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.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 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_clear_error (&_data_->_inner_error_);
#line 194 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		return FALSE;
#line 1259 "link-personas.c"
	}
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v4);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->im_addrs2);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v3);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_hash_table_unref0 (_data_->details2);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v2);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_data_->im_addrs1);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	__vala_GValue_free0 (_data_->v1);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_hash_table_unref0 (_data_->details1);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_data_->_state_ == 0) {
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1281 "link-personas.c"
	} else {
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1285 "link-personas.c"
	}
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_object_unref (_data_->_async_result);
#line 164 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return FALSE;
#line 1291 "link-personas.c"
}


static void __link_personas_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 226 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_notify_cb (self, _sender, pspec);
#line 1298 "link-personas.c"
}


static void _link_personas_tests_individuals_changed_cb (LinkPersonasTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
#line 209 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 209 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (changes != NULL);
#line 212 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = changes;
#line 212 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 212 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	added = _tmp1_;
#line 1316 "link-personas.c"
	{
		GeeCollection* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _i_it;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp2_ = added;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_i_it = _tmp3_;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		while (TRUE) {
#line 1329 "link-personas.c"
			GeeIterator* _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeIterator* _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp8_;
			FolksIndividual* _tmp9_;
			gboolean _tmp10_;
			gboolean _tmp11_;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp4_ = _i_it;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (!_tmp5_) {
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				break;
#line 1347 "link-personas.c"
			}
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp6_ = _i_it;
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			i = (FolksIndividual*) _tmp7_;
#line 216 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp8_ = i;
#line 216 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (_tmp8_ == NULL) {
#line 218 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_g_object_unref0 (i);
#line 218 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				continue;
#line 1363 "link-personas.c"
			}
#line 223 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp9_ = i;
#line 223 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp10_ = folks_individual_get_is_user (_tmp9_);
#line 223 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp11_ = _tmp10_;
#line 223 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (!_tmp11_) {
#line 1373 "link-personas.c"
				FolksIndividual* _tmp12_;
				FolksIndividual* _tmp13_;
				FolksIndividual* _tmp14_;
#line 225 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp12_ = i;
#line 225 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_link_personas_tests_check_personas (self, _tmp12_);
#line 226 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp13_ = i;
#line 226 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				g_signal_connect_object ((GObject*) _tmp13_, "notify::full-name", (GCallback) __link_personas_tests_notify_cb_g_object_notify, self, 0);
#line 227 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp14_ = i;
#line 227 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				g_signal_connect_object ((GObject*) _tmp14_, "notify::im-addresses", (GCallback) __link_personas_tests_notify_cb_g_object_notify, self, 0);
#line 1389 "link-personas.c"
			}
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (i);
#line 1393 "link-personas.c"
		}
#line 214 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_i_it);
#line 1397 "link-personas.c"
	}
#line 209 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (added);
#line 1401 "link-personas.c"
}


static void _link_personas_tests_notify_cb (LinkPersonasTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
#line 232 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 232 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (individual_obj != NULL);
#line 232 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (ps != NULL);
#line 234 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = individual_obj;
#line 234 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
#line 234 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	i = _tmp1_;
#line 235 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_link_personas_tests_check_personas (self, i);
#line 232 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (i);
#line 1425 "link-personas.c"
}


static gboolean ___lambda0_ (LinkPersonasTests* self) {
	gboolean result = FALSE;
	FolksIndividualAggregator* _tmp0_;
	GeeHashSet* _tmp1_;
#line 305 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = self->priv->_aggregator;
#line 305 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = self->priv->_personas;
#line 305 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	folks_individual_aggregator_link_personas (_tmp0_, (GeeSet*) _tmp1_, NULL, NULL);
#line 306 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	result = FALSE;
#line 306 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return result;
#line 1443 "link-personas.c"
}


static gboolean ____lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda0_ (self);
#line 303 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return result;
#line 1452 "link-personas.c"
}


static void _link_personas_tests_check_personas (LinkPersonasTests* self, FolksIndividual* i) {
	FolksPersona* first_persona;
	gboolean _tmp8_ = FALSE;
	FolksIndividual* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gboolean _tmp14_;
	gboolean _tmp81_ = FALSE;
	GeeHashSet* _tmp82_;
	gint _tmp83_;
	gint _tmp84_;
	gboolean _tmp86_;
#line 248 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (self != NULL);
#line 248 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_return_if_fail (i != NULL);
#line 250 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	first_persona = NULL;
#line 1475 "link-personas.c"
	{
		FolksIndividual* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_ = NULL;
		GeeIterator* _p_it;
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp0_ = i;
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp1_ = folks_individual_get_personas (_tmp0_);
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp2_ = _tmp1_;
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_p_it = _tmp3_;
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		while (TRUE) {
#line 1494 "link-personas.c"
			gboolean _tmp4_ = FALSE;
			gpointer _tmp5_ = NULL;
			FolksPersona* p;
			FolksPersona* _tmp6_;
			FolksPersona* _tmp7_;
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp4_ = gee_iterator_next (_p_it);
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (!_tmp4_) {
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				break;
#line 1506 "link-personas.c"
			}
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp5_ = gee_iterator_get (_p_it);
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			p = (FolksPersona*) _tmp5_;
#line 253 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp6_ = p;
#line 253 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp7_ = _g_object_ref0 (_tmp6_);
#line 253 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (first_persona);
#line 253 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			first_persona = _tmp7_;
#line 254 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_object_unref0 (p);
#line 254 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			break;
#line 1524 "link-personas.c"
		}
#line 251 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_object_unref0 (_p_it);
#line 1528 "link-personas.c"
	}
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp9_ = i;
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp10_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp9_);
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp11_ = _tmp10_;
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp12_ = self->priv->_persona_fullname_1;
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
#line 1540 "link-personas.c"
		const gchar* _tmp13_;
#line 258 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp13_ = self->priv->_persona_iid_1;
#line 258 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp8_ = g_strcmp0 (_tmp13_, "") == 0;
#line 1546 "link-personas.c"
	} else {
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp8_ = FALSE;
#line 1550 "link-personas.c"
	}
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp14_ = _tmp8_;
#line 257 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_tmp14_) {
#line 1556 "link-personas.c"
		FolksPersona* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		GeeHashSet* _tmp19_;
		FolksPersona* _tmp20_;
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp15_ = first_persona;
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp16_ = folks_persona_get_iid (_tmp15_);
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp17_ = _tmp16_;
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp18_ = g_strdup (_tmp17_);
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_g_free0 (self->priv->_persona_iid_1);
#line 260 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		self->priv->_persona_iid_1 = _tmp18_;
#line 261 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp19_ = self->priv->_personas;
#line 261 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp20_ = first_persona;
#line 261 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
#line 1581 "link-personas.c"
	} else {
		gboolean _tmp21_ = FALSE;
		FolksIndividual* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gboolean _tmp27_;
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp22_ = i;
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp23_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp22_);
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp24_ = _tmp23_;
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp25_ = self->priv->_persona_fullname_2;
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (g_strcmp0 (_tmp24_, _tmp25_) == 0) {
#line 1599 "link-personas.c"
			const gchar* _tmp26_;
#line 264 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp26_ = self->priv->_persona_iid_2;
#line 264 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp21_ = g_strcmp0 (_tmp26_, "") == 0;
#line 1605 "link-personas.c"
		} else {
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp21_ = FALSE;
#line 1609 "link-personas.c"
		}
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp27_ = _tmp21_;
#line 263 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		if (_tmp27_) {
#line 1615 "link-personas.c"
			FolksPersona* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			gchar* _tmp31_;
			GeeHashSet* _tmp32_;
			FolksPersona* _tmp33_;
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp28_ = first_persona;
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp29_ = folks_persona_get_iid (_tmp28_);
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp30_ = _tmp29_;
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp31_ = g_strdup (_tmp30_);
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_g_free0 (self->priv->_persona_iid_2);
#line 266 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			self->priv->_persona_iid_2 = _tmp31_;
#line 267 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp32_ = self->priv->_personas;
#line 267 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp33_ = first_persona;
#line 267 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_);
#line 1640 "link-personas.c"
		} else {
			FolksIndividual* _tmp34_;
			GeeSet* _tmp35_;
			GeeSet* _tmp36_;
			gint _tmp37_;
			gint _tmp38_;
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp34_ = i;
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp35_ = folks_individual_get_personas (_tmp34_);
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp36_ = _tmp35_;
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_);
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			_tmp38_ = _tmp37_;
#line 269 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
			if (_tmp38_ > 1) {
#line 1659 "link-personas.c"
				GeeHashMap* _tmp77_;
				gint _tmp78_;
				gint _tmp79_;
				{
					FolksIndividual* _tmp39_;
					GeeMultiMap* _tmp40_;
					GeeMultiMap* _tmp41_;
					GeeSet* _tmp42_ = NULL;
					GeeSet* _tmp43_;
					GeeIterator* _tmp44_ = NULL;
					GeeIterator* _tmp45_;
					GeeIterator* _proto_it;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp39_ = i;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp40_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp39_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp41_ = _tmp40_;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp42_ = gee_multi_map_get_keys (_tmp41_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp43_ = _tmp42_;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp45_ = _tmp44_;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_tmp43_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_proto_it = _tmp45_;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					while (TRUE) {
#line 1692 "link-personas.c"
						GeeIterator* _tmp46_;
						gboolean _tmp47_ = FALSE;
						GeeIterator* _tmp48_;
						gpointer _tmp49_ = NULL;
						gchar* proto;
						FolksIndividual* _tmp50_;
						GeeMultiMap* _tmp51_;
						GeeMultiMap* _tmp52_;
						const gchar* _tmp53_;
						GeeCollection* _tmp54_ = NULL;
						GeeCollection* addrs;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp46_ = _proto_it;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp47_ = gee_iterator_next (_tmp46_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						if (!_tmp47_) {
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							break;
#line 1712 "link-personas.c"
						}
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp48_ = _proto_it;
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp49_ = gee_iterator_get (_tmp48_);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						proto = (gchar*) _tmp49_;
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp50_ = i;
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp51_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp50_);
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp52_ = _tmp51_;
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp53_ = proto;
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_tmp54_ = gee_multi_map_get (_tmp52_, _tmp53_);
#line 274 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						addrs = _tmp54_;
#line 1732 "link-personas.c"
						{
							GeeCollection* _tmp55_;
							GeeIterator* _tmp56_ = NULL;
							GeeIterator* _a_it;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							_tmp55_ = addrs;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							_tmp56_ = gee_iterable_iterator ((GeeIterable*) _tmp55_);
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							_a_it = _tmp56_;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							while (TRUE) {
#line 1745 "link-personas.c"
								GeeIterator* _tmp57_;
								gboolean _tmp58_ = FALSE;
								GeeIterator* _tmp59_;
								gpointer _tmp60_ = NULL;
								FolksImFieldDetails* a;
								FolksImFieldDetails* _tmp61_;
								gconstpointer _tmp62_;
								const gchar* _tmp63_;
								GeeHashMap* _tmp64_;
								gpointer _tmp65_ = NULL;
								gchar* _tmp66_;
								gboolean _tmp67_;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp57_ = _a_it;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp58_ = gee_iterator_next (_tmp57_);
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								if (!_tmp58_) {
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									break;
#line 1766 "link-personas.c"
								}
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp59_ = _a_it;
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp60_ = gee_iterator_get (_tmp59_);
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								a = (FolksImFieldDetails*) _tmp60_;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp61_ = a;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp62_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp61_);
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp63_ = _tmp62_;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp64_ = self->priv->_linking_props;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp65_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp64_, "prop1");
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp66_ = (gchar*) _tmp65_;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_tmp67_ = g_strcmp0 ((const gchar*) _tmp63_, _tmp66_) == 0;
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_g_free0 (_tmp66_);
#line 277 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								if (_tmp67_) {
#line 1792 "link-personas.c"
									GeeHashMap* _tmp68_;
#line 279 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp68_ = self->priv->_linking_props;
#line 279 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									gee_abstract_map_unset ((GeeAbstractMap*) _tmp68_, "prop1", NULL);
#line 1798 "link-personas.c"
								} else {
									FolksImFieldDetails* _tmp69_;
									gconstpointer _tmp70_;
									const gchar* _tmp71_;
									GeeHashMap* _tmp72_;
									gpointer _tmp73_ = NULL;
									gchar* _tmp74_;
									gboolean _tmp75_;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp69_ = a;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp70_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp69_);
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp71_ = _tmp70_;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp72_ = self->priv->_linking_props;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp73_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp72_, "prop2");
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp74_ = (gchar*) _tmp73_;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_tmp75_ = g_strcmp0 ((const gchar*) _tmp71_, _tmp74_) == 0;
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									_g_free0 (_tmp74_);
#line 281 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
									if (_tmp75_) {
#line 1825 "link-personas.c"
										GeeHashMap* _tmp76_;
#line 283 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
										_tmp76_ = self->priv->_linking_props;
#line 283 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
										gee_abstract_map_unset ((GeeAbstractMap*) _tmp76_, "prop2", NULL);
#line 1831 "link-personas.c"
									}
								}
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
								_g_object_unref0 (a);
#line 1836 "link-personas.c"
							}
#line 275 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
							_g_object_unref0 (_a_it);
#line 1840 "link-personas.c"
						}
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_g_object_unref0 (addrs);
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
						_g_free0 (proto);
#line 1846 "link-personas.c"
					}
#line 272 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_g_object_unref0 (_proto_it);
#line 1850 "link-personas.c"
				}
#line 288 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp77_ = self->priv->_linking_props;
#line 288 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp78_ = gee_map_get_size ((GeeMap*) _tmp77_);
#line 288 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				_tmp79_ = _tmp78_;
#line 288 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
				if (_tmp79_ == 0) {
#line 1860 "link-personas.c"
					GMainLoop* _tmp80_;
#line 290 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					_tmp80_ = self->priv->_main_loop;
#line 290 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
					g_main_loop_quit (_tmp80_);
#line 1866 "link-personas.c"
				}
			}
		}
	}
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp82_ = self->priv->_personas;
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_);
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp84_ = _tmp83_;
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_tmp84_ == 2) {
#line 1879 "link-personas.c"
		gboolean _tmp85_;
#line 297 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp85_ = self->priv->_linking_fired;
#line 297 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp81_ = _tmp85_ == FALSE;
#line 1885 "link-personas.c"
	} else {
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		_tmp81_ = FALSE;
#line 1889 "link-personas.c"
	}
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp86_ = _tmp81_;
#line 296 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	if (_tmp86_) {
#line 299 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		self->priv->_linking_fired = TRUE;
#line 303 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
		g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ____lambda0__gsource_func, g_object_ref (self), g_object_unref);
#line 1899 "link-personas.c"
	}
#line 248 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (first_persona);
#line 1903 "link-personas.c"
}


static void link_personas_tests_class_init (LinkPersonasTestsClass * klass) {
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	link_personas_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_type_class_add_private (klass, sizeof (LinkPersonasTestsPrivate));
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = link_personas_tests_real_set_up;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = link_personas_tests_real_tear_down;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_OBJECT_CLASS (klass)->finalize = link_personas_tests_finalize;
#line 1918 "link-personas.c"
}


static void link_personas_tests_instance_init (LinkPersonasTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv = LINK_PERSONAS_TESTS_GET_PRIVATE (self);
#line 33 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_strdup ("jabber");
#line 33 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_proto = _tmp0_;
#line 34 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = g_strdup ("someone-1@jabber.example.org");
#line 34 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_im_address_1 = _tmp1_;
#line 35 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp2_ = g_strdup ("someone-2@jabber.example.org");
#line 35 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_im_address_2 = _tmp2_;
#line 39 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp3_ = g_strdup ("");
#line 39 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_iid_1 = _tmp3_;
#line 40 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp4_ = g_strdup ("");
#line 40 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_persona_iid_2 = _tmp4_;
#line 42 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp5_ = g_strdup ("/system/folks/backends/primary_store");
#line 42 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self->priv->_folks_config_key = _tmp5_;
#line 1955 "link-personas.c"
}


static void link_personas_tests_finalize (GObject* obj) {
	LinkPersonasTests * self;
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	self = LINK_PERSONAS_TESTS (obj);
#line 28 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
#line 30 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 31 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 32 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 33 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_proto);
#line 34 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_im_address_1);
#line 35 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_im_address_2);
#line 39 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_1);
#line 40 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_persona_iid_2);
#line 41 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_personas);
#line 42 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_free0 (self->priv->_folks_config_key);
#line 44 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (self->priv->_linking_props);
#line 26 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	G_OBJECT_CLASS (link_personas_tests_parent_class)->finalize (obj);
#line 1991 "link-personas.c"
}


GType link_personas_tests_get_type (void) {
	static volatile gsize link_personas_tests_type_id__volatile = 0;
	if (g_once_init_enter (&link_personas_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LinkPersonasTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) link_personas_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LinkPersonasTests), 0, (GInstanceInitFunc) link_personas_tests_instance_init, NULL };
		GType link_personas_tests_type_id;
		link_personas_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "LinkPersonasTests", &g_define_type_info, 0);
		g_once_init_leave (&link_personas_tests_type_id__volatile, link_personas_tests_type_id);
	}
	return link_personas_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	LinkPersonasTests* _tmp1_;
	LinkPersonasTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 314 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_test_init (&args_length1, &args, NULL);
#line 316 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp0_ = g_test_get_root ();
#line 316 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	root = _tmp0_;
#line 317 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp1_ = link_personas_tests_new ();
#line 317 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp2_ = _tmp1_;
#line 317 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 317 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 317 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	_g_object_unref0 (_tmp2_);
#line 319 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_test_run ();
#line 321 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	result = 0;
#line 321 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return result;
#line 2036 "link-personas.c"
}


int main (int argc, char ** argv) {
#line 312 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	g_type_init ();
#line 312 "/debian/rgs/devel/folks/tests/tracker/link-personas.vala"
	return _vala_main (argv, argc);
#line 2045 "link-personas.c"
}



