/* individual-retrieval.c generated by valac 0.12.0, the Vala compiler
 * generated from individual-retrieval.vala, do not modify */


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


#define TYPE_INDIVIDUAL_RETRIEVAL_TESTS (individual_retrieval_tests_get_type ())
#define INDIVIDUAL_RETRIEVAL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTests))
#define INDIVIDUAL_RETRIEVAL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTestsClass))
#define IS_INDIVIDUAL_RETRIEVAL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS))
#define IS_INDIVIDUAL_RETRIEVAL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INDIVIDUAL_RETRIEVAL_TESTS))
#define INDIVIDUAL_RETRIEVAL_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTestsClass))

typedef struct _IndividualRetrievalTests IndividualRetrievalTests;
typedef struct _IndividualRetrievalTestsClass IndividualRetrievalTestsClass;
typedef struct _IndividualRetrievalTestsPrivate IndividualRetrievalTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block1Data Block1Data;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block2Data Block2Data;
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
typedef struct _Block6Data Block6Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
typedef struct _IndividualRetrievalTestsAddPersonasData IndividualRetrievalTestsAddPersonasData;

struct _IndividualRetrievalTests {
	FolksTestCase parent_instance;
	IndividualRetrievalTestsPrivate * priv;
};

struct _IndividualRetrievalTestsClass {
	FolksTestCaseClass parent_class;
};

struct _IndividualRetrievalTestsPrivate {
	TpTestBackend* tp_backend;
	void* _account_handle;
	GeeHashSet* default_individuals;
	gchar* individual_id_prefix;
	gint _test_timeout;
};

struct _Block1Data {
	int _ref_count_;
	IndividualRetrievalTests * self;
	GMainLoop* main_loop;
	GeeHashSet* expected_individuals;
	FolksIndividualAggregator* aggregator;
};

struct _Block2Data {
	int _ref_count_;
	IndividualRetrievalTests * self;
	GMainLoop* main_loop;
	GeeHashSet* added_individuals;
	FolksIndividualAggregator* aggregator;
};

struct _Block3Data {
	int _ref_count_;
	Block2Data * _data2_;
	gboolean adding_done;
};

struct _Block4Data {
	int _ref_count_;
	IndividualRetrievalTests * self;
	TpfPersonaStore* store;
	gpointer _async_data_;
};

struct _Block5Data {
	int _ref_count_;
	Block4Data * _data4_;
	GeeHashSet* ids_remaining;
};

struct _Block6Data {
	int _ref_count_;
	Block5Data * _data5_;
	GHashTable* details;
};

struct _IndividualRetrievalTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	IndividualRetrievalTests* self;
	TpfPersonaStore* store;
	GeeHashSet* ids_add;
	Block4Data* _data4_;
	Block5Data* _data5_;
	GeeHashSet* _tmp0_;
	GeeIterator* _tmp1_;
	GeeIterator* _contact_id_it;
	gboolean _tmp2_;
	gpointer _tmp3_;
	gchar* contact_id;
	GError * e2;
	const gchar* _tmp4_;
	GError * _inner_error_;
};


static gpointer individual_retrieval_tests_parent_class = NULL;

GType individual_retrieval_tests_get_type (void) G_GNUC_CONST;
#define INDIVIDUAL_RETRIEVAL_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_INDIVIDUAL_RETRIEVAL_TESTS, IndividualRetrievalTestsPrivate))
enum  {
	INDIVIDUAL_RETRIEVAL_TESTS_DUMMY_PROPERTY
};
IndividualRetrievalTests* individual_retrieval_tests_new (void);
IndividualRetrievalTests* individual_retrieval_tests_construct (GType object_type);
void individual_retrieval_tests_test_aggregator (IndividualRetrievalTests* self);
static void _individual_retrieval_tests_test_aggregator_folks_test_case_test_method (gpointer self);
void individual_retrieval_tests_test_aggregator_add (IndividualRetrievalTests* self);
static void _individual_retrieval_tests_test_aggregator_add_folks_test_case_test_method (gpointer self);
static void individual_retrieval_tests_real_set_up (FolksTestCase* base);
static void individual_retrieval_tests_real_tear_down (FolksTestCase* base);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static void _lambda0_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_);
static void __lambda0__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static gboolean _lambda1_ (Block1Data* _data1_);
static gboolean __lambda1__gsource_func (gpointer self);
static gboolean _lambda2_ (Block1Data* _data1_);
static void _lambda3_ (GObject* s, GAsyncResult* r, Block1Data* _data1_);
static void __lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean __lambda2__gsource_func (gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static void _lambda4_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block2Data* _data2_);
static void __lambda4__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static gboolean _lambda5_ (Block2Data* _data2_);
static gboolean __lambda5__gsource_func (gpointer self);
static gboolean _lambda6_ (Block2Data* _data2_);
static void _lambda7_ (GObject* s, GAsyncResult* r, Block2Data* _data2_);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (Block3Data* _data3_);
static void _lambda8_ (FolksPersonaStore* store, Block3Data* _data3_);
static void individual_retrieval_tests_add_personas (IndividualRetrievalTests* self, TpfPersonaStore* store, GeeHashSet* ids_add, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void individual_retrieval_tests_add_personas_finish (IndividualRetrievalTests* self, GAsyncResult* _res_);
static void __lambda8__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self);
static void __lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean __lambda6__gsource_func (gpointer self);
static void individual_retrieval_tests_add_personas_data_free (gpointer _data);
static gboolean individual_retrieval_tests_add_personas_co (IndividualRetrievalTestsAddPersonasData* data);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (Block4Data* _data4_);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (Block5Data* _data5_);
static void individual_retrieval_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gboolean _lambda9_ (Block5Data* _data5_);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (Block6Data* _data6_);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static void _lambda10_ (GObject* s2, GAsyncResult* res, Block6Data* _data6_);
static GValue* _g_value_dup (GValue* self);
static void __lambda10__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean __lambda9__gsource_func (gpointer self);
static void individual_retrieval_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _individual_retrieval_tests_test_aggregator_folks_test_case_test_method (gpointer self) {
	individual_retrieval_tests_test_aggregator (self);
}


static void _individual_retrieval_tests_test_aggregator_add_folks_test_case_test_method (gpointer self) {
	individual_retrieval_tests_test_aggregator_add (self);
}


IndividualRetrievalTests* individual_retrieval_tests_construct (GType object_type) {
	IndividualRetrievalTests * self = NULL;
	TpTestBackend* _tmp0_ = NULL;
	GeeHashSet* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* prefix;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_ = NULL;
	self = (IndividualRetrievalTests*) folks_test_case_construct (object_type, "IndividualRetrieval");
	_tmp0_ = tp_test_backend_new ();
	_g_object_unref0 (self->priv->tp_backend);
	self->priv->tp_backend = _tmp0_;
	_tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal);
	_g_object_unref0 (self->priv->default_individuals);
	self->priv->default_individuals = _tmp1_;
	_tmp2_ = g_strdup (self->priv->individual_id_prefix);
	prefix = _tmp2_;
	_tmp3_ = g_strconcat (prefix, "travis@example.com", NULL);
	_tmp4_ = _tmp3_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = g_strconcat (prefix, "olivier@example.com", NULL);
	_tmp6_ = _tmp5_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp6_);
	_g_free0 (_tmp6_);
	_tmp7_ = g_strconcat (prefix, "guillaume@example.com", NULL);
	_tmp8_ = _tmp7_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp8_);
	_g_free0 (_tmp8_);
	_tmp9_ = g_strconcat (prefix, "sjoerd@example.com", NULL);
	_tmp10_ = _tmp9_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp10_);
	_g_free0 (_tmp10_);
	_tmp11_ = g_strconcat (prefix, "christian@example.com", NULL);
	_tmp12_ = _tmp11_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp12_);
	_g_free0 (_tmp12_);
	_tmp13_ = g_strconcat (prefix, "wim@example.com", NULL);
	_tmp14_ = _tmp13_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp14_);
	_g_free0 (_tmp14_);
	_tmp15_ = g_strconcat (prefix, "helen@example.com", NULL);
	_tmp16_ = _tmp15_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp16_);
	_g_free0 (_tmp16_);
	_tmp17_ = g_strconcat (prefix, "geraldine@example.com", NULL);
	_tmp18_ = _tmp17_;
	gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->default_individuals, _tmp18_);
	_g_free0 (_tmp18_);
	folks_test_case_add_test ((FolksTestCase*) self, "aggregator", _individual_retrieval_tests_test_aggregator_folks_test_case_test_method, self);
	folks_test_case_add_test ((FolksTestCase*) self, "aggregator:add", _individual_retrieval_tests_test_aggregator_add_folks_test_case_test_method, self);
	_tmp19_ = g_getenv ("FOLKS_TEST_VALGRIND");
	if (_tmp19_ != NULL) {
		self->priv->_test_timeout = 10;
	}
	_g_free0 (prefix);
	return self;
}


IndividualRetrievalTests* individual_retrieval_tests_new (void) {
	return individual_retrieval_tests_construct (TYPE_INDIVIDUAL_RETRIEVAL_TESTS);
}


static void individual_retrieval_tests_real_set_up (FolksTestCase* base) {
	IndividualRetrievalTests * self;
	void* _tmp0_ = NULL;
	self = (IndividualRetrievalTests*) base;
	tp_test_backend_set_up (self->priv->tp_backend);
	_tmp0_ = tp_test_backend_add_account (self->priv->tp_backend, "protocol", "me@example.com", "cm", "account");
	self->priv->_account_handle = _tmp0_;
}


static void individual_retrieval_tests_real_tear_down (FolksTestCase* base) {
	IndividualRetrievalTests * self;
	self = (IndividualRetrievalTests*) base;
	tp_test_backend_remove_account (self->priv->tp_backend, self->priv->_account_handle);
	tp_test_backend_tear_down (self->priv->tp_backend);
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (Block1Data* _data1_) {
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->self);
		_g_object_unref0 (_data1_->aggregator);
		_g_object_unref0 (_data1_->expected_individuals);
		_g_main_loop_unref0 (_data1_->main_loop);
		g_slice_free (Block1Data, _data1_);
	}
}


static void _lambda0_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block1Data* _data1_) {
	IndividualRetrievalTests * self;
	gint _tmp4_;
	self = _data1_->self;
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	{
		GeeIterator* _tmp0_ = NULL;
		GeeIterator* _i_it;
		_tmp0_ = gee_iterable_iterator ((GeeIterable*) added);
		_i_it = _tmp0_;
		while (TRUE) {
			gboolean _tmp1_;
			gpointer _tmp2_ = NULL;
			FolksIndividual* i;
			const gchar* _tmp3_ = NULL;
			_tmp1_ = gee_iterator_next (_i_it);
			if (!_tmp1_) {
				break;
			}
			_tmp2_ = gee_iterator_get (_i_it);
			i = (FolksIndividual*) _tmp2_;
			_tmp3_ = folks_individual_get_id (i);
			gee_abstract_collection_remove ((GeeAbstractCollection*) _data1_->expected_individuals, _tmp3_);
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp4_ = gee_collection_get_size ((GeeCollection*) removed);
	g_assert (_tmp4_ == 0);
}


static void __lambda0__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_lambda0_ (added, removed, message, actor, reason, self);
}


static gboolean _lambda1_ (Block1Data* _data1_) {
	IndividualRetrievalTests * self;
	gboolean result = FALSE;
	self = _data1_->self;
	g_main_loop_quit (_data1_->main_loop);
	result = FALSE;
	return result;
}


static gboolean __lambda1__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda1_ (self);
	return result;
}


static void _lambda3_ (GObject* s, GAsyncResult* r, Block1Data* _data1_) {
	IndividualRetrievalTests * self;
	GError * _inner_error_ = NULL;
	self = _data1_->self;
	g_return_if_fail (r != NULL);
	folks_individual_aggregator_prepare_finish (_data1_->aggregator, r, &_inner_error_);
	if (_inner_error_ != NULL) {
		goto __catch0_g_error;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError * e1;
		e1 = _inner_error_;
		_inner_error_ = NULL;
		g_critical ("individual-retrieval.vala:94: failed to prepare aggregator: %s", e1->message);
		g_assert_not_reached ();
		_g_error_free0 (e1);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void __lambda3__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_lambda3_ (source_object, res, self);
	block1_data_unref (self);
}


static gboolean _lambda2_ (Block1Data* _data1_) {
	IndividualRetrievalTests * self;
	gboolean result = FALSE;
	self = _data1_->self;
	folks_individual_aggregator_prepare (_data1_->aggregator, __lambda3__gasync_ready_callback, block1_data_ref (_data1_));
	result = FALSE;
	return result;
}


static gboolean __lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda2_ (self);
	return result;
}


void individual_retrieval_tests_test_aggregator (IndividualRetrievalTests* self) {
	Block1Data* _data1_;
	GMainLoop* _tmp0_ = NULL;
	GeeHashSet* _tmp1_ = NULL;
	FolksIndividualAggregator* _tmp5_ = NULL;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_data1_->main_loop = _tmp0_;
	_tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	_data1_->expected_individuals = _tmp1_;
	{
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _id_it;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->default_individuals);
		_id_it = _tmp2_;
		while (TRUE) {
			gboolean _tmp3_;
			gpointer _tmp4_ = NULL;
			gchar* id;
			_tmp3_ = gee_iterator_next (_id_it);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = gee_iterator_get (_id_it);
			id = (gchar*) _tmp4_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _data1_->expected_individuals, id);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	_tmp5_ = folks_individual_aggregator_new ();
	_data1_->aggregator = _tmp5_;
	g_signal_connect_data (_data1_->aggregator, "individuals-changed", (GCallback) __lambda0__folks_individual_aggregator_individuals_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) self->priv->_test_timeout, __lambda1__gsource_func, block1_data_ref (_data1_), block1_data_unref);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda2__gsource_func, block1_data_ref (_data1_), block1_data_unref);
	g_main_loop_run (_data1_->main_loop);
	_tmp6_ = gee_collection_get_size ((GeeCollection*) _data1_->expected_individuals);
	g_assert (_tmp6_ == 0);
	_g_object_unref0 (_data1_->aggregator);
	_data1_->aggregator = NULL;
	block1_data_unref (_data1_);
	_data1_ = NULL;
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (Block2Data* _data2_) {
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		_g_object_unref0 (_data2_->self);
		_g_object_unref0 (_data2_->aggregator);
		_g_object_unref0 (_data2_->added_individuals);
		_g_main_loop_unref0 (_data2_->main_loop);
		g_slice_free (Block2Data, _data2_);
	}
}


static void _lambda4_ (GeeSet* added, GeeSet* removed, const gchar* m, FolksPersona* a, FolksGroupDetailsChangeReason r, Block2Data* _data2_) {
	IndividualRetrievalTests * self;
	gint _tmp9_;
	self = _data2_->self;
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	{
		GeeIterator* _tmp0_ = NULL;
		GeeIterator* _i_it;
		_tmp0_ = gee_iterable_iterator ((GeeIterable*) added);
		_i_it = _tmp0_;
		while (TRUE) {
			gboolean _tmp1_;
			gpointer _tmp2_ = NULL;
			FolksIndividual* i;
			_tmp1_ = gee_iterator_next (_i_it);
			if (!_tmp1_) {
				break;
			}
			_tmp2_ = gee_iterator_get (_i_it);
			i = (FolksIndividual*) _tmp2_;
			{
				GeeSet* _tmp3_ = NULL;
				GeeIterator* _tmp4_ = NULL;
				GeeIterator* _p_it;
				_tmp3_ = folks_individual_get_personas (i);
				_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
				_p_it = _tmp4_;
				while (TRUE) {
					gboolean _tmp5_;
					gpointer _tmp6_ = NULL;
					FolksPersona* p;
					_tmp5_ = gee_iterator_next (_p_it);
					if (!_tmp5_) {
						break;
					}
					_tmp6_ = gee_iterator_get (_p_it);
					p = (FolksPersona*) _tmp6_;
					if (TPF_IS_PERSONA (p)) {
						const gchar* _tmp7_ = NULL;
						gboolean _tmp8_;
						_tmp7_ = folks_persona_get_display_id ((FolksPersona*) TPF_PERSONA (p));
						_tmp8_ = gee_abstract_collection_remove ((GeeAbstractCollection*) _data2_->added_individuals, _tmp7_);
						if (_tmp8_) {
							_g_object_unref0 (p);
							break;
						}
					}
					_g_object_unref0 (p);
				}
				_g_object_unref0 (_p_it);
			}
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp9_ = gee_collection_get_size ((GeeCollection*) removed);
	g_assert (_tmp9_ == 0);
}


static void __lambda4__folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_lambda4_ (added, removed, message, actor, reason, self);
}


static gboolean _lambda5_ (Block2Data* _data2_) {
	IndividualRetrievalTests * self;
	gboolean result = FALSE;
	self = _data2_->self;
	g_main_loop_quit (_data2_->main_loop);
	result = FALSE;
	return result;
}


static gboolean __lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda5_ (self);
	return result;
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (Block3Data* _data3_) {
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		block2_data_unref (_data3_->_data2_);
		_data3_->_data2_ = NULL;
		g_slice_free (Block3Data, _data3_);
	}
}


static void _lambda8_ (FolksPersonaStore* store, Block3Data* _data3_) {
	Block2Data* _data2_;
	IndividualRetrievalTests * self;
	gboolean _tmp0_ = FALSE;
	_data2_ = _data3_->_data2_;
	self = _data2_->self;
	g_return_if_fail (store != NULL);
	if (TPF_IS_PERSONA_STORE (store)) {
		_tmp0_ = !_data3_->adding_done;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		individual_retrieval_tests_add_personas (self, TPF_PERSONA_STORE (store), _data2_->added_individuals, NULL, NULL);
		_data3_->adding_done = TRUE;
	}
}


static void __lambda8__folks_backend_persona_store_added (FolksBackend* _sender, FolksPersonaStore* store, gpointer self) {
	_lambda8_ (store, self);
}


static void _lambda7_ (GObject* s, GAsyncResult* r, Block2Data* _data2_) {
	IndividualRetrievalTests * self;
	Block3Data* _data3_;
	FolksBackendStore* _tmp0_ = NULL;
	FolksBackendStore* backend_store;
	GError * _inner_error_ = NULL;
	self = _data2_->self;
	g_return_if_fail (r != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->_data2_ = block2_data_ref (_data2_);
	folks_individual_aggregator_prepare_finish (_data2_->aggregator, r, &_inner_error_);
	if (_inner_error_ != NULL) {
		goto __catch1_g_error;
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError * e1;
		e1 = _inner_error_;
		_inner_error_ = NULL;
		g_critical ("individual-retrieval.vala:164: failed to prepare aggregator: %s", e1->message);
		g_assert_not_reached ();
		_g_error_free0 (e1);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		block3_data_unref (_data3_);
		_data3_ = NULL;
		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);
		g_clear_error (&_inner_error_);
		return;
	}
	_data3_->adding_done = FALSE;
	_tmp0_ = folks_backend_store_dup ();
	backend_store = _tmp0_;
	{
		GeeMap* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_;
		GeeIterator* _backend_it;
		_tmp1_ = folks_backend_store_get_enabled_backends (backend_store);
		_tmp2_ = gee_map_get_values (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_backend_it = _tmp5_;
		while (TRUE) {
			gboolean _tmp6_;
			gpointer _tmp7_ = NULL;
			FolksBackend* backend;
			_tmp6_ = gee_iterator_next (_backend_it);
			if (!_tmp6_) {
				break;
			}
			_tmp7_ = gee_iterator_get (_backend_it);
			backend = (FolksBackend*) _tmp7_;
			g_signal_connect_data (backend, "persona-store-added", (GCallback) __lambda8__folks_backend_persona_store_added, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
			{
				GeeMap* _tmp8_ = NULL;
				GeeCollection* _tmp9_ = NULL;
				GeeCollection* _tmp10_;
				GeeIterator* _tmp11_ = NULL;
				GeeIterator* _tmp12_;
				GeeIterator* _store_it;
				_tmp8_ = folks_backend_get_persona_stores (backend);
				_tmp9_ = gee_map_get_values (_tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
				_tmp12_ = _tmp11_;
				_g_object_unref0 (_tmp10_);
				_store_it = _tmp12_;
				while (TRUE) {
					gboolean _tmp13_;
					gpointer _tmp14_ = NULL;
					FolksPersonaStore* store;
					gboolean _tmp15_ = FALSE;
					_tmp13_ = gee_iterator_next (_store_it);
					if (!_tmp13_) {
						break;
					}
					_tmp14_ = gee_iterator_get (_store_it);
					store = (FolksPersonaStore*) _tmp14_;
					if (TPF_IS_PERSONA_STORE (store)) {
						_tmp15_ = !_data3_->adding_done;
					} else {
						_tmp15_ = FALSE;
					}
					if (_tmp15_) {
						individual_retrieval_tests_add_personas (self, TPF_PERSONA_STORE (store), _data2_->added_individuals, NULL, NULL);
						_data3_->adding_done = TRUE;
					}
					_g_object_unref0 (store);
				}
				_g_object_unref0 (_store_it);
			}
			_g_object_unref0 (backend);
		}
		_g_object_unref0 (_backend_it);
	}
	_g_object_unref0 (backend_store);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


static void __lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_lambda7_ (source_object, res, self);
	block2_data_unref (self);
}


static gboolean _lambda6_ (Block2Data* _data2_) {
	IndividualRetrievalTests * self;
	gboolean result = FALSE;
	self = _data2_->self;
	folks_individual_aggregator_prepare (_data2_->aggregator, __lambda7__gasync_ready_callback, block2_data_ref (_data2_));
	result = FALSE;
	return result;
}


static gboolean __lambda6__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda6_ (self);
	return result;
}


void individual_retrieval_tests_test_aggregator_add (IndividualRetrievalTests* self) {
	Block2Data* _data2_;
	GMainLoop* _tmp0_ = NULL;
	GeeHashSet* _tmp1_ = NULL;
	FolksIndividualAggregator* _tmp2_ = NULL;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_data2_->main_loop = _tmp0_;
	_tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
	_data2_->added_individuals = _tmp1_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data2_->added_individuals, "master.shake@example.com");
	gee_abstract_collection_add ((GeeAbstractCollection*) _data2_->added_individuals, "2wycked@example.com");
	gee_abstract_collection_add ((GeeAbstractCollection*) _data2_->added_individuals, "carl-brutananadilewski@example.com");
	_tmp2_ = folks_individual_aggregator_new ();
	_data2_->aggregator = _tmp2_;
	g_signal_connect_data (_data2_->aggregator, "individuals-changed", (GCallback) __lambda4__folks_individual_aggregator_individuals_changed, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) self->priv->_test_timeout, __lambda5__gsource_func, block2_data_ref (_data2_), block2_data_unref);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda6__gsource_func, block2_data_ref (_data2_), block2_data_unref);
	g_main_loop_run (_data2_->main_loop);
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _data2_->added_individuals);
	g_assert (_tmp3_ == 0);
	_g_object_unref0 (_data2_->aggregator);
	_data2_->aggregator = NULL;
	block2_data_unref (_data2_);
	_data2_ = NULL;
}


static void individual_retrieval_tests_add_personas_data_free (gpointer _data) {
	IndividualRetrievalTestsAddPersonasData* data;
	data = _data;
	_g_object_unref0 (data->store);
	_g_object_unref0 (data->ids_add);
	_g_object_unref0 (data->self);
	g_slice_free (IndividualRetrievalTestsAddPersonasData, data);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void individual_retrieval_tests_add_personas (IndividualRetrievalTests* self, TpfPersonaStore* store, GeeHashSet* ids_add, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	IndividualRetrievalTestsAddPersonasData* _data_;
	_data_ = g_slice_new0 (IndividualRetrievalTestsAddPersonasData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, individual_retrieval_tests_add_personas);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, individual_retrieval_tests_add_personas_data_free);
	_data_->self = _g_object_ref0 (self);
	_data_->store = _g_object_ref0 (store);
	_data_->ids_add = _g_object_ref0 (ids_add);
	individual_retrieval_tests_add_personas_co (_data_);
}


static void individual_retrieval_tests_add_personas_finish (IndividualRetrievalTests* self, GAsyncResult* _res_) {
	IndividualRetrievalTestsAddPersonasData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}


static void block4_data_unref (Block4Data* _data4_) {
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		_g_object_unref0 (_data4_->self);
		_g_object_unref0 (_data4_->store);
		g_slice_free (Block4Data, _data4_);
	}
}


static Block5Data* block5_data_ref (Block5Data* _data5_) {
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}


static void block5_data_unref (Block5Data* _data5_) {
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		block4_data_unref (_data5_->_data4_);
		_data5_->_data4_ = NULL;
		_g_object_unref0 (_data5_->ids_remaining);
		g_slice_free (Block5Data, _data5_);
	}
}


static void individual_retrieval_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	IndividualRetrievalTestsAddPersonasData* data;
	data = _user_data_;
	data->_source_object_ = source_object;
	data->_res_ = _res_;
	individual_retrieval_tests_add_personas_co (data);
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}


static void block6_data_unref (Block6Data* _data6_) {
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		block5_data_unref (_data6_->_data5_);
		_data6_->_data5_ = NULL;
		_g_hash_table_unref0 (_data6_->details);
		g_slice_free (Block6Data, _data6_);
	}
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _vala_GValue_free (GValue* self) {
	g_value_unset (self);
	g_free (self);
}


static void __vala_GValue_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
}


static GValue* _g_value_dup (GValue* self) {
	return g_boxed_copy (G_TYPE_VALUE, self);
}


static gpointer __g_value_dup0 (gpointer self) {
	return self ? _g_value_dup (self) : NULL;
}


static void _lambda10_ (GObject* s2, GAsyncResult* res, Block6Data* _data6_) {
	Block5Data* _data5_;
	Block4Data* _data4_;
	IndividualRetrievalTests * self;
	FolksPersona* _tmp0_ = NULL;
	FolksPersona* _tmp1_;
	gconstpointer _tmp2_ = NULL;
	GValue* _tmp3_;
	GValue* id_added_value;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* id_added;
	GError * _inner_error_ = NULL;
	_data5_ = _data6_->_data5_;
	_data4_ = _data5_->_data4_;
	self = _data4_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = folks_persona_store_add_persona_from_details_finish ((FolksPersonaStore*) _data4_->store, res, &_inner_error_);
	_tmp1_ = _tmp0_;
	_g_object_unref0 (_tmp1_);
	if (_inner_error_ != NULL) {
		goto __catch3_g_error;
	}
	_tmp2_ = g_hash_table_lookup (_data6_->details, "contact");
	_tmp3_ = __g_value_dup0 ((GValue*) _tmp2_);
	id_added_value = _tmp3_;
	_tmp4_ = g_value_get_string (id_added_value);
	_tmp5_ = g_strdup (_tmp4_);
	id_added = _tmp5_;
	if (id_added != NULL) {
		gee_abstract_collection_remove ((GeeAbstractCollection*) _data5_->ids_remaining, id_added);
	}
	_g_free0 (id_added);
	__vala_GValue_free0 (id_added_value);
	goto __finally3;
	__catch3_g_error:
	{
		GError * e1;
		e1 = _inner_error_;
		_inner_error_ = NULL;
		if (!g_error_matches (e1, FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_STORE_OFFLINE)) {
			g_critical ("individual-retrieval.vala:260: failed to add persona: %s", e1->message);
			g_assert_not_reached ();
		}
		_g_error_free0 (e1);
	}
	__finally3:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void __lambda10__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_lambda10_ (source_object, res, self);
	block6_data_unref (self);
}


static gboolean _lambda9_ (Block5Data* _data5_) {
	Block4Data* _data4_;
	IndividualRetrievalTests * self;
	gboolean result = FALSE;
	gboolean try_again;
	_data4_ = _data5_->_data4_;
	self = _data4_->self;
	try_again = FALSE;
	{
		GeeIterator* _tmp0_ = NULL;
		GeeIterator* _id_it;
		_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data5_->ids_remaining);
		_id_it = _tmp0_;
		while (TRUE) {
			Block6Data* _data6_;
			gboolean _tmp1_;
			gpointer _tmp2_ = NULL;
			gchar* id;
			GHashTable* _tmp3_ = NULL;
			gchar* _tmp4_;
			GValue* _tmp5_ = NULL;
			gint _tmp6_;
			_data6_ = g_slice_new0 (Block6Data);
			_data6_->_ref_count_ = 1;
			_data6_->_data5_ = block5_data_ref (_data5_);
			_tmp1_ = gee_iterator_next (_id_it);
			if (!_tmp1_) {
				block6_data_unref (_data6_);
				_data6_ = NULL;
				break;
			}
			_tmp2_ = gee_iterator_get (_id_it);
			id = (gchar*) _tmp2_;
			_tmp3_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, __vala_GValue_free0_);
			_data6_->details = _tmp3_;
			_tmp4_ = g_strdup ("contact");
			_tmp5_ = g_new0 (GValue, 1);
			g_value_init (_tmp5_, G_TYPE_STRING);
			g_value_set_string (_tmp5_, id);
			g_hash_table_insert (_data6_->details, _tmp4_, _tmp5_);
			folks_persona_store_add_persona_from_details ((FolksPersonaStore*) _data4_->store, _data6_->details, __lambda10__gasync_ready_callback, block6_data_ref (_data6_));
			_tmp6_ = gee_collection_get_size ((GeeCollection*) _data5_->ids_remaining);
			try_again = _tmp6_ > 0;
			if (try_again) {
				_g_free0 (id);
				block6_data_unref (_data6_);
				_data6_ = NULL;
				break;
			}
			_g_free0 (id);
			block6_data_unref (_data6_);
			_data6_ = NULL;
		}
		_g_object_unref0 (_id_it);
	}
	result = try_again;
	return result;
}


static gboolean __lambda9__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda9_ (self);
	return result;
}


static gboolean individual_retrieval_tests_add_personas_co (IndividualRetrievalTestsAddPersonasData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	data->_data4_ = g_slice_new0 (Block4Data);
	data->_data4_->_ref_count_ = 1;
	data->_data4_->self = g_object_ref (data->self);
	data->_data4_->store = _g_object_ref0 (data->store);
	data->_data4_->_async_data_ = data;
	data->_data5_ = g_slice_new0 (Block5Data);
	data->_data5_->_ref_count_ = 1;
	data->_data5_->_data4_ = block4_data_ref (data->_data4_);
	data->_state_ = 1;
	folks_persona_store_prepare ((FolksPersonaStore*) data->_data4_->store, individual_retrieval_tests_add_personas_ready, data);
	return FALSE;
	_state_1:
	folks_persona_store_prepare_finish ((FolksPersonaStore*) data->_data4_->store, data->_res_, &data->_inner_error_);
	if (data->_inner_error_ != NULL) {
		block5_data_unref (data->_data5_);
		data->_data5_ = NULL;
		goto __catch2_g_error;
	}
	data->_tmp0_ = NULL;
	data->_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal);
	data->_data5_->ids_remaining = data->_tmp0_;
	{
		data->_tmp1_ = NULL;
		data->_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) data->ids_add);
		data->_contact_id_it = data->_tmp1_;
		while (TRUE) {
			data->_tmp2_ = gee_iterator_next (data->_contact_id_it);
			if (!data->_tmp2_) {
				break;
			}
			data->_tmp3_ = NULL;
			data->_tmp3_ = gee_iterator_get (data->_contact_id_it);
			data->contact_id = (gchar*) data->_tmp3_;
			gee_abstract_collection_add ((GeeAbstractCollection*) data->_data5_->ids_remaining, data->contact_id);
			_g_free0 (data->contact_id);
		}
		_g_object_unref0 (data->_contact_id_it);
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda9__gsource_func, block5_data_ref (data->_data5_), block5_data_unref);
	block5_data_unref (data->_data5_);
	data->_data5_ = NULL;
	goto __finally2;
	__catch2_g_error:
	{
		data->e2 = data->_inner_error_;
		data->_inner_error_ = NULL;
		data->_tmp4_ = NULL;
		data->_tmp4_ = folks_persona_store_get_id ((FolksPersonaStore*) data->_data4_->store);
		g_warning ("individual-retrieval.vala:277: Error preparing PersonaStore '%s': %s", data->_tmp4_, data->e2->message);
		g_assert_not_reached ();
		_g_error_free0 (data->e2);
	}
	__finally2:
	if (data->_inner_error_ != NULL) {
		block4_data_unref (data->_data4_);
		data->_data4_ = NULL;
		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);
		g_clear_error (&data->_inner_error_);
		return FALSE;
	}
	block4_data_unref (data->_data4_);
	data->_data4_ = NULL;
	if (data->_state_ == 0) {
		g_simple_async_result_complete_in_idle (data->_async_result);
	} else {
		g_simple_async_result_complete (data->_async_result);
	}
	g_object_unref (data->_async_result);
	return FALSE;
}


static void individual_retrieval_tests_class_init (IndividualRetrievalTestsClass * klass) {
	individual_retrieval_tests_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (IndividualRetrievalTestsPrivate));
	FOLKS_TEST_CASE_CLASS (klass)->set_up = individual_retrieval_tests_real_set_up;
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = individual_retrieval_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = individual_retrieval_tests_finalize;
}


static void individual_retrieval_tests_instance_init (IndividualRetrievalTests * self) {
	gchar* _tmp0_;
	self->priv = INDIVIDUAL_RETRIEVAL_TESTS_GET_PRIVATE (self);
	_tmp0_ = g_strdup ("telepathy:/org/freedesktop/Telepathy/Account/cm/protocol/account:");
	self->priv->individual_id_prefix = _tmp0_;
	self->priv->_test_timeout = 3;
}


static void individual_retrieval_tests_finalize (GObject* obj) {
	IndividualRetrievalTests * self;
	self = INDIVIDUAL_RETRIEVAL_TESTS (obj);
	_g_object_unref0 (self->priv->tp_backend);
	_g_object_unref0 (self->priv->default_individuals);
	_g_free0 (self->priv->individual_id_prefix);
	G_OBJECT_CLASS (individual_retrieval_tests_parent_class)->finalize (obj);
}


GType individual_retrieval_tests_get_type (void) {
	static volatile gsize individual_retrieval_tests_type_id__volatile = 0;
	if (g_once_init_enter (&individual_retrieval_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IndividualRetrievalTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) individual_retrieval_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IndividualRetrievalTests), 0, (GInstanceInitFunc) individual_retrieval_tests_instance_init, NULL };
		GType individual_retrieval_tests_type_id;
		individual_retrieval_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "IndividualRetrievalTests", &g_define_type_info, 0);
		g_once_init_leave (&individual_retrieval_tests_type_id__volatile, individual_retrieval_tests_type_id);
	}
	return individual_retrieval_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	IndividualRetrievalTests* _tmp1_ = NULL;
	IndividualRetrievalTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
	g_test_init (&args_length1, &args, NULL);
	_tmp0_ = g_test_get_root ();
	root = _tmp0_;
	_tmp1_ = individual_retrieval_tests_new ();
	_tmp2_ = _tmp1_;
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
	g_test_suite_add_suite (root, _tmp3_);
	_g_object_unref0 (_tmp2_);
	g_test_run ();
	result = 0;
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return _vala_main (argv, argc);
}



