/* set-avatar.c generated by valac 0.24.0.16-c045, the Vala compiler
 * generated from set-avatar.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 <eds-test.h>
#include <folks/folks.h>
#include <gio/gio.h>
#include <folks-test.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_SET_AVATAR_TESTS (set_avatar_tests_get_type ())
#define SET_AVATAR_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_AVATAR_TESTS, SetAvatarTests))
#define SET_AVATAR_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_AVATAR_TESTS, SetAvatarTestsClass))
#define IS_SET_AVATAR_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_AVATAR_TESTS))
#define IS_SET_AVATAR_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_AVATAR_TESTS))
#define SET_AVATAR_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_AVATAR_TESTS, SetAvatarTestsClass))

typedef struct _SetAvatarTests SetAvatarTests;
typedef struct _SetAvatarTestsClass SetAvatarTestsClass;
typedef struct _SetAvatarTestsPrivate SetAvatarTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (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 _SetAvatarTestsTestSetAvatarAsyncData SetAvatarTestsTestSetAvatarAsyncData;
typedef struct _Block1Data Block1Data;
typedef struct _SetAvatarTestsTestSetIndividualAvatarAsyncData SetAvatarTestsTestSetIndividualAvatarAsyncData;
typedef struct _SetAvatarTestsCheckIndividualHasAvatarData SetAvatarTestsCheckIndividualHasAvatarData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _SetAvatarTests {
	EdsTestTestCase parent_instance;
	SetAvatarTestsPrivate * priv;
};

struct _SetAvatarTestsClass {
	EdsTestTestCaseClass parent_class;
};

struct _SetAvatarTestsPrivate {
	FolksIndividualAggregator* _aggregator;
	GMainLoop* _main_loop;
	gboolean _found_before_update;
	gboolean _found_after_update;
	GLoadableIcon* _avatar;
};

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

struct _Block1Data {
	int _ref_count_;
	SetAvatarTests* self;
	FolksIndividual* i;
};

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

struct _SetAvatarTestsCheckIndividualHasAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SetAvatarTests* self;
	FolksIndividual* i;
	gboolean result;
	FolksNameDetails* name;
	FolksIndividual* _tmp0_;
	FolksNameDetails* _tmp1_;
	FolksNameDetails* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean individual_equal;
	FolksIndividual* _tmp5_;
	GLoadableIcon* _tmp6_;
	GLoadableIcon* _tmp7_;
	GLoadableIcon* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GeeIterator* _p_it;
	FolksIndividual* _tmp11_;
	GeeSet* _tmp12_;
	GeeSet* _tmp13_;
	GeeIterator* _tmp14_;
	GeeIterator* _tmp15_;
	gboolean _tmp16_;
	FolksPersona* p;
	GeeIterator* _tmp17_;
	gpointer _tmp18_;
	gboolean persona_equal;
	FolksPersona* _tmp19_;
	GLoadableIcon* _tmp20_;
	GLoadableIcon* _tmp21_;
	GLoadableIcon* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	FolksPersona* _tmp25_;
	FolksPersonaStore* _tmp26_;
	FolksPersonaStore* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gboolean _tmp30_;
};


static gpointer set_avatar_tests_parent_class = NULL;

GType set_avatar_tests_get_type (void) G_GNUC_CONST;
#define SET_AVATAR_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_AVATAR_TESTS, SetAvatarTestsPrivate))
enum  {
	SET_AVATAR_TESTS_DUMMY_PROPERTY
};
SetAvatarTests* set_avatar_tests_new (void);
SetAvatarTests* set_avatar_tests_construct (GType object_type);
static void set_avatar_tests_test_set_avatar (SetAvatarTests* self);
static void _set_avatar_tests_test_set_avatar_folks_test_case_test_method (gpointer self);
static void set_avatar_tests_test_set_individual_avatar (SetAvatarTests* self);
static void _set_avatar_tests_test_set_individual_avatar_folks_test_case_test_method (gpointer self);
static GValue* _g_value_dup (GValue* self);
static void _vala_GValue_free (GValue* self);
static void _set_avatar_tests_test_set_avatar_async (SetAvatarTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_avatar_tests_test_set_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_);
static void _set_avatar_tests_test_set_avatar_async_data_free (gpointer _data);
static gboolean _set_avatar_tests_test_set_avatar_async_co (SetAvatarTestsTestSetAvatarAsyncData* _data_);
static void _set_avatar_tests_test_set_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _set_avatar_tests_individuals_changed_cb (SetAvatarTests* self, GeeMultiMap* changes);
static void __set_avatar_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_avatar_tests_notify_avatar_cb (SetAvatarTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_avatar_tests_notify_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void ___lambda3_ (SetAvatarTests* self, GObject* obj, GAsyncResult* _result_);
static void ____lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void _set_avatar_tests_test_set_individual_avatar_async (SetAvatarTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_avatar_tests_test_set_individual_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_);
static void _set_avatar_tests_test_set_individual_avatar_async_data_free (gpointer _data);
static gboolean _set_avatar_tests_test_set_individual_avatar_async_co (SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_);
static void _set_avatar_tests_test_set_individual_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda4_ (SetAvatarTests* self, GeeMultiMap* changes);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void _set_avatar_tests_notify_individual_avatar_cb (SetAvatarTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_avatar_tests_notify_individual_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _____lambda5_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res);
static void _set_avatar_tests_check_individual_has_avatar (SetAvatarTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean _set_avatar_tests_check_individual_has_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_);
static void ___lambda6_ (SetAvatarTests* self, GObject* obj, GAsyncResult* res);
static void ____lambda6__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ______lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ___lambda4__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_avatar_tests_check_individual_has_avatar_data_free (gpointer _data);
static gboolean _set_avatar_tests_check_individual_has_avatar_co (SetAvatarTestsCheckIndividualHasAvatarData* _data_);
static void _set_avatar_tests_check_individual_has_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void set_avatar_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _set_avatar_tests_test_set_avatar_folks_test_case_test_method (gpointer self) {
#line 37 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	set_avatar_tests_test_set_avatar ((SetAvatarTests*) self);
#line 216 "set-avatar.c"
}


static void _set_avatar_tests_test_set_individual_avatar_folks_test_case_test_method (gpointer self) {
#line 38 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	set_avatar_tests_test_set_individual_avatar ((SetAvatarTests*) self);
#line 223 "set-avatar.c"
}


SetAvatarTests* set_avatar_tests_construct (GType object_type) {
	SetAvatarTests * self = NULL;
#line 35 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self = (SetAvatarTests*) eds_test_test_case_construct (object_type, "SetAvatar");
#line 37 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "setting avatar on e-d-s persona", _set_avatar_tests_test_set_avatar_folks_test_case_test_method, self);
#line 38 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "setting avatar on e-d-s individual", _set_avatar_tests_test_set_individual_avatar_folks_test_case_test_method, self);
#line 33 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return self;
#line 237 "set-avatar.c"
}


SetAvatarTests* set_avatar_tests_new (void) {
#line 33 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return set_avatar_tests_construct (TYPE_SET_AVATAR_TESTS);
#line 244 "set-avatar.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 44 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 251 "set-avatar.c"
}


static void _vala_GValue_free (GValue* self) {
#line 44 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_value_unset (self);
#line 44 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_free (self);
#line 260 "set-avatar.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return self ? _g_value_dup (self) : NULL;
#line 267 "set-avatar.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 59 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return self ? g_object_ref (self) : NULL;
#line 274 "set-avatar.c"
}


static void set_avatar_tests_test_set_avatar (SetAvatarTests* self) {
	GeeHashMap* c1 = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GMainLoop* _tmp1_ = NULL;
	gchar* avatar_path = NULL;
	gchar* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	GFileIcon* _tmp5_ = NULL;
	GValue* v = NULL;
	EdsTestBackend* _tmp6_ = NULL;
	GValue _tmp7_ = {0};
	GValue _tmp8_ = {0};
	GValue* _tmp9_ = NULL;
	GValue* _tmp10_ = NULL;
	GValue* _tmp11_ = NULL;
	GValue* _tmp12_ = NULL;
	EdsTestBackend* _tmp13_ = NULL;
	GeeHashMap* _tmp14_ = NULL;
	GMainLoop* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
#line 42 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (self != NULL);
#line 44 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, _vala_GValue_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 44 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	c1 = _tmp0_;
#line 45 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = g_main_loop_new (NULL, FALSE);
#line 45 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 45 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_main_loop = _tmp1_;
#line 46 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = folks_test_utils_get_source_test_data ("data/avatar-01.jpg");
#line 46 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	avatar_path = _tmp2_;
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp3_ = g_file_new_for_path (avatar_path);
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp4_ = _tmp3_;
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp5_ = (GFileIcon*) g_file_icon_new (_tmp4_);
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_avatar);
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_avatar = (GLoadableIcon*) _tmp5_;
#line 48 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_tmp4_);
#line 51 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_found_before_update = FALSE;
#line 52 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_found_after_update = FALSE;
#line 54 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp6_ = ((EdsTestTestCase*) self)->eds_backend;
#line 54 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_reset (_tmp6_);
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_value_init (&_tmp7_, G_TYPE_STRING);
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp8_ = _tmp7_;
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp9_ = __g_value_dup0 (&_tmp8_);
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (v);
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	v = _tmp9_;
#line 56 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	G_IS_VALUE (&_tmp8_) ? (g_value_unset (&_tmp8_), NULL) : NULL;
#line 57 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp10_ = v;
#line 57 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_value_set_string (_tmp10_, "bernie h. innocenti");
#line 58 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp11_ = v;
#line 58 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	v = NULL;
#line 58 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp12_ = _tmp11_;
#line 58 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, "full_name", _tmp12_);
#line 58 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (_tmp12_);
#line 59 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp13_ = ((EdsTestTestCase*) self)->eds_backend;
#line 59 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp14_ = _g_object_ref0 (c1);
#line 59 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_add_contact (_tmp13_, _tmp14_);
#line 61 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_avatar_async (self, NULL, NULL);
#line 63 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp15_ = self->priv->_main_loop;
#line 63 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_utils_loop_run_with_timeout (_tmp15_, 5);
#line 65 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp16_ = self->priv->_found_before_update;
#line 65 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp16_, "this._found_before_update");
#line 66 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp17_ = self->priv->_found_after_update;
#line 66 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp17_, "this._found_after_update");
#line 68 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 68 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_aggregator = NULL;
#line 69 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 69 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_main_loop = NULL;
#line 42 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (v);
#line 42 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_free0 (avatar_path);
#line 42 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (c1);
#line 396 "set-avatar.c"
}


static void _set_avatar_tests_test_set_avatar_async_data_free (gpointer _data) {
	SetAvatarTestsTestSetAvatarAsyncData* _data_;
	_data_ = _data;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_slice_free (SetAvatarTestsTestSetAvatarAsyncData, _data_);
#line 407 "set-avatar.c"
}


static void _set_avatar_tests_test_set_avatar_async (SetAvatarTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetAvatarTestsTestSetAvatarAsyncData* _data_;
	SetAvatarTests* _tmp0_ = NULL;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_slice_new0 (SetAvatarTestsTestSetAvatarAsyncData);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_avatar_tests_test_set_avatar_async);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_avatar_tests_test_set_avatar_async_data_free);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->self = _tmp0_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_avatar_async_co (_data_);
#line 426 "set-avatar.c"
}


static void _set_avatar_tests_test_set_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_) {
	SetAvatarTestsTestSetAvatarAsyncData* _data_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 434 "set-avatar.c"
}


static void _set_avatar_tests_test_set_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetAvatarTestsTestSetAvatarAsyncData* _data_;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = _user_data_;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_source_object_ = source_object;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_res_ = _res_;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_avatar_async_co (_data_);
#line 448 "set-avatar.c"
}


static void __set_avatar_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 79 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_individuals_changed_cb ((SetAvatarTests*) self, changes);
#line 455 "set-avatar.c"
}


static gboolean _set_avatar_tests_test_set_avatar_async_co (SetAvatarTestsTestSetAvatarAsyncData* _data_) {
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	switch (_data_->_state_) {
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 0:
#line 464 "set-avatar.c"
		goto _state_0;
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 1:
#line 468 "set-avatar.c"
		goto _state_1;
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 2:
#line 472 "set-avatar.c"
		goto _state_2;
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 3:
#line 476 "set-avatar.c"
		goto _state_3;
		default:
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_assert_not_reached ();
#line 481 "set-avatar.c"
	}
	_state_0:
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = NULL;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = ((EdsTestTestCase*) _data_->self)->eds_backend;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_state_ = 1;
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _set_avatar_tests_test_set_avatar_async_ready, _data_);
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 494 "set-avatar.c"
	_state_1:
#line 74 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
#line 76 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = NULL;
#line 76 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = folks_backend_store_dup ();
#line 76 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->store = _data_->_tmp1_;
#line 77 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_state_ = 2;
#line 77 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_backend_store_prepare (_data_->store, _set_avatar_tests_test_set_avatar_async_ready, _data_);
#line 77 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 510 "set-avatar.c"
	_state_2:
#line 77 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 78 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = NULL;
#line 78 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = folks_individual_aggregator_dup ();
#line 78 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 78 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->self->priv->_aggregator = _data_->_tmp2_;
#line 79 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = NULL;
#line 79 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 79 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_signal_connect_object (_data_->_tmp3_, "individuals-changed-detailed", (GCallback) __set_avatar_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 528 "set-avatar.c"
	{
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp4_ = NULL;
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_state_ = 3;
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_individual_aggregator_prepare (_data_->_tmp4_, _set_avatar_tests_test_set_avatar_async_ready, _data_);
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return FALSE;
#line 540 "set-avatar.c"
		_state_3:
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 83 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		if (_data_->_inner_error_ != NULL) {
#line 546 "set-avatar.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->e = _data_->_inner_error_;
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_inner_error_ = NULL;
#line 87 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = NULL;
#line 87 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = _data_->e;
#line 87 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = NULL;
#line 87 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = _data_->_tmp5_->message;
#line 87 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_warning ("set-avatar.vala:87: Error when calling prepare: %s\n", _data_->_tmp6_);
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_error_free0 (_data_->e);
#line 569 "set-avatar.c"
	}
	__finally0:
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_inner_error_ != NULL) {
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_data_->store);
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.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 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_clear_error (&_data_->_inner_error_);
#line 81 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return FALSE;
#line 582 "set-avatar.c"
	}
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->store);
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_state_ == 0) {
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 590 "set-avatar.c"
	} else {
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 594 "set-avatar.c"
	}
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (_data_->_async_result);
#line 72 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 600 "set-avatar.c"
}


static void __set_avatar_tests_notify_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 105 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_notify_avatar_cb ((SetAvatarTests*) self, _sender, pspec);
#line 607 "set-avatar.c"
}


static void _set_avatar_tests_individuals_changed_cb (SetAvatarTests* self, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp27_ = NULL;
	gint _tmp28_ = 0;
	gint _tmp29_ = 0;
#line 91 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (self != NULL);
#line 91 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (changes != NULL);
#line 94 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = changes;
#line 94 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 94 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	added = _tmp1_;
#line 95 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = changes;
#line 95 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 95 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	removed = _tmp3_;
#line 637 "set-avatar.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp4_ = added;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_i_it = _tmp5_;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		while (TRUE) {
#line 650 "set-avatar.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			FolksIndividual* _tmp10_ = NULL;
			FolksNameDetails* name = NULL;
			FolksIndividual* _tmp11_ = NULL;
			FolksNameDetails* _tmp12_ = NULL;
			FolksNameDetails* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp6_ = _i_it;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (!_tmp7_) {
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				break;
#line 671 "set-avatar.c"
			}
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp8_ = _i_it;
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			i = (FolksIndividual*) _tmp9_;
#line 99 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp10_ = i;
#line 99 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_vala_assert (_tmp10_ != NULL, "i != null");
#line 101 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp11_ = i;
#line 101 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
#line 101 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			name = _tmp12_;
#line 103 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp13_ = name;
#line 103 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp14_ = folks_name_details_get_full_name (_tmp13_);
#line 103 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp15_ = _tmp14_;
#line 103 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (g_strcmp0 (_tmp15_, "bernie h. innocenti") == 0) {
#line 697 "set-avatar.c"
				FolksIndividual* _tmp16_ = NULL;
#line 105 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_tmp16_ = i;
#line 105 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				g_signal_connect_object ((GObject*) _tmp16_, "notify::avatar", (GCallback) __set_avatar_tests_notify_avatar_cb_g_object_notify, self, 0);
#line 106 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				self->priv->_found_before_update = TRUE;
#line 705 "set-avatar.c"
				{
					GeeIterator* _p_it = NULL;
					FolksIndividual* _tmp17_ = NULL;
					GeeSet* _tmp18_ = NULL;
					GeeSet* _tmp19_ = NULL;
					GeeIterator* _tmp20_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_tmp17_ = i;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_tmp18_ = folks_individual_get_personas (_tmp17_);
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_tmp19_ = _tmp18_;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_tmp20_ = gee_iterable_iterator ((GeeIterable*) _tmp19_);
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_p_it = _tmp20_;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					while (TRUE) {
#line 724 "set-avatar.c"
						GeeIterator* _tmp21_ = NULL;
						gboolean _tmp22_ = FALSE;
						FolksPersona* p = NULL;
						GeeIterator* _tmp23_ = NULL;
						gpointer _tmp24_ = NULL;
						FolksPersona* _tmp25_ = NULL;
						GLoadableIcon* _tmp26_ = NULL;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp21_ = _p_it;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp22_ = gee_iterator_next (_tmp21_);
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						if (!_tmp22_) {
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
							break;
#line 740 "set-avatar.c"
						}
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp23_ = _p_it;
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp24_ = gee_iterator_get (_tmp23_);
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						p = (FolksPersona*) _tmp24_;
#line 110 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp25_ = p;
#line 110 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_tmp26_ = self->priv->_avatar;
#line 110 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						folks_avatar_details_set_avatar (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, FOLKS_TYPE_AVATAR_DETAILS, FolksAvatarDetails), _tmp26_);
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_g_object_unref0 (p);
#line 756 "set-avatar.c"
					}
#line 108 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_g_object_unref0 (_p_it);
#line 760 "set-avatar.c"
				}
			}
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_g_object_unref0 (name);
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_g_object_unref0 (i);
#line 767 "set-avatar.c"
		}
#line 97 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_i_it);
#line 771 "set-avatar.c"
	}
#line 115 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp27_ = removed;
#line 115 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
#line 115 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp29_ = _tmp28_;
#line 115 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp29_ == 1, "removed.size == 1");
#line 781 "set-avatar.c"
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp30_ = NULL;
		GeeIterator* _tmp31_ = NULL;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp30_ = removed;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp31_ = gee_iterable_iterator ((GeeIterable*) _tmp30_);
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_i_it = _tmp31_;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		while (TRUE) {
#line 794 "set-avatar.c"
			GeeIterator* _tmp32_ = NULL;
			gboolean _tmp33_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp34_ = NULL;
			gpointer _tmp35_ = NULL;
			FolksIndividual* _tmp36_ = NULL;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp32_ = _i_it;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp33_ = gee_iterator_next (_tmp32_);
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (!_tmp33_) {
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				break;
#line 809 "set-avatar.c"
			}
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp34_ = _i_it;
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp35_ = gee_iterator_get (_tmp34_);
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			i = (FolksIndividual*) _tmp35_;
#line 119 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp36_ = i;
#line 119 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_vala_assert (_tmp36_ == NULL, "i == null");
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_g_object_unref0 (i);
#line 823 "set-avatar.c"
		}
#line 117 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_i_it);
#line 827 "set-avatar.c"
	}
#line 91 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (removed);
#line 91 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (added);
#line 833 "set-avatar.c"
}


static void ___lambda3_ (SetAvatarTests* self, GObject* obj, GAsyncResult* _result_) {
	GAsyncResult* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 131 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (_result_ != NULL);
#line 133 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = _result_;
#line 133 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = folks_test_utils_loadable_icons_content_equal_finish (_tmp0_);
#line 133 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_tmp1_) {
#line 848 "set-avatar.c"
		GMainLoop* _tmp2_ = NULL;
#line 135 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		self->priv->_found_after_update = TRUE;
#line 139 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp2_ = self->priv->_main_loop;
#line 139 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		if (_tmp2_ != NULL) {
#line 856 "set-avatar.c"
			GMainLoop* _tmp3_ = NULL;
#line 140 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp3_ = self->priv->_main_loop;
#line 140 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			g_main_loop_quit (_tmp3_);
#line 862 "set-avatar.c"
		}
	}
}


static void ____lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	___lambda3_ ((SetAvatarTests*) self, source_object, res);
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (self);
#line 873 "set-avatar.c"
}


static void _set_avatar_tests_notify_avatar_cb (SetAvatarTests* self, GObject* individual_obj, GParamSpec* ps) {
	FolksIndividual* i = NULL;
	GObject* _tmp0_ = NULL;
	FolksIndividual* _tmp1_ = NULL;
	FolksNameDetails* name = NULL;
	FolksIndividual* _tmp2_ = NULL;
	FolksNameDetails* _tmp3_ = NULL;
	FolksNameDetails* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
#line 123 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (self != NULL);
#line 123 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (individual_obj != NULL);
#line 123 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (ps != NULL);
#line 125 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = individual_obj;
#line 125 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
#line 125 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	i = _tmp1_;
#line 126 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = i;
#line 126 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
#line 126 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	name = _tmp3_;
#line 127 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp4_ = name;
#line 127 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp5_ = folks_name_details_get_full_name (_tmp4_);
#line 127 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp6_ = _tmp5_;
#line 127 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (g_strcmp0 (_tmp6_, "bernie h. innocenti") == 0) {
#line 913 "set-avatar.c"
		FolksIndividual* _tmp7_ = NULL;
		GLoadableIcon* _tmp8_ = NULL;
		GLoadableIcon* _tmp9_ = NULL;
		GLoadableIcon* _tmp10_ = NULL;
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp7_ = i;
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp8_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp7_);
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp9_ = _tmp8_;
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp10_ = self->priv->_avatar;
#line 129 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_test_utils_loadable_icons_content_equal (_tmp9_, _tmp10_, -1, ____lambda3__gasync_ready_callback, g_object_ref (self));
#line 928 "set-avatar.c"
	}
#line 123 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (name);
#line 123 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (i);
#line 934 "set-avatar.c"
}


static void set_avatar_tests_test_set_individual_avatar (SetAvatarTests* self) {
	GeeHashMap* c1 = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GMainLoop* _tmp1_ = NULL;
	gchar* avatar_path = NULL;
	gchar* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	GFileIcon* _tmp5_ = NULL;
	GValue* v = NULL;
	EdsTestBackend* _tmp6_ = NULL;
	GValue _tmp7_ = {0};
	GValue _tmp8_ = {0};
	GValue* _tmp9_ = NULL;
	GValue* _tmp10_ = NULL;
	GValue* _tmp11_ = NULL;
	GValue* _tmp12_ = NULL;
	EdsTestBackend* _tmp13_ = NULL;
	GeeHashMap* _tmp14_ = NULL;
	GMainLoop* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
#line 146 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (self != NULL);
#line 148 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, _vala_GValue_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 148 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	c1 = _tmp0_;
#line 149 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = g_main_loop_new (NULL, FALSE);
#line 149 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 149 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_main_loop = _tmp1_;
#line 150 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = folks_test_utils_get_source_test_data ("data/avatar-01.jpg");
#line 150 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	avatar_path = _tmp2_;
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp3_ = g_file_new_for_path (avatar_path);
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp4_ = _tmp3_;
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp5_ = (GFileIcon*) g_file_icon_new (_tmp4_);
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_avatar);
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_avatar = (GLoadableIcon*) _tmp5_;
#line 152 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_tmp4_);
#line 155 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_found_before_update = FALSE;
#line 156 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_found_after_update = FALSE;
#line 158 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp6_ = ((EdsTestTestCase*) self)->eds_backend;
#line 158 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_reset (_tmp6_);
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_value_init (&_tmp7_, G_TYPE_STRING);
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp8_ = _tmp7_;
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp9_ = __g_value_dup0 (&_tmp8_);
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (v);
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	v = _tmp9_;
#line 160 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	G_IS_VALUE (&_tmp8_) ? (g_value_unset (&_tmp8_), NULL) : NULL;
#line 161 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp10_ = v;
#line 161 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_value_set_string (_tmp10_, "John McClane");
#line 162 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp11_ = v;
#line 162 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	v = NULL;
#line 162 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp12_ = _tmp11_;
#line 162 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, "full_name", _tmp12_);
#line 162 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (_tmp12_);
#line 163 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp13_ = ((EdsTestTestCase*) self)->eds_backend;
#line 163 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp14_ = _g_object_ref0 (c1);
#line 163 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_add_contact (_tmp13_, _tmp14_);
#line 165 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_individual_avatar_async (self, NULL, NULL);
#line 167 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp15_ = self->priv->_main_loop;
#line 167 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_utils_loop_run_with_timeout (_tmp15_, 5);
#line 169 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp16_ = self->priv->_found_before_update;
#line 169 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp16_, "this._found_before_update");
#line 170 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp17_ = self->priv->_found_after_update;
#line 170 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp17_, "this._found_after_update");
#line 172 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 172 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_aggregator = NULL;
#line 173 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 173 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_main_loop = NULL;
#line 146 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__vala_GValue_free0 (v);
#line 146 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_free0 (avatar_path);
#line 146 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (c1);
#line 1056 "set-avatar.c"
}


static void _set_avatar_tests_test_set_individual_avatar_async_data_free (gpointer _data) {
	SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_;
	_data_ = _data;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_slice_free (SetAvatarTestsTestSetIndividualAvatarAsyncData, _data_);
#line 1067 "set-avatar.c"
}


static void _set_avatar_tests_test_set_individual_avatar_async (SetAvatarTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_;
	SetAvatarTests* _tmp0_ = NULL;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_slice_new0 (SetAvatarTestsTestSetIndividualAvatarAsyncData);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_avatar_tests_test_set_individual_avatar_async);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_avatar_tests_test_set_individual_avatar_async_data_free);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->self = _tmp0_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_individual_avatar_async_co (_data_);
#line 1086 "set-avatar.c"
}


static void _set_avatar_tests_test_set_individual_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_) {
	SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1094 "set-avatar.c"
}


static void _set_avatar_tests_test_set_individual_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = _user_data_;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_source_object_ = source_object;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_res_ = _res_;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_test_set_individual_avatar_async_co (_data_);
#line 1108 "set-avatar.c"
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_atomic_int_inc (&_data1_->_ref_count_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return _data1_;
#line 1117 "set-avatar.c"
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
#line 1126 "set-avatar.c"
		SetAvatarTests* self;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		self = _data1_->self;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_data1_->i);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (self);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_slice_free (Block1Data, _data1_);
#line 1136 "set-avatar.c"
	}
}


static void __set_avatar_tests_notify_individual_avatar_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 197 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_notify_individual_avatar_cb ((SetAvatarTests*) self, _sender, pspec);
#line 1144 "set-avatar.c"
}


static void ___lambda6_ (SetAvatarTests* self, GObject* obj, GAsyncResult* res) {
	GAsyncResult* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GMainLoop* _tmp2_ = NULL;
#line 212 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (res != NULL);
#line 214 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = res;
#line 214 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = _set_avatar_tests_check_individual_has_avatar_finish (self, _tmp0_);
#line 214 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp1_ == TRUE, "this._check_individual_has_avatar.end (res)                                       == true");
#line 221 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = self->priv->_main_loop;
#line 221 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_tmp2_ != NULL) {
#line 1164 "set-avatar.c"
		GMainLoop* _tmp3_ = NULL;
#line 222 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp3_ = self->priv->_main_loop;
#line 222 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_main_loop_quit (_tmp3_);
#line 1170 "set-avatar.c"
	}
}


static void ____lambda6__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 211 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	___lambda6_ ((SetAvatarTests*) self, source_object, res);
#line 211 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (self);
#line 1180 "set-avatar.c"
}


static void _____lambda5_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res) {
	SetAvatarTests* self;
	GError * _inner_error_ = NULL;
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self = _data1_->self;
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (res != NULL);
#line 1191 "set-avatar.c"
	{
		FolksIndividual* _tmp0_ = NULL;
		GAsyncResult* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		FolksIndividual* _tmp4_ = NULL;
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp0_ = _data1_->i;
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp1_ = res;
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_avatar_details_change_avatar_finish ((FolksAvatarDetails*) _tmp0_, _tmp1_, &_inner_error_);
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		if (_inner_error_ != NULL) {
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (_inner_error_->domain == FOLKS_PROPERTY_ERROR) {
#line 1208 "set-avatar.c"
				goto __catch1_folks_property_error;
			}
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			g_clear_error (&_inner_error_);
#line 206 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			return;
#line 1217 "set-avatar.c"
		}
#line 208 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp2_ = self->priv->_found_before_update;
#line 208 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_vala_assert (_tmp2_ == TRUE, "this._found_before_update == true");
#line 209 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp3_ = self->priv->_found_after_update;
#line 209 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_vala_assert (_tmp3_ == TRUE, "this._found_after_update == true");
#line 211 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp4_ = _data1_->i;
#line 211 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_set_avatar_tests_check_individual_has_avatar (self, _tmp4_, ____lambda6__gasync_ready_callback, g_object_ref (self));
#line 1231 "set-avatar.c"
	}
	goto __finally1;
	__catch1_folks_property_error:
	{
		GError* e = NULL;
		GError* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		e = _inner_error_;
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_inner_error_ = NULL;
#line 227 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp5_ = e;
#line 227 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp6_ = _tmp5_->message;
#line 227 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_critical ("set-avatar.vala:227: Unexpected error changing avatar: %s", _tmp6_);
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_error_free0 (e);
#line 1251 "set-avatar.c"
	}
	__finally1:
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_inner_error_ != NULL) {
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_clear_error (&_inner_error_);
#line 204 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return;
#line 1262 "set-avatar.c"
	}
}


static void ______lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_____lambda5_ (self, source_object, res);
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	block1_data_unref (self);
#line 1272 "set-avatar.c"
}


static void __lambda4_ (SetAvatarTests* self, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (changes != NULL);
#line 186 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = changes;
#line 186 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 186 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	added = _tmp1_;
#line 187 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = changes;
#line 187 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 187 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	removed = _tmp3_;
#line 1300 "set-avatar.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp4_ = added;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_i_it = _tmp5_;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		while (TRUE) {
#line 1313 "set-avatar.c"
			Block1Data* _data1_;
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			FolksIndividual* _tmp10_ = NULL;
			FolksNameDetails* name = NULL;
			FolksIndividual* _tmp11_ = NULL;
			FolksNameDetails* _tmp12_ = NULL;
			FolksNameDetails* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_data1_ = g_slice_new0 (Block1Data);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_data1_->_ref_count_ = 1;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_data1_->self = g_object_ref (self);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp6_ = _i_it;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (!_tmp7_) {
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				block1_data_unref (_data1_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data1_ = NULL;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				break;
#line 1344 "set-avatar.c"
			}
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp8_ = _i_it;
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_data1_->i = (FolksIndividual*) _tmp9_;
#line 191 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp10_ = _data1_->i;
#line 191 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_vala_assert (_tmp10_ != NULL, "i != null");
#line 193 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp11_ = _data1_->i;
#line 193 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
#line 193 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			name = _tmp12_;
#line 195 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp13_ = name;
#line 195 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp14_ = folks_name_details_get_full_name (_tmp13_);
#line 195 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp15_ = _tmp14_;
#line 195 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (g_strcmp0 (_tmp15_, "John McClane") == 0) {
#line 1370 "set-avatar.c"
				FolksIndividual* _tmp16_ = NULL;
				FolksIndividual* _tmp17_ = NULL;
				GLoadableIcon* _tmp18_ = NULL;
#line 197 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_tmp16_ = _data1_->i;
#line 197 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				g_signal_connect_object ((GObject*) _tmp16_, "notify::avatar", (GCallback) __set_avatar_tests_notify_individual_avatar_cb_g_object_notify, self, 0);
#line 199 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				self->priv->_found_before_update = TRUE;
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_tmp17_ = _data1_->i;
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_tmp18_ = self->priv->_avatar;
#line 202 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				folks_avatar_details_change_avatar ((FolksAvatarDetails*) _tmp17_, _tmp18_, ______lambda5__gasync_ready_callback, block1_data_ref (_data1_));
#line 1386 "set-avatar.c"
			}
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_g_object_unref0 (name);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			block1_data_unref (_data1_);
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_data1_ = NULL;
#line 1394 "set-avatar.c"
		}
#line 189 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_i_it);
#line 1398 "set-avatar.c"
	}
#line 234 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp19_ = removed;
#line 234 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
#line 234 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp21_ = _tmp20_;
#line 234 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_vala_assert (_tmp21_ == 1, "removed.size == 1");
#line 1408 "set-avatar.c"
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp22_ = NULL;
		GeeIterator* _tmp23_ = NULL;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp22_ = removed;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_tmp23_ = gee_iterable_iterator ((GeeIterable*) _tmp22_);
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_i_it = _tmp23_;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		while (TRUE) {
#line 1421 "set-avatar.c"
			GeeIterator* _tmp24_ = NULL;
			gboolean _tmp25_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp26_ = NULL;
			gpointer _tmp27_ = NULL;
			FolksIndividual* _tmp28_ = NULL;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp24_ = _i_it;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp25_ = gee_iterator_next (_tmp24_);
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			if (!_tmp25_) {
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				break;
#line 1436 "set-avatar.c"
			}
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp26_ = _i_it;
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp27_ = gee_iterator_get (_tmp26_);
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			i = (FolksIndividual*) _tmp27_;
#line 238 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_tmp28_ = i;
#line 238 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_vala_assert (_tmp28_ == NULL, "i == null");
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
			_g_object_unref0 (i);
#line 1450 "set-avatar.c"
		}
#line 236 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_i_it);
#line 1454 "set-avatar.c"
	}
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (removed);
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (added);
#line 1460 "set-avatar.c"
}


static void ___lambda4__folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	__lambda4_ ((SetAvatarTests*) self, changes);
#line 1467 "set-avatar.c"
}


static gboolean _set_avatar_tests_test_set_individual_avatar_async_co (SetAvatarTestsTestSetIndividualAvatarAsyncData* _data_) {
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	switch (_data_->_state_) {
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 0:
#line 1476 "set-avatar.c"
		goto _state_0;
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 1:
#line 1480 "set-avatar.c"
		goto _state_1;
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 2:
#line 1484 "set-avatar.c"
		goto _state_2;
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 3:
#line 1488 "set-avatar.c"
		goto _state_3;
		default:
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_assert_not_reached ();
#line 1493 "set-avatar.c"
	}
	_state_0:
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = NULL;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = ((EdsTestTestCase*) _data_->self)->eds_backend;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_state_ = 1;
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _set_avatar_tests_test_set_individual_avatar_async_ready, _data_);
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 1506 "set-avatar.c"
	_state_1:
#line 178 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
#line 180 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = NULL;
#line 180 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = folks_backend_store_dup ();
#line 180 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->store = _data_->_tmp1_;
#line 181 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_state_ = 2;
#line 181 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_backend_store_prepare (_data_->store, _set_avatar_tests_test_set_individual_avatar_async_ready, _data_);
#line 181 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 1522 "set-avatar.c"
	_state_2:
#line 181 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 183 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = NULL;
#line 183 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = folks_individual_aggregator_dup ();
#line 183 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 183 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->self->priv->_aggregator = _data_->_tmp2_;
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = NULL;
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 184 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_signal_connect_object (_data_->_tmp3_, "individuals-changed-detailed", (GCallback) ___lambda4__folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 1540 "set-avatar.c"
	{
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp4_ = NULL;
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_state_ = 3;
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_individual_aggregator_prepare (_data_->_tmp4_, _set_avatar_tests_test_set_individual_avatar_async_ready, _data_);
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return FALSE;
#line 1552 "set-avatar.c"
		_state_3:
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 244 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		if (_data_->_inner_error_ != NULL) {
#line 1558 "set-avatar.c"
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->e = _data_->_inner_error_;
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_inner_error_ = NULL;
#line 248 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = NULL;
#line 248 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = _data_->e;
#line 248 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = NULL;
#line 248 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = _data_->_tmp5_->message;
#line 248 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_warning ("set-avatar.vala:248: Error when calling prepare: %s\n", _data_->_tmp6_);
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_error_free0 (_data_->e);
#line 1581 "set-avatar.c"
	}
	__finally2:
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_inner_error_ != NULL) {
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_g_object_unref0 (_data_->store);
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.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 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_clear_error (&_data_->_inner_error_);
#line 242 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return FALSE;
#line 1594 "set-avatar.c"
	}
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->store);
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_state_ == 0) {
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1602 "set-avatar.c"
	} else {
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1606 "set-avatar.c"
	}
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (_data_->_async_result);
#line 176 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 1612 "set-avatar.c"
}


static void _set_avatar_tests_notify_individual_avatar_cb (SetAvatarTests* self, GObject* individual_obj, GParamSpec* ps) {
#line 252 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (self != NULL);
#line 252 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (individual_obj != NULL);
#line 252 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_return_if_fail (ps != NULL);
#line 259 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv->_found_after_update = TRUE;
#line 1625 "set-avatar.c"
}


static void _set_avatar_tests_check_individual_has_avatar_data_free (gpointer _data) {
	SetAvatarTestsCheckIndividualHasAvatarData* _data_;
	_data_ = _data;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->i);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_slice_free (SetAvatarTestsCheckIndividualHasAvatarData, _data_);
#line 1638 "set-avatar.c"
}


static void _set_avatar_tests_check_individual_has_avatar (SetAvatarTests* self, FolksIndividual* i, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetAvatarTestsCheckIndividualHasAvatarData* _data_;
	SetAvatarTests* _tmp0_ = NULL;
	FolksIndividual* _tmp1_ = NULL;
	FolksIndividual* _tmp2_ = NULL;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_slice_new0 (SetAvatarTestsCheckIndividualHasAvatarData);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_avatar_tests_check_individual_has_avatar);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_avatar_tests_check_individual_has_avatar_data_free);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->self = _tmp0_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp1_ = i;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->i);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->i = _tmp2_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_check_individual_has_avatar_co (_data_);
#line 1667 "set-avatar.c"
}


static gboolean _set_avatar_tests_check_individual_has_avatar_finish (SetAvatarTests* self, GAsyncResult* _res_) {
	gboolean result;
	SetAvatarTestsCheckIndividualHasAvatarData* _data_;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	result = _data_->result;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return result;
#line 1680 "set-avatar.c"
}


static void _set_avatar_tests_check_individual_has_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetAvatarTestsCheckIndividualHasAvatarData* _data_;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_ = _user_data_;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_source_object_ = source_object;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_res_ = _res_;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_set_avatar_tests_check_individual_has_avatar_co (_data_);
#line 1694 "set-avatar.c"
}


static gboolean _set_avatar_tests_check_individual_has_avatar_co (SetAvatarTestsCheckIndividualHasAvatarData* _data_) {
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	switch (_data_->_state_) {
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 0:
#line 1703 "set-avatar.c"
		goto _state_0;
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 1:
#line 1707 "set-avatar.c"
		goto _state_1;
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		case 2:
#line 1711 "set-avatar.c"
		goto _state_2;
		default:
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_assert_not_reached ();
#line 1716 "set-avatar.c"
	}
	_state_0:
#line 264 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = NULL;
#line 264 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp0_ = _data_->i;
#line 264 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = NULL;
#line 264 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, FOLKS_TYPE_NAME_DETAILS, FolksNameDetails));
#line 264 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->name = _data_->_tmp1_;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = NULL;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp2_ = _data_->name;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = NULL;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp3_ = folks_name_details_get_full_name (_data_->_tmp2_);
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp4_ = NULL;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 266 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (g_strcmp0 (_data_->_tmp4_, "John McClane") == 0) {
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = NULL;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp5_ = _data_->i;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = NULL;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp6_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _data_->_tmp5_);
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp7_ = NULL;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp7_ = _data_->_tmp6_;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp8_ = NULL;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp8_ = _data_->self->priv->_avatar;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_state_ = 1;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		folks_test_utils_loadable_icons_content_equal (_data_->_tmp7_, _data_->_tmp8_, -1, _set_avatar_tests_check_individual_has_avatar_ready, _data_);
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		return FALSE;
#line 1765 "set-avatar.c"
		_state_1:
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp9_ = FALSE;
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp9_ = folks_test_utils_loadable_icons_content_equal_finish (_data_->_res_);
#line 268 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->individual_equal = _data_->_tmp9_;
#line 271 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp10_ = FALSE;
#line 271 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		_data_->_tmp10_ = _data_->individual_equal;
#line 271 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		if (_data_->_tmp10_ == TRUE) {
#line 1779 "set-avatar.c"
			{
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp11_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp11_ = _data_->i;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp12_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp12_ = folks_individual_get_personas (_data_->_tmp11_);
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp13_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp13_ = _data_->_tmp12_;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp14_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_tmp14_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp13_);
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_data_->_p_it = _data_->_tmp14_;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				while (TRUE) {
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp15_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp15_ = _data_->_p_it;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp16_ = FALSE;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp16_ = gee_iterator_next (_data_->_tmp15_);
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					if (!_data_->_tmp16_) {
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						break;
#line 1813 "set-avatar.c"
					}
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp17_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp17_ = _data_->_p_it;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp18_ = NULL;
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp18_ = gee_iterator_get (_data_->_tmp17_);
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->p = (FolksPersona*) _data_->_tmp18_;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp19_ = NULL;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp19_ = _data_->p;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp20_ = NULL;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp20_ = folks_avatar_details_get_avatar (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp19_, FOLKS_TYPE_AVATAR_DETAILS) ? ((FolksAvatarDetails*) _data_->_tmp19_) : NULL);
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp21_ = NULL;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp21_ = _data_->_tmp20_;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp22_ = NULL;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp22_ = _data_->self->priv->_avatar;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_state_ = 2;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					folks_test_utils_loadable_icons_content_equal (_data_->_tmp21_, _data_->_tmp22_, -1, _set_avatar_tests_check_individual_has_avatar_ready, _data_);
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					return FALSE;
#line 1847 "set-avatar.c"
					_state_2:
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp23_ = FALSE;
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp23_ = folks_test_utils_loadable_icons_content_equal_finish (_data_->_res_);
#line 275 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->persona_equal = _data_->_tmp23_;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp25_ = NULL;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp25_ = _data_->p;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp26_ = NULL;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp26_ = folks_persona_get_store (_data_->_tmp25_);
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp27_ = NULL;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp27_ = _data_->_tmp26_;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp28_ = NULL;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp28_ = folks_persona_store_get_type_id (_data_->_tmp27_);
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp29_ = NULL;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_data_->_tmp29_ = _data_->_tmp28_;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					if (g_strcmp0 (_data_->_tmp29_, "eds") == 0) {
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_data_->_tmp30_ = FALSE;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_data_->_tmp30_ = _data_->persona_equal;
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_data_->_tmp24_ = _data_->_tmp30_ == TRUE;
#line 1883 "set-avatar.c"
					} else {
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_data_->_tmp24_ = FALSE;
#line 1887 "set-avatar.c"
					}
#line 279 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					if (_data_->_tmp24_) {
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_data_->result = TRUE;
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_g_object_unref0 (_data_->p);
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_g_object_unref0 (_data_->_p_it);
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						_g_object_unref0 (_data_->name);
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						if (_data_->_state_ == 0) {
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
							g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1903 "set-avatar.c"
						} else {
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
							g_simple_async_result_complete (_data_->_async_result);
#line 1907 "set-avatar.c"
						}
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						g_object_unref (_data_->_async_result);
#line 281 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
						return FALSE;
#line 1913 "set-avatar.c"
					}
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
					_g_object_unref0 (_data_->p);
#line 1917 "set-avatar.c"
				}
#line 273 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
				_g_object_unref0 (_data_->_p_it);
#line 1921 "set-avatar.c"
			}
		}
	}
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_data_->result = FALSE;
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->name);
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_state_ == 0) {
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1933 "set-avatar.c"
	} else {
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1937 "set-avatar.c"
	}
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (_data_->_async_result);
#line 287 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (_data_->name);
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	if (_data_->_state_ == 0) {
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1949 "set-avatar.c"
	} else {
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1953 "set-avatar.c"
	}
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_object_unref (_data_->_async_result);
#line 262 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return FALSE;
#line 1959 "set-avatar.c"
}


static void set_avatar_tests_class_init (SetAvatarTestsClass * klass) {
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	set_avatar_tests_parent_class = g_type_class_peek_parent (klass);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_type_class_add_private (klass, sizeof (SetAvatarTestsPrivate));
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	G_OBJECT_CLASS (klass)->finalize = set_avatar_tests_finalize;
#line 1970 "set-avatar.c"
}


static void set_avatar_tests_instance_init (SetAvatarTests * self) {
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self->priv = SET_AVATAR_TESTS_GET_PRIVATE (self);
#line 1977 "set-avatar.c"
}


static void set_avatar_tests_finalize (GObject* obj) {
	SetAvatarTests * self;
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_AVATAR_TESTS, SetAvatarTests);
#line 27 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 28 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 31 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (self->priv->_avatar);
#line 25 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	G_OBJECT_CLASS (set_avatar_tests_parent_class)->finalize (obj);
#line 1993 "set-avatar.c"
}


GType set_avatar_tests_get_type (void) {
	static volatile gsize set_avatar_tests_type_id__volatile = 0;
	if (g_once_init_enter (&set_avatar_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetAvatarTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_avatar_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetAvatarTests), 0, (GInstanceInitFunc) set_avatar_tests_instance_init, NULL };
		GType set_avatar_tests_type_id;
		set_avatar_tests_type_id = g_type_register_static (EDS_TEST_TYPE_TEST_CASE, "SetAvatarTests", &g_define_type_info, 0);
		g_once_init_leave (&set_avatar_tests_type_id__volatile, set_avatar_tests_type_id);
	}
	return set_avatar_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	SetAvatarTests* tests = NULL;
	SetAvatarTests* _tmp0_ = NULL;
#line 293 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_test_init (&args_length1, &args, NULL);
#line 295 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_tmp0_ = set_avatar_tests_new ();
#line 295 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	tests = _tmp0_;
#line 296 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 297 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	g_test_run ();
#line 298 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 300 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	result = 0;
#line 300 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	_g_object_unref0 (tests);
#line 300 "/opt/gnome3/source/folks/tests/eds/set-avatar.vala"
	return result;
#line 2031 "set-avatar.c"
}


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



