/* set-im-addresses.c generated by valac 0.26.0.36-540e, the Vala compiler
 * generated from set-im-addresses.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 <folks-test.h>
#include <gee.h>
#include <folks/folks-tracker.h>
#include <gio/gio.h>


#define TYPE_SET_IM_ADDRESSES_TESTS (set_im_addresses_tests_get_type ())
#define SET_IM_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTests))
#define SET_IM_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsClass))
#define IS_SET_IM_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_IM_ADDRESSES_TESTS))
#define IS_SET_IM_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_IM_ADDRESSES_TESTS))
#define SET_IM_ADDRESSES_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsClass))

typedef struct _SetIMAddressesTests SetIMAddressesTests;
typedef struct _SetIMAddressesTestsClass SetIMAddressesTestsClass;
typedef struct _SetIMAddressesTestsPrivate SetIMAddressesTestsPrivate;
#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_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SetImAddressesTestsTestSetImAddressesAsyncData SetImAddressesTestsTestSetImAddressesAsyncData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _SetIMAddressesTests {
	TrackerTestTestCase parent_instance;
	SetIMAddressesTestsPrivate * priv;
};

struct _SetIMAddressesTestsClass {
	TrackerTestTestCaseClass parent_class;
};

struct _SetIMAddressesTestsPrivate {
	GMainLoop* _main_loop;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname;
	GList* _addresses;
	gboolean _initial_individual_found;
};

struct _SetImAddressesTestsTestSetImAddressesAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SetIMAddressesTests* self;
	FolksBackendStore* store;
	FolksBackendStore* _tmp0_;
	FolksIndividualAggregator* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	GError* e;
	GError* _tmp4_;
	const gchar* _tmp5_;
	GError * _inner_error_;
};


static gpointer set_im_addresses_tests_parent_class = NULL;

GType set_im_addresses_tests_get_type (void) G_GNUC_CONST;
#define SET_IM_ADDRESSES_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTestsPrivate))
enum  {
	SET_IM_ADDRESSES_TESTS_DUMMY_PROPERTY
};
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
SetIMAddressesTests* set_im_addresses_tests_new (void);
SetIMAddressesTests* set_im_addresses_tests_construct (GType object_type);
void set_im_addresses_tests_test_set_im_addresses (SetIMAddressesTests* self);
static void _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method (gpointer self);
static void _set_im_addresses_tests_test_set_im_addresses_async (SetIMAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_im_addresses_tests_test_set_im_addresses_finish (SetIMAddressesTests* self, GAsyncResult* _res_);
static void _set_im_addresses_tests_test_set_im_addresses_async_data_free (gpointer _data);
static gboolean _set_im_addresses_tests_test_set_im_addresses_async_co (SetImAddressesTestsTestSetImAddressesAsyncData* _data_);
static void _set_im_addresses_tests_test_set_im_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _set_im_addresses_tests_individuals_changed_cb (SetIMAddressesTests* self, GeeMultiMap* changes);
static void __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_im_addresses_tests_notify_im_addresses_cb (SetIMAddressesTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void _set_im_addresses_tests_check_im_addresses (SetIMAddressesTests* self, FolksIndividual* i);
static void set_im_addresses_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _g_free0_ (gpointer var) {
#line 31 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	var = (g_free (var), NULL);
#line 122 "set-im-addresses.c"
}


static void _g_list_free__g_free0_ (GList* self) {
#line 31 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
#line 31 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_list_free (self);
#line 131 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method (gpointer self) {
#line 39 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	set_im_addresses_tests_test_set_im_addresses ((SetIMAddressesTests*) self);
#line 138 "set-im-addresses.c"
}


SetIMAddressesTests* set_im_addresses_tests_construct (GType object_type) {
	SetIMAddressesTests * self = NULL;
#line 37 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self = (SetIMAddressesTests*) tracker_test_test_case_construct (object_type, "SetIMAddressesTests");
#line 39 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test setting im_addresses ", _set_im_addresses_tests_test_set_im_addresses_folks_test_case_test_method, self);
#line 35 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return self;
#line 150 "set-im-addresses.c"
}


SetIMAddressesTests* set_im_addresses_tests_new (void) {
#line 35 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return set_im_addresses_tests_construct (TYPE_SET_IM_ADDRESSES_TESTS);
#line 157 "set-im-addresses.c"
}


void set_im_addresses_tests_test_set_im_addresses (SetIMAddressesTests* self) {
	GMainLoop* _tmp0_ = NULL;
	GeeHashMap* c1 = NULL;
	GeeHashMap* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	TrackerTestBackend* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	TrackerTestBackend* _tmp9_ = NULL;
	GMainLoop* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	GList* _tmp12_ = NULL;
	guint _tmp13_ = 0U;
#line 42 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 44 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_initial_individual_found = FALSE;
#line 45 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 45 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 45 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_main_loop = _tmp0_;
#line 46 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 46 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	c1 = _tmp1_;
#line 48 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp2_ = g_strdup ("persona #1");
#line 48 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 48 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_persona_fullname = _tmp2_;
#line 50 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp3_ = self->priv->_persona_fullname;
#line 50 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, TRF_ONTOLOGY_DEFS_NCO_FULLNAME, _tmp3_);
#line 51 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp4_ = ((TrackerTestTestCase*) self)->tracker_backend;
#line 51 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	tracker_test_backend_add_contact (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TRACKER_TEST_TYPE_BACKEND, TrackerTestBackend), c1);
#line 53 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp5_ = g_strdup ("one@example.org");
#line 53 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp5_);
#line 54 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp6_ = g_strdup ("two@example.org");
#line 54 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp6_);
#line 55 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp7_ = g_strdup ("three@example.org");
#line 55 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp7_);
#line 56 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp8_ = g_strdup ("four@example.org");
#line 56 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = g_list_prepend (self->priv->_addresses, _tmp8_);
#line 58 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp9_ = ((TrackerTestTestCase*) self)->tracker_backend;
#line 58 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	tracker_test_backend_set_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TRACKER_TEST_TYPE_BACKEND, TrackerTestBackend));
#line 60 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async (self, NULL, NULL);
#line 62 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp10_ = self->priv->_main_loop;
#line 62 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_test_utils_loop_run_with_timeout (_tmp10_, 5);
#line 64 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp11_ = self->priv->_initial_individual_found;
#line 64 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_vala_assert (_tmp11_, "this._initial_individual_found");
#line 65 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp12_ = self->priv->_addresses;
#line 65 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp13_ = g_list_length (_tmp12_);
#line 65 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_vala_assert (_tmp13_ == ((guint) 0), "this._addresses.length () == 0");
#line 42 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (c1);
#line 243 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async_data_free (gpointer _data) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
	_data_ = _data;
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_slice_free (SetImAddressesTestsTestSetImAddressesAsyncData, _data_);
#line 254 "set-im-addresses.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return self ? g_object_ref (self) : NULL;
#line 261 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async (SetIMAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
	SetIMAddressesTests* _tmp0_ = NULL;
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_ = g_slice_new0 (SetImAddressesTestsTestSetImAddressesAsyncData);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_im_addresses_tests_test_set_im_addresses_async);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_im_addresses_tests_test_set_im_addresses_async_data_free);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->self = _tmp0_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async_co (_data_);
#line 280 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_finish (SetIMAddressesTests* self, GAsyncResult* _res_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 288 "set-im-addresses.c"
}


static void _set_im_addresses_tests_test_set_im_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetImAddressesTestsTestSetImAddressesAsyncData* _data_;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_ = _user_data_;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_source_object_ = source_object;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_res_ = _res_;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_test_set_im_addresses_async_co (_data_);
#line 302 "set-im-addresses.c"
}


static void __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 73 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_individuals_changed_cb ((SetIMAddressesTests*) self, changes);
#line 309 "set-im-addresses.c"
}


static gboolean _set_im_addresses_tests_test_set_im_addresses_async_co (SetImAddressesTestsTestSetImAddressesAsyncData* _data_) {
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	switch (_data_->_state_) {
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		case 0:
#line 318 "set-im-addresses.c"
		goto _state_0;
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		case 1:
#line 322 "set-im-addresses.c"
		goto _state_1;
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		case 2:
#line 326 "set-im-addresses.c"
		goto _state_2;
		default:
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_assert_not_reached ();
#line 331 "set-im-addresses.c"
	}
	_state_0:
#line 70 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp0_ = NULL;
#line 70 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 70 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->store = _data_->_tmp0_;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_state_ = 1;
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_backend_store_prepare (_data_->store, _set_im_addresses_tests_test_set_im_addresses_async_ready, _data_);
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return FALSE;
#line 346 "set-im-addresses.c"
	_state_1:
#line 71 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 72 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp1_ = NULL;
#line 72 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp1_ = folks_individual_aggregator_dup ();
#line 72 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 72 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 73 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp2_ = NULL;
#line 73 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 73 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __set_im_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 364 "set-im-addresses.c"
	{
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp3_ = NULL;
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_state_ = 2;
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _set_im_addresses_tests_test_set_im_addresses_async_ready, _data_);
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		return FALSE;
#line 376 "set-im-addresses.c"
		_state_2:
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 77 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 382 "set-im-addresses.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->e = _data_->_inner_error_;
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_inner_error_ = NULL;
#line 81 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp4_ = NULL;
#line 81 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp4_ = _data_->e;
#line 81 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp5_ = NULL;
#line 81 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 81 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_warning ("set-im-addresses.vala:81: Error when calling prepare: %s\n", _data_->_tmp5_);
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_g_error_free0 (_data_->e);
#line 405 "set-im-addresses.c"
	}
	__finally0:
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_data_->store);
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.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 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_clear_error (&_data_->_inner_error_);
#line 75 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		return FALSE;
#line 418 "set-im-addresses.c"
	}
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (_data_->store);
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	if (_data_->_state_ == 0) {
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 426 "set-im-addresses.c"
	} else {
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 430 "set-im-addresses.c"
	}
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_object_unref (_data_->_async_result);
#line 68 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return FALSE;
#line 436 "set-im-addresses.c"
}


static void __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 100 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_notify_im_addresses_cb ((SetIMAddressesTests*) self, _sender, pspec);
#line 443 "set-im-addresses.c"
}


static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = folks_abstract_field_details_hash_static ((FolksAbstractFieldDetails*) v);
#line 102 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 452 "set-im-addresses.c"
}


static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gboolean result;
	result = folks_abstract_field_details_equal_static ((FolksAbstractFieldDetails*) a, (FolksAbstractFieldDetails*) b);
#line 102 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 461 "set-im-addresses.c"
}


static void _set_im_addresses_tests_individuals_changed_cb (SetIMAddressesTests* self, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
#line 85 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 85 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (changes != NULL);
#line 88 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = changes;
#line 88 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 88 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	added = _tmp1_;
#line 479 "set-im-addresses.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeIterator* _tmp3_ = NULL;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp2_ = added;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_i_it = _tmp3_;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		while (TRUE) {
#line 492 "set-im-addresses.c"
			GeeIterator* _tmp4_ = NULL;
			gboolean _tmp5_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp6_ = NULL;
			gpointer _tmp7_ = NULL;
			FolksIndividual* _tmp8_ = NULL;
			FolksIndividual* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			const gchar* _tmp11_ = NULL;
			const gchar* _tmp12_ = NULL;
			gboolean _tmp13_ = FALSE;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp4_ = _i_it;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp5_) {
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				break;
#line 512 "set-im-addresses.c"
			}
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp6_ = _i_it;
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			i = (FolksIndividual*) _tmp7_;
#line 92 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp8_ = i;
#line 92 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_vala_assert (_tmp8_ != NULL, "i != null");
#line 94 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp9_ = i;
#line 94 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp10_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp9_);
#line 94 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp11_ = _tmp10_;
#line 94 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp12_ = self->priv->_persona_fullname;
#line 94 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			if (g_strcmp0 (_tmp11_, _tmp12_) != 0) {
#line 95 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (i);
#line 95 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				continue;
#line 538 "set-im-addresses.c"
			}
#line 97 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp13_ = self->priv->_initial_individual_found;
#line 97 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp13_) {
#line 544 "set-im-addresses.c"
				FolksIndividual* _tmp14_ = NULL;
				GeeHashMultiMap* im_addresses = NULL;
				GeeHashMultiMap* _tmp15_ = NULL;
				GeeHashMultiMap* _tmp16_ = NULL;
				FolksImFieldDetails* _tmp17_ = NULL;
				FolksImFieldDetails* _tmp18_ = NULL;
				GeeHashMultiMap* _tmp19_ = NULL;
				FolksImFieldDetails* _tmp20_ = NULL;
				FolksImFieldDetails* _tmp21_ = NULL;
				GeeHashMultiMap* _tmp22_ = NULL;
				FolksImFieldDetails* _tmp23_ = NULL;
				FolksImFieldDetails* _tmp24_ = NULL;
				GeeHashMultiMap* _tmp25_ = NULL;
				FolksImFieldDetails* _tmp26_ = NULL;
				FolksImFieldDetails* _tmp27_ = NULL;
#line 99 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				self->priv->_initial_individual_found = TRUE;
#line 100 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp14_ = i;
#line 100 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				g_signal_connect_object ((GObject*) _tmp14_, "notify::im-addresses", (GCallback) __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify, self, 0);
#line 102 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp15_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
#line 102 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				im_addresses = _tmp15_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp16_ = im_addresses;
#line 106 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp17_ = folks_im_field_details_new ("one@example.org", NULL);
#line 106 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp18_ = _tmp17_;
#line 106 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp16_, "aim", _tmp18_);
#line 106 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp18_);
#line 107 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp19_ = im_addresses;
#line 107 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp20_ = folks_im_field_details_new ("two@example.org", NULL);
#line 107 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp21_ = _tmp20_;
#line 107 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp19_, "aim", _tmp21_);
#line 107 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp21_);
#line 109 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp22_ = im_addresses;
#line 109 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp23_ = folks_im_field_details_new ("three@example.org", NULL);
#line 109 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp24_ = _tmp23_;
#line 109 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp22_, "yahoo", _tmp24_);
#line 109 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp24_);
#line 111 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp25_ = im_addresses;
#line 111 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp26_ = folks_im_field_details_new ("four@example.org", NULL);
#line 111 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp27_ = _tmp26_;
#line 111 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				gee_multi_map_set ((GeeMultiMap*) _tmp25_, "yahoo", _tmp27_);
#line 111 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_tmp27_);
#line 610 "set-im-addresses.c"
				{
					GeeIterator* _p_it = NULL;
					FolksIndividual* _tmp28_ = NULL;
					GeeSet* _tmp29_ = NULL;
					GeeSet* _tmp30_ = NULL;
					GeeIterator* _tmp31_ = NULL;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp28_ = i;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp29_ = folks_individual_get_personas (_tmp28_);
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp30_ = _tmp29_;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp31_ = gee_iterable_iterator ((GeeIterable*) _tmp30_);
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_p_it = _tmp31_;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					while (TRUE) {
#line 629 "set-im-addresses.c"
						GeeIterator* _tmp32_ = NULL;
						gboolean _tmp33_ = FALSE;
						FolksPersona* p = NULL;
						GeeIterator* _tmp34_ = NULL;
						gpointer _tmp35_ = NULL;
						FolksPersona* _tmp36_ = NULL;
						GeeHashMultiMap* _tmp37_ = NULL;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp32_ = _p_it;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp33_ = gee_iterator_next (_tmp32_);
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						if (!_tmp33_) {
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
							break;
#line 645 "set-im-addresses.c"
						}
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp34_ = _p_it;
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp35_ = gee_iterator_get (_tmp34_);
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						p = (FolksPersona*) _tmp35_;
#line 116 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp36_ = p;
#line 116 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_tmp37_ = im_addresses;
#line 116 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						folks_im_details_set_im_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, FOLKS_TYPE_IM_DETAILS, FolksImDetails), (GeeMultiMap*) _tmp37_);
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						_g_object_unref0 (p);
#line 661 "set-im-addresses.c"
					}
#line 114 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_g_object_unref0 (_p_it);
#line 665 "set-im-addresses.c"
				}
#line 97 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (im_addresses);
#line 669 "set-im-addresses.c"
			} else {
				FolksIndividual* _tmp38_ = NULL;
				FolksIndividual* _tmp39_ = NULL;
#line 121 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp38_ = i;
#line 121 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				g_signal_connect_object ((GObject*) _tmp38_, "notify::im-addresses", (GCallback) __set_im_addresses_tests_notify_im_addresses_cb_g_object_notify, self, 0);
#line 122 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp39_ = i;
#line 122 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_set_im_addresses_tests_check_im_addresses (self, _tmp39_);
#line 681 "set-im-addresses.c"
			}
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_g_object_unref0 (i);
#line 685 "set-im-addresses.c"
		}
#line 90 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_i_it);
#line 689 "set-im-addresses.c"
	}
#line 85 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (added);
#line 693 "set-im-addresses.c"
}


static void _set_im_addresses_tests_notify_im_addresses_cb (SetIMAddressesTests* self, GObject* individual_obj, GParamSpec* ps) {
	FolksIndividual* i = NULL;
	GObject* _tmp0_ = NULL;
	FolksIndividual* _tmp1_ = NULL;
#line 127 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 127 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (individual_obj != NULL);
#line 127 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (ps != NULL);
#line 129 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = individual_obj;
#line 129 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
#line 129 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	i = _tmp1_;
#line 130 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_set_im_addresses_tests_check_im_addresses (self, i);
#line 127 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (i);
#line 717 "set-im-addresses.c"
}


static void _set_im_addresses_tests_check_im_addresses (SetIMAddressesTests* self, FolksIndividual* i) {
	GList* _tmp28_ = NULL;
	guint _tmp29_ = 0U;
#line 133 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (self != NULL);
#line 133 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_return_if_fail (i != NULL);
#line 728 "set-im-addresses.c"
	{
		GeeIterator* _proto_it = NULL;
		FolksIndividual* _tmp0_ = NULL;
		GeeMultiMap* _tmp1_ = NULL;
		GeeMultiMap* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp0_ = i;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp1_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp0_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp2_ = _tmp1_;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp4_ = _tmp3_;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp6_ = _tmp5_;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_tmp4_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_proto_it = _tmp6_;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		while (TRUE) {
#line 758 "set-im-addresses.c"
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			gchar* proto = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			GeeCollection* im_fds = NULL;
			FolksIndividual* _tmp11_ = NULL;
			GeeMultiMap* _tmp12_ = NULL;
			GeeMultiMap* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			GeeCollection* _tmp15_ = NULL;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp7_ = _proto_it;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			if (!_tmp8_) {
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				break;
#line 778 "set-im-addresses.c"
			}
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp9_ = _proto_it;
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			proto = (gchar*) _tmp10_;
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp11_ = i;
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp12_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp11_);
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp13_ = _tmp12_;
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp14_ = proto;
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_tmp15_ = gee_multi_map_get (_tmp13_, _tmp14_);
#line 137 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			im_fds = _tmp15_;
#line 798 "set-im-addresses.c"
			{
				GeeIterator* _im_fd_it = NULL;
				GeeCollection* _tmp16_ = NULL;
				GeeIterator* _tmp17_ = NULL;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp16_ = im_fds;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_im_fd_it = _tmp17_;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				while (TRUE) {
#line 811 "set-im-addresses.c"
					GeeIterator* _tmp18_ = NULL;
					gboolean _tmp19_ = FALSE;
					FolksImFieldDetails* im_fd = NULL;
					GeeIterator* _tmp20_ = NULL;
					gpointer _tmp21_ = NULL;
					GList* _tmp22_ = NULL;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp18_ = _im_fd_it;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp19_ = gee_iterator_next (_tmp18_);
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					if (!_tmp19_) {
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						break;
#line 826 "set-im-addresses.c"
					}
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp20_ = _im_fd_it;
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp21_ = gee_iterator_get (_tmp20_);
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					im_fd = (FolksImFieldDetails*) _tmp21_;
#line 140 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_tmp22_ = self->priv->_addresses;
#line 836 "set-im-addresses.c"
					{
						GList* my_a_collection = NULL;
						GList* my_a_it = NULL;
#line 140 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						my_a_collection = _tmp22_;
#line 140 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
						for (my_a_it = my_a_collection; my_a_it != NULL; my_a_it = my_a_it->next) {
#line 844 "set-im-addresses.c"
							const gchar* my_a = NULL;
#line 140 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
							my_a = (const gchar*) my_a_it->data;
#line 848 "set-im-addresses.c"
							{
								const gchar* _tmp23_ = NULL;
								FolksImFieldDetails* _tmp24_ = NULL;
								gconstpointer _tmp25_ = NULL;
								const gchar* _tmp26_ = NULL;
#line 142 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
								_tmp23_ = my_a;
#line 142 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
								_tmp24_ = im_fd;
#line 142 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
								_tmp25_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp24_);
#line 142 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
								_tmp26_ = _tmp25_;
#line 142 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
								if (g_strcmp0 (_tmp23_, (const gchar*) _tmp26_) == 0) {
#line 864 "set-im-addresses.c"
									const gchar* _tmp27_ = NULL;
#line 144 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
									_tmp27_ = my_a;
#line 144 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
									self->priv->_addresses = g_list_remove (self->priv->_addresses, _tmp27_);
#line 145 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
									break;
#line 872 "set-im-addresses.c"
								}
							}
						}
					}
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
					_g_object_unref0 (im_fd);
#line 879 "set-im-addresses.c"
				}
#line 138 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
				_g_object_unref0 (_im_fd_it);
#line 883 "set-im-addresses.c"
			}
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_g_object_unref0 (im_fds);
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
			_g_free0 (proto);
#line 889 "set-im-addresses.c"
		}
#line 135 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_g_object_unref0 (_proto_it);
#line 893 "set-im-addresses.c"
	}
#line 151 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp28_ = self->priv->_addresses;
#line 151 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp29_ = g_list_length (_tmp28_);
#line 151 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	if (_tmp29_ == ((guint) 0)) {
#line 901 "set-im-addresses.c"
		GMainLoop* _tmp30_ = NULL;
#line 153 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		_tmp30_ = self->priv->_main_loop;
#line 153 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
		g_main_loop_quit (_tmp30_);
#line 907 "set-im-addresses.c"
	}
}


static void set_im_addresses_tests_class_init (SetIMAddressesTestsClass * klass) {
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	set_im_addresses_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_type_class_add_private (klass, sizeof (SetIMAddressesTestsPrivate));
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	G_OBJECT_CLASS (klass)->finalize = set_im_addresses_tests_finalize;
#line 919 "set-im-addresses.c"
}


static void set_im_addresses_tests_instance_init (SetIMAddressesTests * self) {
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv = SET_IM_ADDRESSES_TESTS_GET_PRIVATE (self);
#line 31 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self->priv->_addresses = NULL;
#line 928 "set-im-addresses.c"
}


static void set_im_addresses_tests_finalize (GObject* obj) {
	SetIMAddressesTests * self;
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_IM_ADDRESSES_TESTS, SetIMAddressesTests);
#line 28 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 30 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 31 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	__g_list_free__g_free0_0 (self->priv->_addresses);
#line 26 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	G_OBJECT_CLASS (set_im_addresses_tests_parent_class)->finalize (obj);
#line 946 "set-im-addresses.c"
}


GType set_im_addresses_tests_get_type (void) {
	static volatile gsize set_im_addresses_tests_type_id__volatile = 0;
	if (g_once_init_enter (&set_im_addresses_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetIMAddressesTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_im_addresses_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetIMAddressesTests), 0, (GInstanceInitFunc) set_im_addresses_tests_instance_init, NULL };
		GType set_im_addresses_tests_type_id;
		set_im_addresses_tests_type_id = g_type_register_static (TRACKER_TEST_TYPE_TEST_CASE, "SetIMAddressesTests", &g_define_type_info, 0);
		g_once_init_leave (&set_im_addresses_tests_type_id__volatile, set_im_addresses_tests_type_id);
	}
	return set_im_addresses_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	SetIMAddressesTests* tests = NULL;
	SetIMAddressesTests* _tmp0_ = NULL;
#line 160 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_test_init (&args_length1, &args, NULL);
#line 162 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_tmp0_ = set_im_addresses_tests_new ();
#line 162 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	tests = _tmp0_;
#line 163 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 164 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	g_test_run ();
#line 165 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 167 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	result = 0;
#line 167 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	_g_object_unref0 (tests);
#line 167 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return result;
#line 984 "set-im-addresses.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 158 "/opt/gnome3/source/folks/tests/tracker/set-im-addresses.vala"
	return _vala_main (argv, argc);
#line 994 "set-im-addresses.c"
}



