/* link-personas-via-local-ids.c generated by valac 0.26.0.36-540e, the Vala compiler
 * generated from link-personas-via-local-ids.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 <tracker-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <folks-test.h>
#include <gio/gio.h>


#define TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS (link_personas_via_local_ids_tests_get_type ())
#define LINK_PERSONAS_VIA_LOCAL_IDS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS, LinkPersonasViaLocalIDsTests))
#define LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS, LinkPersonasViaLocalIDsTestsClass))
#define IS_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS))
#define IS_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS))
#define LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS, LinkPersonasViaLocalIDsTestsClass))

typedef struct _LinkPersonasViaLocalIDsTests LinkPersonasViaLocalIDsTests;
typedef struct _LinkPersonasViaLocalIDsTestsClass LinkPersonasViaLocalIDsTestsClass;
typedef struct _LinkPersonasViaLocalIDsTestsPrivate LinkPersonasViaLocalIDsTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_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 _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData;
#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 _LinkPersonasViaLocalIdsTestsAddPersonasData LinkPersonasViaLocalIdsTestsAddPersonasData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _LinkPersonasViaLocalIDsTests {
	TrackerTestTestCase parent_instance;
	LinkPersonasViaLocalIDsTestsPrivate * priv;
};

struct _LinkPersonasViaLocalIDsTestsClass {
	TrackerTestTestCaseClass parent_class;
};

struct _LinkPersonasViaLocalIDsTestsPrivate {
	GMainLoop* _main_loop;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname_1;
	gchar* _persona_fullname_2;
	gboolean _linking_fired;
	gboolean _persona_found_1;
	gboolean _persona_found_2;
	gchar* _persona_iid_1;
	gchar* _persona_iid_2;
	GeeHashSet* _personas;
	gint _removed_individuals;
	GeeHashSet* _local_ids;
};

struct _LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasViaLocalIDsTests* self;
	FolksBackendStore* store;
	FolksBackendStore* _tmp0_;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksPersonaStore* pstore;
	GeeIterator* _backend_it;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GeeCollection* _tmp6_;
	GeeCollection* _tmp7_;
	GeeCollection* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	GeeIterator* _tmp11_;
	gboolean _tmp12_;
	FolksBackend* backend;
	GeeIterator* _tmp13_;
	gpointer _tmp14_;
	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 _LinkPersonasViaLocalIdsTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	LinkPersonasViaLocalIDsTests* self;
	FolksPersonaStore* pstore;
	GHashTable* details1;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GValue* v1;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue* _tmp5_;
	GValue* _tmp6_;
	GValue* _tmp7_;
	const gchar* _tmp8_;
	GHashTable* _tmp9_;
	gchar* _tmp10_;
	GValue* _tmp11_;
	GHashTable* details2;
	GHashFunc _tmp12_;
	GEqualFunc _tmp13_;
	GHashTable* _tmp14_;
	GValue* v2;
	GValue _tmp15_;
	GValue _tmp16_;
	GValue* _tmp17_;
	GValue* _tmp18_;
	GValue* _tmp19_;
	const gchar* _tmp20_;
	GHashTable* _tmp21_;
	gchar* _tmp22_;
	GValue* _tmp23_;
	FolksIndividualAggregator* _tmp24_;
	FolksPersonaStore* _tmp25_;
	GHashTable* _tmp26_;
	FolksPersona* _tmp27_;
	FolksPersona* _tmp28_;
	FolksIndividualAggregator* _tmp29_;
	FolksPersonaStore* _tmp30_;
	GHashTable* _tmp31_;
	FolksPersona* _tmp32_;
	FolksPersona* _tmp33_;
	GError* e;
	GError* _tmp34_;
	const gchar* _tmp35_;
	GError * _inner_error_;
};


static gpointer link_personas_via_local_ids_tests_parent_class = NULL;

GType link_personas_via_local_ids_tests_get_type (void) G_GNUC_CONST;
#define LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS, LinkPersonasViaLocalIDsTestsPrivate))
enum  {
	LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_DUMMY_PROPERTY
};
LinkPersonasViaLocalIDsTests* link_personas_via_local_ids_tests_new (void);
LinkPersonasViaLocalIDsTests* link_personas_via_local_ids_tests_construct (GType object_type);
void link_personas_via_local_ids_tests_test_linking_personas_via_local_ids (LinkPersonasViaLocalIDsTests* self);
static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_folks_test_case_test_method (gpointer self);
static void link_personas_via_local_ids_tests_real_set_up (FolksTestCase* base);
static void link_personas_via_local_ids_tests_real_tear_down (FolksTestCase* base);
static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async (LinkPersonasViaLocalIDsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_finish (LinkPersonasViaLocalIDsTests* self, GAsyncResult* _res_);
static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_data_free (gpointer _data);
static gboolean _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_co (LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_);
static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_via_local_ids_tests_individuals_changed_cb (LinkPersonasViaLocalIDsTests* self, GeeMultiMap* changes);
static void __link_personas_via_local_ids_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _link_personas_via_local_ids_tests_persona_store_prepared_cb (LinkPersonasViaLocalIDsTests* self, GObject* obj, GParamSpec* params);
static void __link_personas_via_local_ids_tests_persona_store_prepared_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _link_personas_via_local_ids_tests_add_personas (LinkPersonasViaLocalIDsTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _link_personas_via_local_ids_tests_add_personas_finish (LinkPersonasViaLocalIDsTests* self, GAsyncResult* _res_);
static void _link_personas_via_local_ids_tests_add_personas_data_free (gpointer _data);
static gboolean _link_personas_via_local_ids_tests_add_personas_co (LinkPersonasViaLocalIdsTestsAddPersonasData* _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_via_local_ids_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _link_personas_via_local_ids_tests_notify_cb (LinkPersonasViaLocalIDsTests* self, GObject* individual_obj, GParamSpec* ps);
static void __link_personas_via_local_ids_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _link_personas_via_local_ids_tests_check_personas (LinkPersonasViaLocalIDsTests* self, FolksIndividual* i);
static gboolean ___lambda4_ (LinkPersonasViaLocalIDsTests* self);
static gboolean ____lambda4__gsource_func (gpointer self);
static void link_personas_via_local_ids_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_folks_test_case_test_method (gpointer self) {
#line 45 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	link_personas_via_local_ids_tests_test_linking_personas_via_local_ids ((LinkPersonasViaLocalIDsTests*) self);
#line 213 "link-personas-via-local-ids.c"
}


LinkPersonasViaLocalIDsTests* link_personas_via_local_ids_tests_construct (GType object_type) {
	LinkPersonasViaLocalIDsTests * self = NULL;
#line 43 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self = (LinkPersonasViaLocalIDsTests*) tracker_test_test_case_construct (object_type, "LinkPersonasViaLocalIDsTests");
#line 45 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test linking personas", _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_folks_test_case_test_method, self);
#line 41 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return self;
#line 225 "link-personas-via-local-ids.c"
}


LinkPersonasViaLocalIDsTests* link_personas_via_local_ids_tests_new (void) {
#line 41 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return link_personas_via_local_ids_tests_construct (TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS);
#line 232 "link-personas-via-local-ids.c"
}


static void link_personas_via_local_ids_tests_real_set_up (FolksTestCase* base) {
	LinkPersonasViaLocalIDsTests * self;
	TrackerTestBackend* _tmp0_ = NULL;
#line 49 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self = (LinkPersonasViaLocalIDsTests*) base;
#line 51 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	FOLKS_TEST_CASE_CLASS (link_personas_via_local_ids_tests_parent_class)->set_up ((FolksTestCase*) G_TYPE_CHECK_INSTANCE_CAST (self, TRACKER_TEST_TYPE_TEST_CASE, TrackerTestTestCase));
#line 53 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", "tracker", TRUE);
#line 59 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = ((TrackerTestTestCase*) self)->tracker_backend;
#line 59 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	tracker_test_backend_set_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TRACKER_TEST_TYPE_BACKEND, TrackerTestBackend));
#line 249 "link-personas-via-local-ids.c"
}


static void link_personas_via_local_ids_tests_real_tear_down (FolksTestCase* base) {
	LinkPersonasViaLocalIDsTests * self;
#line 62 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self = (LinkPersonasViaLocalIDsTests*) base;
#line 64 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_unsetenv ("FOLKS_PRIMARY_STORE");
#line 65 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	FOLKS_TEST_CASE_CLASS (link_personas_via_local_ids_tests_parent_class)->tear_down ((FolksTestCase*) G_TYPE_CHECK_INSTANCE_CAST (self, TRACKER_TEST_TYPE_TEST_CASE, TrackerTestTestCase));
#line 261 "link-personas-via-local-ids.c"
}


void link_personas_via_local_ids_tests_test_linking_personas_via_local_ids (LinkPersonasViaLocalIDsTests* self) {
	GMainLoop* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GeeHashSet* _tmp3_ = NULL;
	GeeHashSet* _tmp4_ = NULL;
	GMainLoop* _tmp5_ = NULL;
	GeeHashSet* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
#line 68 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (self != NULL);
#line 70 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 70 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 70 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_main_loop = _tmp0_;
#line 71 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = g_strdup ("persona #1");
#line 71 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 71 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_fullname_1 = _tmp1_;
#line 72 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp2_ = g_strdup ("persona #2");
#line 72 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 72 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_fullname_2 = _tmp2_;
#line 73 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp3_ = gee_hash_set_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 73 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (self->priv->_personas);
#line 73 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_personas = _tmp3_;
#line 75 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_found_1 = FALSE;
#line 76 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_found_2 = FALSE;
#line 77 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_linking_fired = FALSE;
#line 79 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp4_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 79 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (self->priv->_local_ids);
#line 79 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_local_ids = _tmp4_;
#line 81 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async (self, NULL, NULL);
#line 86 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp5_ = self->priv->_main_loop;
#line 86 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_test_utils_loop_run_with_timeout (_tmp5_, 8);
#line 90 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp6_ = self->priv->_local_ids;
#line 90 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp7_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp6_);
#line 90 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp8_ = _tmp7_;
#line 90 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_vala_assert (_tmp8_ == 0, "this._local_ids.size == 0");
#line 91 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp9_ = self->priv->_removed_individuals;
#line 91 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_vala_assert (_tmp9_ == 2, "this._removed_individuals == 2");
#line 332 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_data_free (gpointer _data) {
	LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_;
	_data_ = _data;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_slice_free (LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData, _data_);
#line 343 "link-personas-via-local-ids.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return self ? g_object_ref (self) : NULL;
#line 350 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async (LinkPersonasViaLocalIDsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_;
	LinkPersonasViaLocalIDsTests* _tmp0_ = NULL;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = g_slice_new0 (LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_data_free);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->self = _tmp0_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_co (_data_);
#line 369 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_finish (LinkPersonasViaLocalIDsTests* self, GAsyncResult* _res_) {
	LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 377 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = _user_data_;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_source_object_ = source_object;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_res_ = _res_;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_co (_data_);
#line 391 "link-personas-via-local-ids.c"
}


static void __link_personas_via_local_ids_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 99 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_individuals_changed_cb ((LinkPersonasViaLocalIDsTests*) self, changes);
#line 398 "link-personas-via-local-ids.c"
}


static void __link_personas_via_local_ids_tests_persona_store_prepared_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 113 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_persona_store_prepared_cb ((LinkPersonasViaLocalIDsTests*) self, _sender, pspec);
#line 405 "link-personas-via-local-ids.c"
}


static gboolean _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_co (LinkPersonasViaLocalIdsTestsTestLinkingPersonasViaLocalIdsAsyncData* _data_) {
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	switch (_data_->_state_) {
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 0:
#line 414 "link-personas-via-local-ids.c"
		goto _state_0;
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 1:
#line 418 "link-personas-via-local-ids.c"
		goto _state_1;
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 2:
#line 422 "link-personas-via-local-ids.c"
		goto _state_2;
		default:
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_assert_not_reached ();
#line 427 "link-personas-via-local-ids.c"
	}
	_state_0:
#line 96 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp0_ = NULL;
#line 96 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 96 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->store = _data_->_tmp0_;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_state_ = 1;
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_backend_store_prepare (_data_->store, _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_ready, _data_);
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return FALSE;
#line 442 "link-personas-via-local-ids.c"
	_state_1:
#line 97 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 98 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp1_ = NULL;
#line 98 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp1_ = folks_individual_aggregator_dup ();
#line 98 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 98 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 99 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp2_ = NULL;
#line 99 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 99 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __link_personas_via_local_ids_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 460 "link-personas-via-local-ids.c"
	{
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp3_ = NULL;
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_state_ = 2;
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _link_personas_via_local_ids_tests_test_linking_personas_via_local_ids_async_ready, _data_);
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		return FALSE;
#line 472 "link-personas-via-local-ids.c"
		_state_2:
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 103 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 478 "link-personas-via-local-ids.c"
			goto __catch0_g_error;
		}
#line 105 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->pstore = NULL;
#line 483 "link-personas-via-local-ids.c"
		{
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp4_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp4_ = folks_backend_store_get_enabled_backends (_data_->store);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp5_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp5_ = _data_->_tmp4_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp6_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp6_ = gee_map_get_values (_data_->_tmp5_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp7_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp7_ = _data_->_tmp6_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp8_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp8_ = _data_->_tmp7_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp9_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp10_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_tmp10_ = _data_->_tmp9_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (_data_->_tmp8_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_data_->_backend_it = _data_->_tmp10_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			while (TRUE) {
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp11_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp11_ = _data_->_backend_it;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp12_ = FALSE;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp12_ = gee_iterator_next (_data_->_tmp11_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				if (!_data_->_tmp12_) {
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					break;
#line 531 "link-personas-via-local-ids.c"
				}
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp13_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp13_ = _data_->_backend_it;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp14_ = NULL;
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp14_ = gee_iterator_get (_data_->_tmp13_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->backend = (FolksBackend*) _data_->_tmp14_;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp15_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp15_ = _data_->backend;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp16_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp16_ = folks_backend_get_persona_stores (_data_->_tmp15_);
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp17_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp17_ = _data_->_tmp16_;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp18_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp18_ = gee_map_get (_data_->_tmp17_, "tracker");
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_g_object_unref0 (_data_->pstore);
#line 108 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->pstore = (FolksPersonaStore*) _data_->_tmp18_;
#line 109 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp19_ = NULL;
#line 109 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_data_->_tmp19_ = _data_->pstore;
#line 109 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				if (_data_->_tmp19_ != NULL) {
#line 110 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_g_object_unref0 (_data_->backend);
#line 110 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					break;
#line 573 "link-personas-via-local-ids.c"
				}
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_g_object_unref0 (_data_->backend);
#line 577 "link-personas-via-local-ids.c"
			}
#line 106 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (_data_->_backend_it);
#line 581 "link-personas-via-local-ids.c"
		}
#line 112 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp20_ = NULL;
#line 112 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp20_ = _data_->pstore;
#line 112 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_vala_assert (_data_->_tmp20_ != NULL, "pstore != null");
#line 113 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp21_ = NULL;
#line 113 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp21_ = _data_->pstore;
#line 113 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_signal_connect_object ((GObject*) _data_->_tmp21_, "notify::is-prepared", (GCallback) __link_personas_via_local_ids_tests_persona_store_prepared_cb_g_object_notify, _data_->self, 0);
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_data_->pstore);
#line 597 "link-personas-via-local-ids.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->e = _data_->_inner_error_;
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_inner_error_ = NULL;
#line 117 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp22_ = NULL;
#line 117 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp22_ = _data_->e;
#line 117 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp23_ = NULL;
#line 117 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp23_ = _data_->_tmp22_->message;
#line 117 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_warning ("link-personas-via-local-ids.vala:117: Error when calling prepare: %s\n", _data_->_tmp23_);
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_error_free0 (_data_->e);
#line 618 "link-personas-via-local-ids.c"
	}
	__finally0:
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_data_->store);
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.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 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_clear_error (&_data_->_inner_error_);
#line 101 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		return FALSE;
#line 631 "link-personas-via-local-ids.c"
	}
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->store);
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (_data_->_state_ == 0) {
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 639 "link-personas-via-local-ids.c"
	} else {
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 643 "link-personas-via-local-ids.c"
	}
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_object_unref (_data_->_async_result);
#line 94 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return FALSE;
#line 649 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_persona_store_prepared_cb (LinkPersonasViaLocalIDsTests* self, GObject* obj, GParamSpec* params) {
	FolksPersonaStore* pstore = NULL;
	GObject* _tmp0_ = NULL;
	FolksPersonaStore* _tmp1_ = NULL;
#line 121 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (self != NULL);
#line 121 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (obj != NULL);
#line 121 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (params != NULL);
#line 123 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = obj;
#line 123 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, FOLKS_TYPE_PERSONA_STORE) ? ((FolksPersonaStore*) _tmp0_) : NULL, FOLKS_TYPE_PERSONA_STORE, FolksPersonaStore));
#line 123 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	pstore = _tmp1_;
#line 125 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_add_personas (self, pstore, NULL, NULL);
#line 121 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (pstore);
#line 673 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_add_personas_data_free (gpointer _data) {
	LinkPersonasViaLocalIdsTestsAddPersonasData* _data_;
	_data_ = _data;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->pstore);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_slice_free (LinkPersonasViaLocalIdsTestsAddPersonasData, _data_);
#line 686 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_add_personas (LinkPersonasViaLocalIDsTests* self, FolksPersonaStore* pstore, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	LinkPersonasViaLocalIdsTestsAddPersonasData* _data_;
	LinkPersonasViaLocalIDsTests* _tmp0_ = NULL;
	FolksPersonaStore* _tmp1_ = NULL;
	FolksPersonaStore* _tmp2_ = NULL;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = g_slice_new0 (LinkPersonasViaLocalIdsTestsAddPersonasData);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _link_personas_via_local_ids_tests_add_personas);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _link_personas_via_local_ids_tests_add_personas_data_free);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->self = _tmp0_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = pstore;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (_data_->pstore);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->pstore = _tmp2_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_add_personas_co (_data_);
#line 715 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_add_personas_finish (LinkPersonasViaLocalIDsTests* self, GAsyncResult* _res_) {
	LinkPersonasViaLocalIdsTestsAddPersonasData* _data_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 723 "link-personas-via-local-ids.c"
}


static void _g_free0_ (gpointer var) {
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	var = (g_free (var), NULL);
#line 730 "link-personas-via-local-ids.c"
}


static void _vala_GValue_free (GValue* self) {
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_value_unset (self);
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_free (self);
#line 739 "link-personas-via-local-ids.c"
}


static void __vala_GValue_free0_ (gpointer var) {
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
#line 746 "link-personas-via-local-ids.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 753 "link-personas-via-local-ids.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return self ? _g_value_dup (self) : NULL;
#line 760 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	LinkPersonasViaLocalIdsTestsAddPersonasData* _data_;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_ = _user_data_;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_source_object_ = source_object;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_res_ = _res_;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_add_personas_co (_data_);
#line 774 "link-personas-via-local-ids.c"
}


static gboolean _link_personas_via_local_ids_tests_add_personas_co (LinkPersonasViaLocalIdsTestsAddPersonasData* _data_) {
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	switch (_data_->_state_) {
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 0:
#line 783 "link-personas-via-local-ids.c"
		goto _state_0;
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 1:
#line 787 "link-personas-via-local-ids.c"
		goto _state_1;
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		case 2:
#line 791 "link-personas-via-local-ids.c"
		goto _state_2;
		default:
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_assert_not_reached ();
#line 796 "link-personas-via-local-ids.c"
	}
	_state_0:
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp0_ = NULL;
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp0_ = g_str_hash;
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp1_ = NULL;
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp1_ = g_str_equal;
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp2_ = NULL;
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
#line 138 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->details1 = _data_->_tmp2_;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_value_init (&_data_->_tmp3_, G_TYPE_STRING);
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	memset (&_data_->_tmp4_, 0, sizeof (GValue));
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp5_ = NULL;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp5_ = __g_value_dup0 (&_data_->_tmp4_);
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp6_ = NULL;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp6_ = _data_->_tmp5_;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	G_IS_VALUE (&_data_->_tmp4_) ? (g_value_unset (&_data_->_tmp4_), NULL) : NULL;
#line 140 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->v1 = _data_->_tmp6_;
#line 141 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp7_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp7_ = _data_->v1;
#line 141 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp8_ = NULL;
#line 141 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp8_ = _data_->self->priv->_persona_fullname_1;
#line 141 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_value_set_string (_data_->_tmp7_, _data_->_tmp8_);
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp9_ = NULL;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp9_ = _data_->details1;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp10_ = NULL;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp10_ = g_strdup ("full-name");
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp11_ = NULL;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp11_ = _data_->v1;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->v1 = NULL;
#line 142 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_hash_table_insert (_data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_);
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp12_ = NULL;
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp12_ = g_str_hash;
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp13_ = NULL;
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp13_ = g_str_equal;
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp14_ = NULL;
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp14_ = g_hash_table_new_full (_data_->_tmp12_, _data_->_tmp13_, _g_free0_, __vala_GValue_free0_);
#line 144 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->details2 = _data_->_tmp14_;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	memset (&_data_->_tmp15_, 0, sizeof (GValue));
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_value_init (&_data_->_tmp15_, G_TYPE_STRING);
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	memset (&_data_->_tmp16_, 0, sizeof (GValue));
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp16_ = _data_->_tmp15_;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp17_ = NULL;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp17_ = __g_value_dup0 (&_data_->_tmp16_);
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp18_ = NULL;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp18_ = _data_->_tmp17_;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	G_IS_VALUE (&_data_->_tmp16_) ? (g_value_unset (&_data_->_tmp16_), NULL) : NULL;
#line 146 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->v2 = _data_->_tmp18_;
#line 147 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp19_ = NULL;
#line 147 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp19_ = _data_->v2;
#line 147 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp20_ = NULL;
#line 147 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp20_ = _data_->self->priv->_persona_fullname_2;
#line 147 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_value_set_string (_data_->_tmp19_, _data_->_tmp20_);
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp21_ = NULL;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp21_ = _data_->details2;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp22_ = NULL;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp22_ = g_strdup ("full-name");
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp23_ = NULL;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->_tmp23_ = _data_->v2;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_data_->v2 = NULL;
#line 148 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_hash_table_insert (_data_->_tmp21_, _data_->_tmp22_, _data_->_tmp23_);
#line 919 "link-personas-via-local-ids.c"
	{
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp24_ = NULL;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp24_ = _data_->self->priv->_aggregator;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp25_ = NULL;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp25_ = _data_->pstore;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp26_ = NULL;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp26_ = _data_->details1;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_state_ = 1;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp24_, NULL, _data_->_tmp25_, _data_->_tmp26_, _link_personas_via_local_ids_tests_add_personas_ready, _data_);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		return FALSE;
#line 939 "link-personas-via-local-ids.c"
		_state_1:
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp27_ = NULL;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp27_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp24_, _data_->_res_, &_data_->_inner_error_);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp28_ = NULL;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp28_ = _data_->_tmp27_;
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_data_->_tmp28_);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 955 "link-personas-via-local-ids.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			__vala_GValue_free0 (_data_->v2);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			__vala_GValue_free0 (_data_->v1);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.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 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			g_clear_error (&_data_->_inner_error_);
#line 152 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			return FALSE;
#line 972 "link-personas-via-local-ids.c"
		}
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp29_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp29_ = _data_->self->priv->_aggregator;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp30_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp30_ = _data_->pstore;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp31_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp31_ = _data_->details2;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_state_ = 2;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp29_, NULL, _data_->_tmp30_, _data_->_tmp31_, _link_personas_via_local_ids_tests_add_personas_ready, _data_);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		return FALSE;
#line 992 "link-personas-via-local-ids.c"
		_state_2:
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp32_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp32_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp29_, _data_->_res_, &_data_->_inner_error_);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp33_ = NULL;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp33_ = _data_->_tmp32_;
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_data_->_tmp33_);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
#line 1008 "link-personas-via-local-ids.c"
				goto __catch1_folks_individual_aggregator_error;
			}
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			__vala_GValue_free0 (_data_->v2);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_hash_table_unref0 (_data_->details2);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			__vala_GValue_free0 (_data_->v1);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_hash_table_unref0 (_data_->details1);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.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 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			g_clear_error (&_data_->_inner_error_);
#line 155 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			return FALSE;
#line 1025 "link-personas-via-local-ids.c"
		}
	}
	goto __finally1;
	__catch1_folks_individual_aggregator_error:
	{
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->e = _data_->_inner_error_;
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_inner_error_ = NULL;
#line 160 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp34_ = NULL;
#line 160 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp34_ = _data_->e;
#line 160 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp35_ = NULL;
#line 160 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_data_->_tmp35_ = _data_->_tmp34_->message;
#line 160 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_warning ("link-personas-via-local-ids.vala:160: [AddPersonaError] add_persona_fr" \
"om_details: %s\n", _data_->_tmp35_);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_error_free0 (_data_->e);
#line 1047 "link-personas-via-local-ids.c"
	}
	__finally1:
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		__vala_GValue_free0 (_data_->v2);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_hash_table_unref0 (_data_->details2);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		__vala_GValue_free0 (_data_->v1);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_hash_table_unref0 (_data_->details1);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.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 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_clear_error (&_data_->_inner_error_);
#line 150 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		return FALSE;
#line 1066 "link-personas-via-local-ids.c"
	}
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	__vala_GValue_free0 (_data_->v2);
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_hash_table_unref0 (_data_->details2);
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	__vala_GValue_free0 (_data_->v1);
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_hash_table_unref0 (_data_->details1);
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (_data_->_state_ == 0) {
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1080 "link-personas-via-local-ids.c"
	} else {
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1084 "link-personas-via-local-ids.c"
	}
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_object_unref (_data_->_async_result);
#line 136 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return FALSE;
#line 1090 "link-personas-via-local-ids.c"
}


static void __link_personas_via_local_ids_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 182 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_notify_cb ((LinkPersonasViaLocalIDsTests*) self, _sender, pspec);
#line 1097 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_individuals_changed_cb (LinkPersonasViaLocalIDsTests* self, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
#line 165 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (self != NULL);
#line 165 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (changes != NULL);
#line 168 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = changes;
#line 168 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 168 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	added = _tmp1_;
#line 169 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp2_ = changes;
#line 169 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 169 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	removed = _tmp3_;
#line 1124 "link-personas-via-local-ids.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp4_ = added;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_i_it = _tmp5_;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		while (TRUE) {
#line 1137 "link-personas-via-local-ids.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			FolksIndividual* _tmp10_ = NULL;
			FolksIndividual* _tmp11_ = NULL;
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp6_ = _i_it;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (!_tmp7_) {
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				break;
#line 1155 "link-personas-via-local-ids.c"
			}
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp8_ = _i_it;
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			i = (FolksIndividual*) _tmp9_;
#line 173 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp10_ = i;
#line 173 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (_tmp10_ == NULL) {
#line 175 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_g_object_unref0 (i);
#line 175 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				continue;
#line 1171 "link-personas-via-local-ids.c"
			}
#line 180 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp11_ = i;
#line 180 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp12_ = folks_individual_get_is_user (_tmp11_);
#line 180 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp13_ = _tmp12_;
#line 180 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (!_tmp13_) {
#line 1181 "link-personas-via-local-ids.c"
				FolksIndividual* _tmp14_ = NULL;
				FolksIndividual* _tmp15_ = NULL;
				FolksIndividual* _tmp16_ = NULL;
#line 182 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp14_ = i;
#line 182 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				g_signal_connect_object ((GObject*) _tmp14_, "notify::full-name", (GCallback) __link_personas_via_local_ids_tests_notify_cb_g_object_notify, self, 0);
#line 183 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp15_ = i;
#line 183 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				g_signal_connect_object ((GObject*) _tmp15_, "notify::local-ids", (GCallback) __link_personas_via_local_ids_tests_notify_cb_g_object_notify, self, 0);
#line 184 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp16_ = i;
#line 184 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_link_personas_via_local_ids_tests_check_personas (self, _tmp16_);
#line 1197 "link-personas-via-local-ids.c"
			}
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (i);
#line 1201 "link-personas-via-local-ids.c"
		}
#line 171 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_i_it);
#line 1205 "link-personas-via-local-ids.c"
	}
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp17_ = NULL;
		GeeIterator* _tmp18_ = NULL;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp17_ = removed;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp18_ = gee_iterable_iterator ((GeeIterable*) _tmp17_);
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_i_it = _tmp18_;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		while (TRUE) {
#line 1219 "link-personas-via-local-ids.c"
			GeeIterator* _tmp19_ = NULL;
			gboolean _tmp20_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp21_ = NULL;
			gpointer _tmp22_ = NULL;
			FolksIndividual* _tmp23_ = NULL;
			gint _tmp24_ = 0;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp19_ = _i_it;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp20_ = gee_iterator_next (_tmp19_);
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (!_tmp20_) {
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				break;
#line 1235 "link-personas-via-local-ids.c"
			}
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp21_ = _i_it;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp22_ = gee_iterator_get (_tmp21_);
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			i = (FolksIndividual*) _tmp22_;
#line 190 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp23_ = i;
#line 190 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (_tmp23_ == NULL) {
#line 192 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_g_object_unref0 (i);
#line 192 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				continue;
#line 1251 "link-personas-via-local-ids.c"
			}
#line 195 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp24_ = self->priv->_removed_individuals;
#line 195 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			self->priv->_removed_individuals = _tmp24_ + 1;
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (i);
#line 1259 "link-personas-via-local-ids.c"
		}
#line 188 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_i_it);
#line 1263 "link-personas-via-local-ids.c"
	}
#line 165 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (removed);
#line 165 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (added);
#line 1269 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_notify_cb (LinkPersonasViaLocalIDsTests* self, GObject* individual_obj, GParamSpec* ps) {
	FolksIndividual* i = NULL;
	GObject* _tmp0_ = NULL;
	FolksIndividual* _tmp1_ = NULL;
#line 199 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (self != NULL);
#line 199 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (individual_obj != NULL);
#line 199 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (ps != NULL);
#line 201 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = individual_obj;
#line 201 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
#line 201 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	i = _tmp1_;
#line 202 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_link_personas_via_local_ids_tests_check_personas (self, i);
#line 199 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (i);
#line 1293 "link-personas-via-local-ids.c"
}


static gboolean ___lambda4_ (LinkPersonasViaLocalIDsTests* self) {
	gboolean result = FALSE;
	FolksIndividualAggregator* _tmp0_ = NULL;
	GeeHashSet* _tmp1_ = NULL;
#line 266 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = self->priv->_aggregator;
#line 266 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = self->priv->_personas;
#line 266 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_individual_aggregator_link_personas (_tmp0_, (GeeSet*) _tmp1_, NULL, NULL);
#line 267 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	result = FALSE;
#line 267 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return result;
#line 1311 "link-personas-via-local-ids.c"
}


static gboolean ____lambda4__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda4_ ((LinkPersonasViaLocalIDsTests*) self);
#line 264 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return result;
#line 1320 "link-personas-via-local-ids.c"
}


static void _link_personas_via_local_ids_tests_check_personas (LinkPersonasViaLocalIDsTests* self, FolksIndividual* i) {
	FolksPersona* first_persona = NULL;
	gboolean _tmp8_ = FALSE;
	FolksIndividual* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gboolean _tmp58_ = FALSE;
	GeeHashSet* _tmp59_ = NULL;
	gint _tmp60_ = 0;
	gint _tmp61_ = 0;
#line 215 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (self != NULL);
#line 215 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_return_if_fail (i != NULL);
#line 217 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	first_persona = NULL;
#line 1341 "link-personas-via-local-ids.c"
	{
		GeeIterator* _p_it = NULL;
		FolksIndividual* _tmp0_ = NULL;
		GeeSet* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeIterator* _tmp3_ = NULL;
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp0_ = i;
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp1_ = folks_individual_get_personas (_tmp0_);
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp2_ = _tmp1_;
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_p_it = _tmp3_;
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		while (TRUE) {
#line 1360 "link-personas-via-local-ids.c"
			gboolean _tmp4_ = FALSE;
			FolksPersona* p = NULL;
			gpointer _tmp5_ = NULL;
			FolksPersona* _tmp6_ = NULL;
			FolksPersona* _tmp7_ = NULL;
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp4_ = gee_iterator_next (_p_it);
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (!_tmp4_) {
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				break;
#line 1372 "link-personas-via-local-ids.c"
			}
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp5_ = gee_iterator_get (_p_it);
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			p = (FolksPersona*) _tmp5_;
#line 220 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp6_ = p;
#line 220 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp7_ = _g_object_ref0 (_tmp6_);
#line 220 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (first_persona);
#line 220 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			first_persona = _tmp7_;
#line 221 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_object_unref0 (p);
#line 221 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			break;
#line 1390 "link-personas-via-local-ids.c"
		}
#line 218 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_object_unref0 (_p_it);
#line 1394 "link-personas-via-local-ids.c"
	}
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp9_ = i;
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp10_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp9_);
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp11_ = _tmp10_;
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp12_ = self->priv->_persona_fullname_1;
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
#line 1406 "link-personas-via-local-ids.c"
		const gchar* _tmp13_ = NULL;
#line 225 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp13_ = self->priv->_persona_iid_1;
#line 225 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp8_ = g_strcmp0 (_tmp13_, "") == 0;
#line 1412 "link-personas-via-local-ids.c"
	} else {
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp8_ = FALSE;
#line 1416 "link-personas-via-local-ids.c"
	}
#line 224 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (_tmp8_) {
#line 1420 "link-personas-via-local-ids.c"
		FolksPersona* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		GeeHashSet* _tmp18_ = NULL;
		FolksPersona* _tmp19_ = NULL;
		GeeHashSet* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp14_ = first_persona;
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp15_ = folks_persona_get_iid (_tmp14_);
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp16_ = _tmp15_;
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp17_ = g_strdup (_tmp16_);
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_g_free0 (self->priv->_persona_iid_1);
#line 227 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		self->priv->_persona_iid_1 = _tmp17_;
#line 228 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp18_ = self->priv->_personas;
#line 228 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp19_ = first_persona;
#line 228 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp19_);
#line 229 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp20_ = self->priv->_local_ids;
#line 229 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp21_ = self->priv->_persona_iid_1;
#line 229 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp20_, _tmp21_);
#line 1453 "link-personas-via-local-ids.c"
	} else {
		gboolean _tmp22_ = FALSE;
		FolksIndividual* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		const gchar* _tmp26_ = NULL;
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp23_ = i;
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp24_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp23_);
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp25_ = _tmp24_;
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp26_ = self->priv->_persona_fullname_2;
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		if (g_strcmp0 (_tmp25_, _tmp26_) == 0) {
#line 1470 "link-personas-via-local-ids.c"
			const gchar* _tmp27_ = NULL;
#line 232 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp27_ = self->priv->_persona_iid_2;
#line 232 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp22_ = g_strcmp0 (_tmp27_, "") == 0;
#line 1476 "link-personas-via-local-ids.c"
		} else {
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp22_ = FALSE;
#line 1480 "link-personas-via-local-ids.c"
		}
#line 231 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		if (_tmp22_) {
#line 1484 "link-personas-via-local-ids.c"
			FolksPersona* _tmp28_ = NULL;
			const gchar* _tmp29_ = NULL;
			const gchar* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
			GeeHashSet* _tmp32_ = NULL;
			FolksPersona* _tmp33_ = NULL;
			GeeHashSet* _tmp34_ = NULL;
			const gchar* _tmp35_ = NULL;
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp28_ = first_persona;
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp29_ = folks_persona_get_iid (_tmp28_);
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp30_ = _tmp29_;
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp31_ = g_strdup (_tmp30_);
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_g_free0 (self->priv->_persona_iid_2);
#line 234 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			self->priv->_persona_iid_2 = _tmp31_;
#line 235 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp32_ = self->priv->_personas;
#line 235 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp33_ = first_persona;
#line 235 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp33_);
#line 236 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp34_ = self->priv->_local_ids;
#line 236 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp35_ = self->priv->_persona_iid_2;
#line 236 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp34_, _tmp35_);
#line 1517 "link-personas-via-local-ids.c"
		} else {
			FolksIndividual* _tmp36_ = NULL;
			GeeSet* _tmp37_ = NULL;
			GeeSet* _tmp38_ = NULL;
			gint _tmp39_ = 0;
			gint _tmp40_ = 0;
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp36_ = i;
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp37_ = folks_individual_get_personas (_tmp36_);
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp38_ = _tmp37_;
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp39_ = gee_collection_get_size ((GeeCollection*) _tmp38_);
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			_tmp40_ = _tmp39_;
#line 238 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
			if (_tmp40_ > 1) {
#line 1536 "link-personas-via-local-ids.c"
				GeeHashSet* _tmp54_ = NULL;
				gint _tmp55_ = 0;
				gint _tmp56_ = 0;
				{
					GeeIterator* _id_it = NULL;
					FolksIndividual* _tmp41_ = NULL;
					GeeSet* _tmp42_ = NULL;
					GeeSet* _tmp43_ = NULL;
					GeeIterator* _tmp44_ = NULL;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_tmp41_ = i;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_tmp42_ = folks_local_id_details_get_local_ids ((FolksLocalIdDetails*) _tmp41_);
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_tmp43_ = _tmp42_;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_id_it = _tmp44_;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					while (TRUE) {
#line 1558 "link-personas-via-local-ids.c"
						GeeIterator* _tmp45_ = NULL;
						gboolean _tmp46_ = FALSE;
						gchar* id = NULL;
						GeeIterator* _tmp47_ = NULL;
						gpointer _tmp48_ = NULL;
						GeeHashSet* _tmp49_ = NULL;
						const gchar* _tmp50_ = NULL;
						gboolean _tmp51_ = FALSE;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp45_ = _id_it;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp46_ = gee_iterator_next (_tmp45_);
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						if (!_tmp46_) {
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
							break;
#line 1575 "link-personas-via-local-ids.c"
						}
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp47_ = _id_it;
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp48_ = gee_iterator_get (_tmp47_);
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						id = (gchar*) _tmp48_;
#line 243 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp49_ = self->priv->_local_ids;
#line 243 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp50_ = id;
#line 243 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_tmp51_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp49_, _tmp50_);
#line 243 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						if (_tmp51_) {
#line 1591 "link-personas-via-local-ids.c"
							GeeHashSet* _tmp52_ = NULL;
							const gchar* _tmp53_ = NULL;
#line 245 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
							_tmp52_ = self->priv->_local_ids;
#line 245 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
							_tmp53_ = id;
#line 245 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
							gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp52_, _tmp53_);
#line 1600 "link-personas-via-local-ids.c"
						}
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
						_g_free0 (id);
#line 1604 "link-personas-via-local-ids.c"
					}
#line 241 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_g_object_unref0 (_id_it);
#line 1608 "link-personas-via-local-ids.c"
				}
#line 249 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp54_ = self->priv->_local_ids;
#line 249 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp55_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp54_);
#line 249 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				_tmp56_ = _tmp55_;
#line 249 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
				if (_tmp56_ == 0) {
#line 1618 "link-personas-via-local-ids.c"
					GMainLoop* _tmp57_ = NULL;
#line 251 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					_tmp57_ = self->priv->_main_loop;
#line 251 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
					g_main_loop_quit (_tmp57_);
#line 1624 "link-personas-via-local-ids.c"
				}
			}
		}
	}
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp59_ = self->priv->_personas;
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp60_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp59_);
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp61_ = _tmp60_;
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (_tmp61_ == 2) {
#line 1637 "link-personas-via-local-ids.c"
		gboolean _tmp62_ = FALSE;
#line 258 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp62_ = self->priv->_linking_fired;
#line 258 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp58_ = _tmp62_ == FALSE;
#line 1643 "link-personas-via-local-ids.c"
	} else {
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		_tmp58_ = FALSE;
#line 1647 "link-personas-via-local-ids.c"
	}
#line 257 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	if (_tmp58_) {
#line 260 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		self->priv->_linking_fired = TRUE;
#line 264 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
		g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ____lambda4__gsource_func, g_object_ref (self), g_object_unref);
#line 1655 "link-personas-via-local-ids.c"
	}
#line 215 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (first_persona);
#line 1659 "link-personas-via-local-ids.c"
}


static void link_personas_via_local_ids_tests_class_init (LinkPersonasViaLocalIDsTestsClass * klass) {
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	link_personas_via_local_ids_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_type_class_add_private (klass, sizeof (LinkPersonasViaLocalIDsTestsPrivate));
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	((FolksTestCaseClass *) klass)->set_up = link_personas_via_local_ids_tests_real_set_up;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	((FolksTestCaseClass *) klass)->tear_down = link_personas_via_local_ids_tests_real_tear_down;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	G_OBJECT_CLASS (klass)->finalize = link_personas_via_local_ids_tests_finalize;
#line 1674 "link-personas-via-local-ids.c"
}


static void link_personas_via_local_ids_tests_instance_init (LinkPersonasViaLocalIDsTests * self) {
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv = LINK_PERSONAS_VIA_LOCAL_IDS_TESTS_GET_PRIVATE (self);
#line 35 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = g_strdup ("");
#line 35 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_iid_1 = _tmp0_;
#line 36 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp1_ = g_strdup ("");
#line 36 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_persona_iid_2 = _tmp1_;
#line 38 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self->priv->_removed_individuals = 0;
#line 1693 "link-personas-via-local-ids.c"
}


static void link_personas_via_local_ids_tests_finalize (GObject* obj) {
	LinkPersonasViaLocalIDsTests * self;
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LINK_PERSONAS_VIA_LOCAL_IDS_TESTS, LinkPersonasViaLocalIDsTests);
#line 28 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 30 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_fullname_1);
#line 31 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_fullname_2);
#line 35 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_iid_1);
#line 36 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_free0 (self->priv->_persona_iid_2);
#line 37 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (self->priv->_personas);
#line 39 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (self->priv->_local_ids);
#line 26 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	G_OBJECT_CLASS (link_personas_via_local_ids_tests_parent_class)->finalize (obj);
#line 1719 "link-personas-via-local-ids.c"
}


GType link_personas_via_local_ids_tests_get_type (void) {
	static volatile gsize link_personas_via_local_ids_tests_type_id__volatile = 0;
	if (g_once_init_enter (&link_personas_via_local_ids_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LinkPersonasViaLocalIDsTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) link_personas_via_local_ids_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LinkPersonasViaLocalIDsTests), 0, (GInstanceInitFunc) link_personas_via_local_ids_tests_instance_init, NULL };
		GType link_personas_via_local_ids_tests_type_id;
		link_personas_via_local_ids_tests_type_id = g_type_register_static (TRACKER_TEST_TYPE_TEST_CASE, "LinkPersonasViaLocalIDsTests", &g_define_type_info, 0);
		g_once_init_leave (&link_personas_via_local_ids_tests_type_id__volatile, link_personas_via_local_ids_tests_type_id);
	}
	return link_personas_via_local_ids_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	LinkPersonasViaLocalIDsTests* tests = NULL;
	LinkPersonasViaLocalIDsTests* _tmp0_ = NULL;
#line 275 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_test_init (&args_length1, &args, NULL);
#line 277 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_tmp0_ = link_personas_via_local_ids_tests_new ();
#line 277 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	tests = _tmp0_;
#line 278 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 279 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	g_test_run ();
#line 280 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 282 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	result = 0;
#line 282 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	_g_object_unref0 (tests);
#line 282 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return result;
#line 1757 "link-personas-via-local-ids.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 273 "/opt/gnome3/source/folks/tests/tracker/link-personas-via-local-ids.vala"
	return _vala_main (argv, argc);
#line 1767 "link-personas-via-local-ids.c"
}



