/* avatar-details.c generated by valac 0.15.1.20-908e, the Vala compiler
 * generated from avatar-details.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 */

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


#define TYPE_AVATAR_DETAILS_TESTS (avatar_details_tests_get_type ())
#define AVATAR_DETAILS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AVATAR_DETAILS_TESTS, AvatarDetailsTests))
#define AVATAR_DETAILS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AVATAR_DETAILS_TESTS, AvatarDetailsTestsClass))
#define IS_AVATAR_DETAILS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AVATAR_DETAILS_TESTS))
#define IS_AVATAR_DETAILS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AVATAR_DETAILS_TESTS))
#define AVATAR_DETAILS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AVATAR_DETAILS_TESTS, AvatarDetailsTestsClass))

typedef struct _AvatarDetailsTests AvatarDetailsTests;
typedef struct _AvatarDetailsTestsClass AvatarDetailsTestsClass;
typedef struct _AvatarDetailsTestsPrivate AvatarDetailsTestsPrivate;
#define _eds_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (eds_test_backend_unref (var), NULL)))
#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 __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AvatarDetailsTestsTestAvatarAsyncData AvatarDetailsTestsTestAvatarAsyncData;
typedef struct _AvatarDetailsTestsCheckAvatarData AvatarDetailsTestsCheckAvatarData;

struct _AvatarDetailsTests {
	FolksTestCase parent_instance;
	AvatarDetailsTestsPrivate * priv;
};

struct _AvatarDetailsTestsClass {
	FolksTestCaseClass parent_class;
};

struct _AvatarDetailsTestsPrivate {
	EdsTestBackend* _eds_backend;
	GMainLoop* _main_loop;
	FolksIndividualAggregator* _aggregator;
	GeeHashMap* _c1;
	gboolean _avatars_are_equal;
	gchar* _avatar_path;
};

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

struct _AvatarDetailsTestsCheckAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AvatarDetailsTests* self;
	GLoadableIcon* avatar;
	GLoadableIcon* _tmp0_;
	const gchar* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GFileIcon* _tmp4_;
	GFileIcon* _tmp5_;
	GFileIcon* b;
	GLoadableIcon* _tmp6_;
	GFileIcon* _tmp7_;
	gboolean _tmp8_;
	GMainLoop* _tmp9_;
};


static gpointer avatar_details_tests_parent_class = NULL;

GType avatar_details_tests_get_type (void) G_GNUC_CONST;
#define AVATAR_DETAILS_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_AVATAR_DETAILS_TESTS, AvatarDetailsTestsPrivate))
enum  {
	AVATAR_DETAILS_TESTS_DUMMY_PROPERTY
};
AvatarDetailsTests* avatar_details_tests_new (void);
AvatarDetailsTests* avatar_details_tests_construct (GType object_type);
void avatar_details_tests_test_avatar (AvatarDetailsTests* self);
static void _avatar_details_tests_test_avatar_folks_test_case_test_method (gpointer self);
static void avatar_details_tests_real_set_up (FolksTestCase* base);
static void avatar_details_tests_real_tear_down (FolksTestCase* base);
static GValue* _g_value_dup (GValue* self);
static void _vala_GValue_free (GValue* self);
static void _avatar_details_tests_test_avatar_async (AvatarDetailsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _avatar_details_tests_test_avatar_finish (AvatarDetailsTests* self, GAsyncResult* _res_);
static gboolean __lambda2_ (AvatarDetailsTests* self);
static gboolean ___lambda2__gsource_func (gpointer self);
static void _avatar_details_tests_test_avatar_async_data_free (gpointer _data);
static gboolean _avatar_details_tests_test_avatar_async_co (AvatarDetailsTestsTestAvatarAsyncData* _data_);
static void _avatar_details_tests_test_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _avatar_details_tests_individuals_changed_cb (AvatarDetailsTests* self, GeeMultiMap* changes);
static void __avatar_details_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _avatar_details_tests_notify_cb (AvatarDetailsTests* self, GObject* individual_obj, GParamSpec* ps);
static void __avatar_details_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _avatar_details_tests_check_avatar (AvatarDetailsTests* self, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _avatar_details_tests_check_avatar_finish (AvatarDetailsTests* self, GAsyncResult* _res_);
static void _avatar_details_tests_check_avatar_data_free (gpointer _data);
static gboolean _avatar_details_tests_check_avatar_co (AvatarDetailsTestsCheckAvatarData* _data_);
static void _avatar_details_tests_check_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void avatar_details_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _avatar_details_tests_test_avatar_folks_test_case_test_method (gpointer self) {
#line 38 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	avatar_details_tests_test_avatar (self);
#line 150 "avatar-details.c"
}


AvatarDetailsTests* avatar_details_tests_construct (GType object_type) {
	AvatarDetailsTests * self = NULL;
#line 36 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self = (AvatarDetailsTests*) folks_test_case_construct (object_type, "AvatarDetails");
#line 38 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "avatar details interface", _avatar_details_tests_test_avatar_folks_test_case_test_method, self);
#line 34 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return self;
#line 162 "avatar-details.c"
}


AvatarDetailsTests* avatar_details_tests_new (void) {
#line 34 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return avatar_details_tests_construct (TYPE_AVATAR_DETAILS_TESTS);
#line 169 "avatar-details.c"
}


static void avatar_details_tests_real_set_up (FolksTestCase* base) {
	AvatarDetailsTests * self;
	EdsTestBackend* _tmp0_;
	EdsTestBackend* _tmp1_;
	EdsTestBackend* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* config_val;
#line 41 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self = (AvatarDetailsTests*) base;
#line 43 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = eds_test_backend_new ();
#line 43 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 43 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv->_eds_backend = _tmp0_;
#line 44 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = self->priv->_eds_backend;
#line 44 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_set_up (_tmp1_, FALSE);
#line 47 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = self->priv->_eds_backend;
#line 47 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp3_ = eds_test_backend_get_address_book_uid (_tmp2_);
#line 47 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp4_ = _tmp3_;
#line 47 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp5_ = g_strdup_printf ("eds:%s", _tmp4_);
#line 47 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	config_val = _tmp5_;
#line 48 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_setenv ("FOLKS_PRIMARY_STORE", config_val, TRUE);
#line 41 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_free0 (config_val);
#line 208 "avatar-details.c"
}


static void avatar_details_tests_real_tear_down (FolksTestCase* base) {
	AvatarDetailsTests * self;
	EdsTestBackend* _tmp0_;
#line 51 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self = (AvatarDetailsTests*) base;
#line 53 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = self->priv->_eds_backend;
#line 53 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_tear_down (_tmp0_);
#line 221 "avatar-details.c"
}


static GValue* _g_value_dup (GValue* self) {
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return g_boxed_copy (G_TYPE_VALUE, self);
#line 228 "avatar-details.c"
}


static void _vala_GValue_free (GValue* self) {
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_value_unset (self);
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_free (self);
#line 237 "avatar-details.c"
}


static gpointer __g_value_dup0 (gpointer self) {
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return self ? _g_value_dup (self) : NULL;
#line 244 "avatar-details.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 72 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return self ? g_object_ref (self) : NULL;
#line 251 "avatar-details.c"
}


static gboolean __lambda2_ (AvatarDetailsTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
#line 78 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = self->priv->_main_loop;
#line 78 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_main_loop_quit (_tmp0_);
#line 79 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	result = FALSE;
#line 79 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return result;
#line 266 "avatar-details.c"
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ (self);
#line 76 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return result;
#line 275 "avatar-details.c"
}


void avatar_details_tests_test_avatar (AvatarDetailsTests* self) {
	GeeHashMap* _tmp0_;
	GMainLoop* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_;
	GValue* v = NULL;
	EdsTestBackend* _tmp4_;
	GValue _tmp5_ = {0};
	GValue _tmp6_;
	GValue* _tmp7_;
	GValue* _tmp8_;
	GeeHashMap* _tmp9_;
	GValue* _tmp10_;
	GValue* _tmp11_;
	GValue _tmp12_ = {0};
	GValue _tmp13_;
	GValue* _tmp14_;
	GValue* _tmp15_;
	const gchar* _tmp16_;
	GeeHashMap* _tmp17_;
	GValue* _tmp18_;
	GValue* _tmp19_;
	EdsTestBackend* _tmp20_;
	GeeHashMap* _tmp21_;
	GeeHashMap* _tmp22_;
	GMainLoop* _tmp23_;
	gboolean _tmp24_;
#line 56 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (self != NULL);
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.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);
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (self->priv->_c1);
#line 58 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv->_c1 = _tmp0_;
#line 59 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = g_main_loop_new (NULL, FALSE);
#line 59 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 59 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv->_main_loop = _tmp1_;
#line 60 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = g_getenv ("AVATAR_FILE_PATH");
#line 60 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 60 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_free0 (self->priv->_avatar_path);
#line 60 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv->_avatar_path = _tmp3_;
#line 61 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv->_avatars_are_equal = FALSE;
#line 64 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp4_ = self->priv->_eds_backend;
#line 64 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_reset (_tmp4_);
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_value_init (&_tmp5_, G_TYPE_STRING);
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp6_ = _tmp5_;
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp7_ = __g_value_dup0 (&_tmp6_);
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	__vala_GValue_free0 (v);
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	v = _tmp7_;
#line 66 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	G_IS_VALUE (&_tmp6_) ? (g_value_unset (&_tmp6_), NULL) : NULL;
#line 67 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp8_ = v;
#line 67 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_value_set_string (_tmp8_, "bernie h. innocenti");
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp9_ = self->priv->_c1;
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp10_ = v;
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	v = NULL;
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp11_ = _tmp10_;
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, "full_name", _tmp11_);
#line 68 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	__vala_GValue_free0 (_tmp11_);
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_value_init (&_tmp12_, G_TYPE_STRING);
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp13_ = _tmp12_;
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp14_ = __g_value_dup0 (&_tmp13_);
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	__vala_GValue_free0 (v);
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	v = _tmp14_;
#line 69 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	G_IS_VALUE (&_tmp13_) ? (g_value_unset (&_tmp13_), NULL) : NULL;
#line 70 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp15_ = v;
#line 70 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp16_ = self->priv->_avatar_path;
#line 70 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_value_set_string (_tmp15_, _tmp16_);
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp17_ = self->priv->_c1;
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp18_ = v;
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	v = NULL;
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp19_ = _tmp18_;
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, "avatar", _tmp19_);
#line 71 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	__vala_GValue_free0 (_tmp19_);
#line 72 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp20_ = self->priv->_eds_backend;
#line 72 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp21_ = self->priv->_c1;
#line 72 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp22_ = _g_object_ref0 (_tmp21_);
#line 72 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_add_contact (_tmp20_, _tmp22_);
#line 74 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_test_avatar_async (self, NULL, NULL);
#line 76 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
#line 82 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp23_ = self->priv->_main_loop;
#line 82 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_main_loop_run (_tmp23_);
#line 84 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp24_ = self->priv->_avatars_are_equal;
#line 84 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_assert (_tmp24_);
#line 56 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	__vala_GValue_free0 (v);
#line 414 "avatar-details.c"
}


static void _avatar_details_tests_test_avatar_async_data_free (gpointer _data) {
	AvatarDetailsTestsTestAvatarAsyncData* _data_;
	_data_ = _data;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_slice_free (AvatarDetailsTestsTestAvatarAsyncData, _data_);
#line 425 "avatar-details.c"
}


static void _avatar_details_tests_test_avatar_async (AvatarDetailsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AvatarDetailsTestsTestAvatarAsyncData* _data_;
	AvatarDetailsTests* _tmp0_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = g_slice_new0 (AvatarDetailsTestsTestAvatarAsyncData);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _avatar_details_tests_test_avatar_async);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _avatar_details_tests_test_avatar_async_data_free);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->self = _tmp0_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_test_avatar_async_co (_data_);
#line 444 "avatar-details.c"
}


static void _avatar_details_tests_test_avatar_finish (AvatarDetailsTests* self, GAsyncResult* _res_) {
	AvatarDetailsTestsTestAvatarAsyncData* _data_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 452 "avatar-details.c"
}


static void _avatar_details_tests_test_avatar_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AvatarDetailsTestsTestAvatarAsyncData* _data_;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = _user_data_;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_source_object_ = source_object;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_res_ = _res_;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_test_avatar_async_co (_data_);
#line 466 "avatar-details.c"
}


static void __avatar_details_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 95 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_individuals_changed_cb (self, changes);
#line 473 "avatar-details.c"
}


static gboolean _avatar_details_tests_test_avatar_async_co (AvatarDetailsTestsTestAvatarAsyncData* _data_) {
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	switch (_data_->_state_) {
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 0:
#line 482 "avatar-details.c"
		goto _state_0;
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 1:
#line 486 "avatar-details.c"
		goto _state_1;
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 2:
#line 490 "avatar-details.c"
		goto _state_2;
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 3:
#line 494 "avatar-details.c"
		goto _state_3;
		default:
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_assert_not_reached ();
#line 499 "avatar-details.c"
	}
	_state_0:
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp0_ = _data_->self->priv->_eds_backend;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_state_ = 1;
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _avatar_details_tests_test_avatar_async_ready, _data_);
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return FALSE;
#line 510 "avatar-details.c"
	_state_1:
#line 90 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
#line 92 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp1_ = NULL;
#line 92 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp1_ = folks_backend_store_dup ();
#line 92 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->store = _data_->_tmp1_;
#line 93 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_state_ = 2;
#line 93 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	folks_backend_store_prepare (_data_->store, _avatar_details_tests_test_avatar_async_ready, _data_);
#line 93 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return FALSE;
#line 526 "avatar-details.c"
	_state_2:
#line 93 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 94 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp2_ = folks_individual_aggregator_new ();
#line 94 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 94 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->self->priv->_aggregator = _data_->_tmp2_;
#line 95 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 95 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_signal_connect_object (_data_->_tmp3_, "individuals-changed-detailed", (GCallback) __avatar_details_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 540 "avatar-details.c"
	{
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_state_ = 3;
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		folks_individual_aggregator_prepare (_data_->_tmp4_, _avatar_details_tests_test_avatar_async_ready, _data_);
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		return FALSE;
#line 550 "avatar-details.c"
		_state_3:
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
#line 99 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		if (_data_->_inner_error_ != NULL) {
#line 556 "avatar-details.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->e = _data_->_inner_error_;
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_inner_error_ = NULL;
#line 103 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp5_ = _data_->e;
#line 103 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp6_ = _data_->_tmp5_->message;
#line 103 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_warning ("avatar-details.vala:103: Error when calling prepare: %s\n", _data_->_tmp6_);
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_error_free0 (_data_->e);
#line 575 "avatar-details.c"
	}
	__finally0:
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	if (_data_->_inner_error_ != NULL) {
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_object_unref0 (_data_->store);
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.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 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_clear_error (&_data_->_inner_error_);
#line 97 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		return FALSE;
#line 588 "avatar-details.c"
	}
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_data_->store);
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	if (_data_->_state_ == 0) {
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 596 "avatar-details.c"
	} else {
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 600 "avatar-details.c"
	}
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_object_unref (_data_->_async_result);
#line 87 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return FALSE;
#line 606 "avatar-details.c"
}


static void __avatar_details_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 128 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_notify_cb (self, _sender, pspec);
#line 613 "avatar-details.c"
}


static void _avatar_details_tests_individuals_changed_cb (AvatarDetailsTests* self, GeeMultiMap* changes) {
	GeeMultiMap* _tmp0_;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* added;
	GeeMultiMap* _tmp2_;
	GeeSet* _tmp3_ = NULL;
	GeeSet* removed;
	GeeSet* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
#line 107 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (self != NULL);
#line 107 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (changes != NULL);
#line 110 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = changes;
#line 110 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 110 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	added = _tmp1_;
#line 111 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = changes;
#line 111 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 111 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	removed = _tmp3_;
#line 113 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp4_ = removed;
#line 113 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
#line 113 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp6_ = _tmp5_;
#line 113 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_assert (_tmp6_ == 1);
#line 651 "avatar-details.c"
	{
		GeeSet* _tmp7_;
		GeeIterator* _tmp8_ = NULL;
		GeeIterator* _i_it;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_tmp7_ = removed;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_i_it = _tmp8_;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		while (TRUE) {
#line 664 "avatar-details.c"
			GeeIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			GeeIterator* _tmp11_;
			gpointer _tmp12_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp13_;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp9_ = _i_it;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp10_ = gee_iterator_next (_tmp9_);
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			if (!_tmp10_) {
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				break;
#line 679 "avatar-details.c"
			}
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp11_ = _i_it;
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp12_ = gee_iterator_get (_tmp11_);
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			i = (FolksIndividual*) _tmp12_;
#line 117 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp13_ = i;
#line 117 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			g_assert (_tmp13_ == NULL);
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_g_object_unref0 (i);
#line 693 "avatar-details.c"
		}
#line 115 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_object_unref0 (_i_it);
#line 697 "avatar-details.c"
	}
	{
		GeeCollection* _tmp14_;
		GeeIterator* _tmp15_ = NULL;
		GeeIterator* _i_it;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_tmp14_ = added;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_i_it = _tmp15_;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		while (TRUE) {
#line 711 "avatar-details.c"
			GeeIterator* _tmp16_;
			gboolean _tmp17_ = FALSE;
			GeeIterator* _tmp18_;
			gpointer _tmp19_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp20_;
			FolksIndividual* _tmp21_;
			GeeSet* _tmp22_;
			GeeSet* _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			FolksIndividual* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp16_ = _i_it;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp17_ = gee_iterator_next (_tmp16_);
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			if (!_tmp17_) {
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				break;
#line 734 "avatar-details.c"
			}
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp18_ = _i_it;
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp19_ = gee_iterator_get (_tmp18_);
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			i = (FolksIndividual*) _tmp19_;
#line 122 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp20_ = i;
#line 122 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			g_assert (_tmp20_ != NULL);
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp21_ = i;
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp22_ = folks_individual_get_personas (_tmp21_);
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp23_ = _tmp22_;
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp24_ = gee_collection_get_size ((GeeCollection*) _tmp23_);
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp25_ = _tmp24_;
#line 124 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			g_assert (_tmp25_ == 1);
#line 126 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp26_ = i;
#line 126 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp27_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp26_);
#line 126 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_tmp28_ = _tmp27_;
#line 126 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			if (g_strcmp0 (_tmp28_, "bernie h. innocenti") == 0) {
#line 766 "avatar-details.c"
				FolksIndividual* _tmp29_;
				FolksIndividual* _tmp30_;
				GLoadableIcon* _tmp31_;
				GLoadableIcon* _tmp32_;
#line 128 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				_tmp29_ = i;
#line 128 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				g_signal_connect_object ((GObject*) _tmp29_, "notify::avatar", (GCallback) __avatar_details_tests_notify_cb_g_object_notify, self, 0);
#line 129 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				_tmp30_ = i;
#line 129 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				_tmp31_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp30_);
#line 129 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				_tmp32_ = _tmp31_;
#line 129 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
				_avatar_details_tests_check_avatar (self, _tmp32_, NULL, NULL);
#line 783 "avatar-details.c"
			}
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
			_g_object_unref0 (i);
#line 787 "avatar-details.c"
		}
#line 120 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_object_unref0 (_i_it);
#line 791 "avatar-details.c"
	}
#line 107 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (removed);
#line 107 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (added);
#line 797 "avatar-details.c"
}


static void _avatar_details_tests_notify_cb (AvatarDetailsTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
	GLoadableIcon* _tmp2_;
	GLoadableIcon* _tmp3_;
#line 134 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (self != NULL);
#line 134 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (individual_obj != NULL);
#line 134 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_return_if_fail (ps != NULL);
#line 136 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = individual_obj;
#line 136 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
#line 136 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	i = _tmp1_;
#line 137 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) i);
#line 137 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp3_ = _tmp2_;
#line 137 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_check_avatar (self, _tmp3_, NULL, NULL);
#line 134 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (i);
#line 827 "avatar-details.c"
}


static void _avatar_details_tests_check_avatar_data_free (gpointer _data) {
	AvatarDetailsTestsCheckAvatarData* _data_;
	_data_ = _data;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_data_->avatar);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_data_->self);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_slice_free (AvatarDetailsTestsCheckAvatarData, _data_);
#line 840 "avatar-details.c"
}


static void _avatar_details_tests_check_avatar (AvatarDetailsTests* self, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AvatarDetailsTestsCheckAvatarData* _data_;
	AvatarDetailsTests* _tmp0_;
	GLoadableIcon* _tmp1_;
	GLoadableIcon* _tmp2_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = g_slice_new0 (AvatarDetailsTestsCheckAvatarData);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _avatar_details_tests_check_avatar);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _avatar_details_tests_check_avatar_data_free);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->self = _tmp0_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = avatar;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->avatar = _tmp2_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_check_avatar_co (_data_);
#line 867 "avatar-details.c"
}


static void _avatar_details_tests_check_avatar_finish (AvatarDetailsTests* self, GAsyncResult* _res_) {
	AvatarDetailsTestsCheckAvatarData* _data_;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 875 "avatar-details.c"
}


static void _avatar_details_tests_check_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AvatarDetailsTestsCheckAvatarData* _data_;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_ = _user_data_;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_source_object_ = source_object;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_res_ = _res_;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_avatar_details_tests_check_avatar_co (_data_);
#line 889 "avatar-details.c"
}


static gboolean _avatar_details_tests_check_avatar_co (AvatarDetailsTestsCheckAvatarData* _data_) {
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	switch (_data_->_state_) {
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 0:
#line 898 "avatar-details.c"
		goto _state_0;
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		case 1:
#line 902 "avatar-details.c"
		goto _state_1;
		default:
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_assert_not_reached ();
#line 907 "avatar-details.c"
	}
	_state_0:
#line 142 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_data_->_tmp0_ = _data_->avatar;
#line 142 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	if (_data_->_tmp0_ != NULL) {
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp1_ = _data_->self->priv->_avatar_path;
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp2_ = NULL;
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp2_ = g_file_new_for_path (_data_->_tmp1_);
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp3_ = _data_->_tmp2_;
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp4_ = (GFileIcon*) g_file_icon_new (_data_->_tmp3_);
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp5_ = _data_->_tmp4_;
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_object_unref0 (_data_->_tmp3_);
#line 144 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->b = _data_->_tmp5_;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp6_ = _data_->avatar;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp7_ = _data_->b;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_state_ = 1;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		folks_test_utils_loadable_icons_content_equal (_data_->_tmp6_, (GLoadableIcon*) _data_->_tmp7_, -1, _avatar_details_tests_check_avatar_ready, _data_);
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		return FALSE;
#line 940 "avatar-details.c"
		_state_1:
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp8_ = FALSE;
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp8_ = folks_test_utils_loadable_icons_content_equal_finish (_data_->_res_);
#line 146 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->self->priv->_avatars_are_equal = _data_->_tmp8_;
#line 149 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_data_->_tmp9_ = _data_->self->priv->_main_loop;
#line 149 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_main_loop_quit (_data_->_tmp9_);
#line 142 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		_g_object_unref0 (_data_->b);
#line 954 "avatar-details.c"
	}
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	if (_data_->_state_ == 0) {
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 960 "avatar-details.c"
	} else {
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 964 "avatar-details.c"
	}
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_object_unref (_data_->_async_result);
#line 140 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return FALSE;
#line 970 "avatar-details.c"
}


static void avatar_details_tests_class_init (AvatarDetailsTestsClass * klass) {
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	avatar_details_tests_parent_class = g_type_class_peek_parent (klass);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_type_class_add_private (klass, sizeof (AvatarDetailsTestsPrivate));
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = avatar_details_tests_real_set_up;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = avatar_details_tests_real_tear_down;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	G_OBJECT_CLASS (klass)->finalize = avatar_details_tests_finalize;
#line 985 "avatar-details.c"
}


static void avatar_details_tests_instance_init (AvatarDetailsTests * self) {
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self->priv = AVATAR_DETAILS_TESTS_GET_PRIVATE (self);
#line 992 "avatar-details.c"
}


static void avatar_details_tests_finalize (GObject* obj) {
	AvatarDetailsTests * self;
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	self = AVATAR_DETAILS_TESTS (obj);
#line 27 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_eds_test_backend_unref0 (self->priv->_eds_backend);
#line 28 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 30 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (self->priv->_c1);
#line 32 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_free0 (self->priv->_avatar_path);
#line 25 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	G_OBJECT_CLASS (avatar_details_tests_parent_class)->finalize (obj);
#line 1012 "avatar-details.c"
}


GType avatar_details_tests_get_type (void) {
	static volatile gsize avatar_details_tests_type_id__volatile = 0;
	if (g_once_init_enter (&avatar_details_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AvatarDetailsTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) avatar_details_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AvatarDetailsTests), 0, (GInstanceInitFunc) avatar_details_tests_instance_init, NULL };
		GType avatar_details_tests_type_id;
		avatar_details_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "AvatarDetailsTests", &g_define_type_info, 0);
		g_once_init_leave (&avatar_details_tests_type_id__volatile, avatar_details_tests_type_id);
	}
	return avatar_details_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	AvatarDetailsTests* _tmp1_;
	AvatarDetailsTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 156 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_test_init (&args_length1, &args, NULL);
#line 158 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp0_ = g_test_get_root ();
#line 158 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	root = _tmp0_;
#line 159 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp1_ = avatar_details_tests_new ();
#line 159 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp2_ = _tmp1_;
#line 159 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 159 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 159 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	_g_object_unref0 (_tmp2_);
#line 161 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_test_run ();
#line 163 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	result = 0;
#line 163 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return result;
#line 1057 "avatar-details.c"
}


int main (int argc, char ** argv) {
#line 154 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	g_type_init ();
#line 154 "/opt/gnome2/source/folks/tests/eds/avatar-details.vala"
	return _vala_main (argv, argc);
#line 1066 "avatar-details.c"
}



