/* match-all.c generated by valac 0.13.1.106-1068, the Vala compiler
 * generated from match-all.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 <tracker-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <folks/folks-tracker.h>
#include <gio/gio.h>
#include <gee.h>


#define TYPE_MATCH_ALL_TESTS (match_all_tests_get_type ())
#define MATCH_ALL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MATCH_ALL_TESTS, MatchAllTests))
#define MATCH_ALL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MATCH_ALL_TESTS, MatchAllTestsClass))
#define IS_MATCH_ALL_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MATCH_ALL_TESTS))
#define IS_MATCH_ALL_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MATCH_ALL_TESTS))
#define MATCH_ALL_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MATCH_ALL_TESTS, MatchAllTestsClass))

typedef struct _MatchAllTests MatchAllTests;
typedef struct _MatchAllTestsClass MatchAllTestsClass;
typedef struct _MatchAllTestsPrivate MatchAllTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _tracker_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (tracker_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _MatchAllTestsTestMatchAllAsyncData MatchAllTestsTestMatchAllAsyncData;
typedef struct _MatchAllTestsTryToAddData MatchAllTestsTryToAddData;
typedef struct _MatchAllTestsAddPersonasData MatchAllTestsAddPersonasData;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _MatchAllTestsDoAddPersonaData MatchAllTestsDoAddPersonaData;

struct _MatchAllTests {
	FolksTestCase parent_instance;
	MatchAllTestsPrivate * priv;
};

struct _MatchAllTestsClass {
	FolksTestCaseClass parent_class;
};

struct _MatchAllTestsPrivate {
	GMainLoop* _main_loop;
	TrackerTestBackend* _tracker_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname_1;
	gchar* _persona_fullname_2;
	gchar* _persona_fullname_3;
	gchar* _persona_fullname_4;
	gboolean _added_personas;
	GStaticRecMutex __lock__added_personas;
	gchar* _individual_id_1;
	gchar* _individual_id_2;
	gchar* _individual_id_3;
	gchar* _individual_id_4;
	TrfPersonaStore* _pstore;
	GList* _matches_all;
	gint _matches_1;
};

struct _MatchAllTestsTestMatchAllAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MatchAllTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksBackendStore* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksIndividualAggregator* _tmp4_;
	FolksIndividualAggregator* _tmp5_;
	FolksBackendStore* _tmp6_;
	GeeMap* _tmp7_;
	GeeMap* _tmp8_;
	GeeCollection* _tmp9_;
	GeeCollection* _tmp10_;
	GeeCollection* _tmp11_;
	GeeIterator* _tmp12_;
	GeeIterator* _tmp13_;
	GeeIterator* _backend_it;
	GeeIterator* _tmp14_;
	gboolean _tmp15_;
	GeeIterator* _tmp16_;
	gpointer _tmp17_;
	FolksBackend* backend;
	FolksBackend* _tmp18_;
	GeeMap* _tmp19_;
	GeeMap* _tmp20_;
	gpointer _tmp21_;
	TrfPersonaStore* _tmp22_;
	TrfPersonaStore* _tmp23_;
	TrfPersonaStore* _tmp24_;
	GError* e;
	GError* _tmp25_;
	const gchar* _tmp26_;
	GError * _inner_error_;
};

struct _MatchAllTestsTryToAddData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MatchAllTests* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	TrfPersonaStore* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GError * _inner_error_;
};

struct _MatchAllTestsAddPersonasData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MatchAllTests* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
};

struct _MatchAllTestsDoAddPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MatchAllTests* self;
	gchar* fn;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details;
	GValue* val;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue _tmp5_;
	GValue* _tmp6_;
	GValue* _tmp7_;
	const gchar* _tmp8_;
	GHashTable* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	GValue* _tmp12_;
	FolksIndividualAggregator* _tmp13_;
	TrfPersonaStore* _tmp14_;
	GHashTable* _tmp15_;
	FolksPersona* _tmp16_;
	FolksPersona* _tmp17_;
	GError* e;
	GError* _tmp18_;
	const gchar* _tmp19_;
	GError * _inner_error_;
};


static gpointer match_all_tests_parent_class = NULL;

GType match_all_tests_get_type (void) G_GNUC_CONST;
#define MATCH_ALL_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MATCH_ALL_TESTS, MatchAllTestsPrivate))
enum  {
	MATCH_ALL_TESTS_DUMMY_PROPERTY
};
MatchAllTests* match_all_tests_new (void);
MatchAllTests* match_all_tests_construct (GType object_type);
void match_all_tests_test_match_all (MatchAllTests* self);
static void _match_all_tests_test_match_all_folks_test_case_test_method (gpointer self);
static void match_all_tests_real_set_up (FolksTestCase* base);
static void match_all_tests_real_tear_down (FolksTestCase* base);
static void _match_all_tests_test_match_all_async (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _match_all_tests_test_match_all_finish (MatchAllTests* self, GAsyncResult* _res_);
static gboolean _lambda0_ (MatchAllTests* self);
static gboolean __lambda0__gsource_func (gpointer self);
static void _match_all_tests_test_match_all_async_data_free (gpointer _data);
static gboolean _match_all_tests_test_match_all_async_co (MatchAllTestsTestMatchAllAsyncData* _data_);
static void _match_all_tests_test_match_all_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _match_all_tests_individuals_changed_cb (MatchAllTests* self, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason);
static void __match_all_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static void _match_all_tests_notify_pstore_cb (MatchAllTests* self, GObject* _pstore, GParamSpec* ps);
static void __match_all_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _match_all_tests_try_to_add (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _match_all_tests_try_to_add_finish (MatchAllTests* self, GAsyncResult* _res_);
static void _match_all_tests_try_match_all (MatchAllTests* self);
static void _match_all_tests_try_to_add_data_free (gpointer _data);
static gboolean _match_all_tests_try_to_add_co (MatchAllTestsTryToAddData* _data_);
static void _match_all_tests_add_personas (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _match_all_tests_add_personas_finish (MatchAllTests* self, GAsyncResult* _res_);
static void _match_all_tests_try_to_add_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _match_all_tests_add_personas_data_free (gpointer _data);
static gboolean _match_all_tests_add_personas_co (MatchAllTestsAddPersonasData* _data_);
static void _match_all_tests_do_add_persona (MatchAllTests* self, const gchar* fn, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _match_all_tests_do_add_persona_finish (MatchAllTests* self, GAsyncResult* _res_);
static void _match_all_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _match_all_tests_do_add_persona_data_free (gpointer _data);
static gboolean _match_all_tests_do_add_persona_co (MatchAllTestsDoAddPersonaData* _data_);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static void _match_all_tests_do_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void match_all_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _match_all_tests_test_match_all_folks_test_case_test_method (gpointer self) {
	match_all_tests_test_match_all (self);
}


MatchAllTests* match_all_tests_construct (GType object_type) {
	MatchAllTests * self = NULL;
	TrackerTestBackend* _tmp0_;
	self = (MatchAllTests*) folks_test_case_construct (object_type, "MatchAllTests");
	_tmp0_ = tracker_test_backend_new ();
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
	self->priv->_tracker_backend = _tmp0_;
	folks_test_case_add_test ((FolksTestCase*) self, "test potential match all ", _match_all_tests_test_match_all_folks_test_case_test_method, self);
	return self;
}


MatchAllTests* match_all_tests_new (void) {
	return match_all_tests_construct (TYPE_MATCH_ALL_TESTS);
}


static void match_all_tests_real_set_up (FolksTestCase* base) {
	MatchAllTests * self;
	self = (MatchAllTests*) base;
}


static void match_all_tests_real_tear_down (FolksTestCase* base) {
	MatchAllTests * self;
	TrackerTestBackend* _tmp0_;
	self = (MatchAllTests*) base;
	_tmp0_ = self->priv->_tracker_backend;
	tracker_test_backend_tear_down (_tmp0_);
}


static gboolean _lambda0_ (MatchAllTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
	_tmp0_ = self->priv->_main_loop;
	g_main_loop_quit (_tmp0_);
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda0_ (self);
	return result;
}


void match_all_tests_test_match_all (MatchAllTests* self) {
	GMainLoop* _tmp0_;
	GMainLoop* _tmp1_;
	gint _tmp2_;
	GList* _tmp3_;
	guint _tmp4_ = 0U;
	GList* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_g_main_loop_unref0 (self->priv->_main_loop);
	self->priv->_main_loop = _tmp0_;
	_match_all_tests_test_match_all_async (self, NULL, NULL);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda0__gsource_func, g_object_ref (self), g_object_unref);
	_tmp1_ = self->priv->_main_loop;
	g_main_loop_run (_tmp1_);
	_tmp2_ = self->priv->_matches_1;
	g_assert (_tmp2_ == 1);
	_tmp3_ = self->priv->_matches_all;
	_tmp4_ = g_list_length (_tmp3_);
	g_assert (_tmp4_ == ((guint) 4));
	_tmp5_ = self->priv->_matches_all;
	{
		GList* size_collection = NULL;
		GList* size_it = NULL;
		size_collection = _tmp5_;
		for (size_it = size_collection; size_it != NULL; size_it = size_it->next) {
			gint size = 0;
			size = GPOINTER_TO_INT (size_it->data);
			{
				gint _tmp6_;
				_tmp6_ = size;
				g_assert (_tmp6_ == 1);
			}
		}
	}
}


static void _match_all_tests_test_match_all_async_data_free (gpointer _data) {
	MatchAllTestsTestMatchAllAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MatchAllTestsTestMatchAllAsyncData, _data_);
}


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


static void _match_all_tests_test_match_all_async (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MatchAllTestsTestMatchAllAsyncData* _data_;
	MatchAllTests* _tmp0_;
	_data_ = g_slice_new0 (MatchAllTestsTestMatchAllAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _match_all_tests_test_match_all_async);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _match_all_tests_test_match_all_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_match_all_tests_test_match_all_async_co (_data_);
}


static void _match_all_tests_test_match_all_finish (MatchAllTests* self, GAsyncResult* _res_) {
	MatchAllTestsTestMatchAllAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _match_all_tests_test_match_all_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MatchAllTestsTestMatchAllAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_match_all_tests_test_match_all_async_co (_data_);
}


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


static void __match_all_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_match_all_tests_notify_pstore_cb (self, _sender, pspec);
}


static gboolean _match_all_tests_test_match_all_async_co (MatchAllTestsTestMatchAllAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_backend_store_dup ();
	_data_->store = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->store;
	_data_->_state_ = 1;
	folks_backend_store_prepare (_data_->_tmp1_, _match_all_tests_test_match_all_async_ready, _data_);
	return FALSE;
	_state_1:
	folks_backend_store_prepare_finish (_data_->_tmp1_, _data_->_res_);
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
	if (_data_->_tmp2_ == NULL) {
		_data_->_tmp3_ = folks_individual_aggregator_new ();
		_g_object_unref0 (_data_->self->priv->_aggregator);
		_data_->self->priv->_aggregator = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
		g_signal_connect_object (_data_->_tmp4_, "individuals-changed", (GCallback) __match_all_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed, _data_->self, 0);
	}
	{
		_data_->_tmp5_ = _data_->self->priv->_aggregator;
		_data_->_state_ = 2;
		folks_individual_aggregator_prepare (_data_->_tmp5_, _match_all_tests_test_match_all_async_ready, _data_);
		return FALSE;
		_state_2:
		folks_individual_aggregator_prepare_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->self->priv->_pstore);
		_data_->self->priv->_pstore = NULL;
		{
			_data_->_tmp6_ = _data_->store;
			_data_->_tmp7_ = folks_backend_store_get_enabled_backends (_data_->_tmp6_);
			_data_->_tmp8_ = _data_->_tmp7_;
			_data_->_tmp9_ = gee_map_get_values (_data_->_tmp8_);
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp11_);
			_data_->_tmp13_ = _data_->_tmp12_;
			_g_object_unref0 (_data_->_tmp11_);
			_data_->_backend_it = _data_->_tmp13_;
			while (TRUE) {
				_data_->_tmp14_ = _data_->_backend_it;
				_data_->_tmp15_ = FALSE;
				_data_->_tmp15_ = gee_iterator_next (_data_->_tmp14_);
				if (!_data_->_tmp15_) {
					break;
				}
				_data_->_tmp16_ = _data_->_backend_it;
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = gee_iterator_get (_data_->_tmp16_);
				_data_->backend = (FolksBackend*) _data_->_tmp17_;
				_data_->_tmp18_ = _data_->backend;
				_data_->_tmp19_ = folks_backend_get_persona_stores (_data_->_tmp18_);
				_data_->_tmp20_ = _data_->_tmp19_;
				_data_->_tmp21_ = NULL;
				_data_->_tmp21_ = gee_map_get (_data_->_tmp20_, "tracker");
				_g_object_unref0 (_data_->self->priv->_pstore);
				_data_->self->priv->_pstore = TRF_PERSONA_STORE ((FolksPersonaStore*) _data_->_tmp21_);
				_data_->_tmp22_ = _data_->self->priv->_pstore;
				if (_data_->_tmp22_ != NULL) {
					_g_object_unref0 (_data_->backend);
					break;
				}
				_g_object_unref0 (_data_->backend);
			}
			_g_object_unref0 (_data_->_backend_it);
		}
		_data_->_tmp23_ = _data_->self->priv->_pstore;
		g_assert (_data_->_tmp23_ != NULL);
		_data_->_tmp24_ = _data_->self->priv->_pstore;
		g_signal_connect_object ((GObject*) _data_->_tmp24_, "notify::is-prepared", (GCallback) __match_all_tests_notify_pstore_cb_g_object_notify, _data_->self, 0);
		_match_all_tests_try_to_add (_data_->self, NULL, NULL);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp25_ = _data_->e;
		_data_->_tmp26_ = _data_->_tmp25_->message;
		g_warning ("match-all.vala:125: Error when calling prepare: %s\n", _data_->_tmp26_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->store);
		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;
	}
	_g_object_unref0 (_data_->store);
	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 _match_all_tests_individuals_changed_cb (MatchAllTests* self, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason) {
	gboolean _tmp38_ = FALSE;
	gboolean _tmp39_ = FALSE;
	gboolean _tmp40_ = FALSE;
	const gchar* _tmp41_;
	gboolean _tmp43_;
	gboolean _tmp45_;
	gboolean _tmp47_;
	GeeSet* _tmp48_;
	gint _tmp49_;
	gint _tmp50_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	{
		GeeSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _i_it;
		_tmp0_ = added;
		_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
		_i_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			const gchar* _tmp9_;
			_tmp2_ = _i_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = _i_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			i = (FolksIndividual*) _tmp5_;
			_tmp6_ = i;
			_tmp7_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = self->priv->_persona_fullname_1;
			if (g_strcmp0 (_tmp8_, _tmp9_) == 0) {
				FolksIndividual* _tmp10_;
				const gchar* _tmp11_;
				const gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp10_ = i;
				_tmp11_ = folks_individual_get_id (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = g_strdup (_tmp12_);
				_g_free0 (self->priv->_individual_id_1);
				self->priv->_individual_id_1 = _tmp13_;
			} else {
				FolksIndividual* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp14_ = i;
				_tmp15_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = self->priv->_persona_fullname_2;
				if (g_strcmp0 (_tmp16_, _tmp17_) == 0) {
					FolksIndividual* _tmp18_;
					const gchar* _tmp19_;
					const gchar* _tmp20_;
					gchar* _tmp21_;
					_tmp18_ = i;
					_tmp19_ = folks_individual_get_id (_tmp18_);
					_tmp20_ = _tmp19_;
					_tmp21_ = g_strdup (_tmp20_);
					_g_free0 (self->priv->_individual_id_2);
					self->priv->_individual_id_2 = _tmp21_;
				} else {
					FolksIndividual* _tmp22_;
					const gchar* _tmp23_;
					const gchar* _tmp24_;
					const gchar* _tmp25_;
					_tmp22_ = i;
					_tmp23_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp22_);
					_tmp24_ = _tmp23_;
					_tmp25_ = self->priv->_persona_fullname_3;
					if (g_strcmp0 (_tmp24_, _tmp25_) == 0) {
						FolksIndividual* _tmp26_;
						const gchar* _tmp27_;
						const gchar* _tmp28_;
						gchar* _tmp29_;
						_tmp26_ = i;
						_tmp27_ = folks_individual_get_id (_tmp26_);
						_tmp28_ = _tmp27_;
						_tmp29_ = g_strdup (_tmp28_);
						_g_free0 (self->priv->_individual_id_3);
						self->priv->_individual_id_3 = _tmp29_;
					} else {
						FolksIndividual* _tmp30_;
						const gchar* _tmp31_;
						const gchar* _tmp32_;
						const gchar* _tmp33_;
						_tmp30_ = i;
						_tmp31_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp30_);
						_tmp32_ = _tmp31_;
						_tmp33_ = self->priv->_persona_fullname_4;
						if (g_strcmp0 (_tmp32_, _tmp33_) == 0) {
							FolksIndividual* _tmp34_;
							const gchar* _tmp35_;
							const gchar* _tmp36_;
							gchar* _tmp37_;
							_tmp34_ = i;
							_tmp35_ = folks_individual_get_id (_tmp34_);
							_tmp36_ = _tmp35_;
							_tmp37_ = g_strdup (_tmp36_);
							_g_free0 (self->priv->_individual_id_4);
							self->priv->_individual_id_4 = _tmp37_;
						}
					}
				}
			}
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp41_ = self->priv->_individual_id_1;
	if (g_strcmp0 (_tmp41_, "") != 0) {
		const gchar* _tmp42_;
		_tmp42_ = self->priv->_individual_id_2;
		_tmp40_ = g_strcmp0 (_tmp42_, "") != 0;
	} else {
		_tmp40_ = FALSE;
	}
	_tmp43_ = _tmp40_;
	if (_tmp43_) {
		const gchar* _tmp44_;
		_tmp44_ = self->priv->_individual_id_3;
		_tmp39_ = g_strcmp0 (_tmp44_, "") != 0;
	} else {
		_tmp39_ = FALSE;
	}
	_tmp45_ = _tmp39_;
	if (_tmp45_) {
		const gchar* _tmp46_;
		_tmp46_ = self->priv->_individual_id_4;
		_tmp38_ = g_strcmp0 (_tmp46_, "") != 0;
	} else {
		_tmp38_ = FALSE;
	}
	_tmp47_ = _tmp38_;
	if (_tmp47_) {
		_match_all_tests_try_match_all (self);
	}
	_tmp48_ = removed;
	_tmp49_ = gee_collection_get_size ((GeeCollection*) _tmp48_);
	_tmp50_ = _tmp49_;
	g_assert (_tmp50_ == 0);
}


static void _match_all_tests_try_match_all (MatchAllTests* self) {
	FolksIndividualAggregator* _tmp0_;
	GeeMap* _tmp1_;
	GeeMap* _tmp2_;
	const gchar* _tmp3_;
	gpointer _tmp4_ = NULL;
	FolksIndividual* ind1;
	FolksIndividualAggregator* _tmp5_;
	FolksIndividual* _tmp6_;
	GeeMap* _tmp7_ = NULL;
	GeeMap* matches_1;
	GeeMap* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	FolksIndividualAggregator* _tmp11_;
	GeeMap* _tmp12_ = NULL;
	GeeMap* all_matches;
	GMainLoop* _tmp32_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_aggregator;
	_tmp1_ = folks_individual_aggregator_get_individuals (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_individual_id_1;
	_tmp4_ = gee_map_get (_tmp2_, _tmp3_);
	ind1 = (FolksIndividual*) _tmp4_;
	_tmp5_ = self->priv->_aggregator;
	_tmp6_ = ind1;
	_tmp7_ = folks_individual_aggregator_get_potential_matches (_tmp5_, _tmp6_, FOLKS_MATCH_RESULT_MEDIUM);
	matches_1 = _tmp7_;
	_tmp8_ = matches_1;
	_tmp9_ = gee_map_get_size (_tmp8_);
	_tmp10_ = _tmp9_;
	self->priv->_matches_1 = _tmp10_;
	_tmp11_ = self->priv->_aggregator;
	_tmp12_ = folks_individual_aggregator_get_all_potential_matches (_tmp11_, FOLKS_MATCH_RESULT_MEDIUM);
	all_matches = _tmp12_;
	{
		GeeMap* _tmp13_;
		GeeSet* _tmp14_;
		GeeSet* _tmp15_;
		GeeSet* _tmp16_;
		GeeIterator* _tmp17_ = NULL;
		GeeIterator* _tmp18_;
		GeeIterator* _i_it;
		_tmp13_ = all_matches;
		_tmp14_ = gee_map_get_keys (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = _tmp15_;
		_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
		_tmp18_ = _tmp17_;
		_g_object_unref0 (_tmp16_);
		_i_it = _tmp18_;
		while (TRUE) {
			GeeIterator* _tmp19_;
			gboolean _tmp20_ = FALSE;
			GeeIterator* _tmp21_;
			gpointer _tmp22_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp23_;
			gboolean _tmp24_;
			gboolean _tmp25_;
			GeeMap* _tmp26_;
			FolksIndividual* _tmp27_;
			gpointer _tmp28_ = NULL;
			GeeMap* matches;
			GeeMap* _tmp29_;
			gint _tmp30_;
			gint _tmp31_;
			_tmp19_ = _i_it;
			_tmp20_ = gee_iterator_next (_tmp19_);
			if (!_tmp20_) {
				break;
			}
			_tmp21_ = _i_it;
			_tmp22_ = gee_iterator_get (_tmp21_);
			i = (FolksIndividual*) _tmp22_;
			_tmp23_ = i;
			_tmp24_ = folks_individual_get_is_user (_tmp23_);
			_tmp25_ = _tmp24_;
			if (_tmp25_) {
				_g_object_unref0 (i);
				continue;
			}
			_tmp26_ = all_matches;
			_tmp27_ = i;
			_tmp28_ = gee_map_get (_tmp26_, _tmp27_);
			matches = (GeeMap*) _tmp28_;
			_tmp29_ = matches;
			_tmp30_ = gee_map_get_size (_tmp29_);
			_tmp31_ = _tmp30_;
			self->priv->_matches_all = g_list_prepend (self->priv->_matches_all, GINT_TO_POINTER (_tmp31_));
			_g_object_unref0 (matches);
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp32_ = self->priv->_main_loop;
	g_main_loop_quit (_tmp32_);
	_g_object_unref0 (all_matches);
	_g_object_unref0 (matches_1);
	_g_object_unref0 (ind1);
}


static void _match_all_tests_notify_pstore_cb (MatchAllTests* self, GObject* _pstore, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (_pstore != NULL);
	g_return_if_fail (ps != NULL);
	_match_all_tests_try_to_add (self, NULL, NULL);
}


static void _match_all_tests_try_to_add_data_free (gpointer _data) {
	MatchAllTestsTryToAddData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MatchAllTestsTryToAddData, _data_);
}


static void _match_all_tests_try_to_add (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MatchAllTestsTryToAddData* _data_;
	MatchAllTests* _tmp0_;
	_data_ = g_slice_new0 (MatchAllTestsTryToAddData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _match_all_tests_try_to_add);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _match_all_tests_try_to_add_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_match_all_tests_try_to_add_co (_data_);
}


static void _match_all_tests_try_to_add_finish (MatchAllTests* self, GAsyncResult* _res_) {
	MatchAllTestsTryToAddData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _match_all_tests_try_to_add_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MatchAllTestsTryToAddData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_match_all_tests_try_to_add_co (_data_);
}


static gboolean _match_all_tests_try_to_add_co (MatchAllTestsTryToAddData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->_added_personas;
		g_static_rec_mutex_lock (&_data_->self->priv->__lock__added_personas);
		{
			_data_->_tmp2_ = _data_->self->priv->_pstore;
			_data_->_tmp3_ = folks_persona_store_get_is_prepared ((FolksPersonaStore*) _data_->_tmp2_);
			_data_->_tmp4_ = _data_->_tmp3_;
			if (_data_->_tmp4_) {
				_data_->_tmp5_ = _data_->self->priv->_added_personas;
				_data_->_tmp1_ = _data_->_tmp5_ == FALSE;
			} else {
				_data_->_tmp1_ = FALSE;
			}
			_data_->_tmp6_ = _data_->_tmp1_;
			if (_data_->_tmp6_) {
				_data_->self->priv->_added_personas = TRUE;
				_data_->_state_ = 1;
				_match_all_tests_add_personas (_data_->self, _match_all_tests_try_to_add_ready, _data_);
				return FALSE;
				_state_1:
				_match_all_tests_add_personas_finish (_data_->self, _data_->_res_);
			}
		}
		__finally1:
		{
			_data_->_tmp7_ = _data_->self->priv->_added_personas;
			g_static_rec_mutex_unlock (&_data_->self->priv->__lock__added_personas);
		}
		if (_data_->_inner_error_ != 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;
		}
	}
	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 _match_all_tests_add_personas_data_free (gpointer _data) {
	MatchAllTestsAddPersonasData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MatchAllTestsAddPersonasData, _data_);
}


static void _match_all_tests_add_personas (MatchAllTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MatchAllTestsAddPersonasData* _data_;
	MatchAllTests* _tmp0_;
	_data_ = g_slice_new0 (MatchAllTestsAddPersonasData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _match_all_tests_add_personas);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _match_all_tests_add_personas_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_match_all_tests_add_personas_co (_data_);
}


static void _match_all_tests_add_personas_finish (MatchAllTests* self, GAsyncResult* _res_) {
	MatchAllTestsAddPersonasData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _match_all_tests_add_personas_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MatchAllTestsAddPersonasData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_match_all_tests_add_personas_co (_data_);
}


static gboolean _match_all_tests_add_personas_co (MatchAllTestsAddPersonasData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_persona_fullname_1;
	_data_->_state_ = 1;
	_match_all_tests_do_add_persona (_data_->self, _data_->_tmp0_, _match_all_tests_add_personas_ready, _data_);
	return FALSE;
	_state_1:
	_match_all_tests_do_add_persona_finish (_data_->self, _data_->_res_);
	_data_->_tmp1_ = _data_->self->priv->_persona_fullname_2;
	_data_->_state_ = 2;
	_match_all_tests_do_add_persona (_data_->self, _data_->_tmp1_, _match_all_tests_add_personas_ready, _data_);
	return FALSE;
	_state_2:
	_match_all_tests_do_add_persona_finish (_data_->self, _data_->_res_);
	_data_->_tmp2_ = _data_->self->priv->_persona_fullname_3;
	_data_->_state_ = 3;
	_match_all_tests_do_add_persona (_data_->self, _data_->_tmp2_, _match_all_tests_add_personas_ready, _data_);
	return FALSE;
	_state_3:
	_match_all_tests_do_add_persona_finish (_data_->self, _data_->_res_);
	_data_->_tmp3_ = _data_->self->priv->_persona_fullname_4;
	_data_->_state_ = 4;
	_match_all_tests_do_add_persona (_data_->self, _data_->_tmp3_, _match_all_tests_add_personas_ready, _data_);
	return FALSE;
	_state_4:
	_match_all_tests_do_add_persona_finish (_data_->self, _data_->_res_);
	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 _match_all_tests_do_add_persona_data_free (gpointer _data) {
	MatchAllTestsDoAddPersonaData* _data_;
	_data_ = _data;
	_g_free0 (_data_->fn);
	_g_object_unref0 (_data_->self);
	g_slice_free (MatchAllTestsDoAddPersonaData, _data_);
}


static void _match_all_tests_do_add_persona (MatchAllTests* self, const gchar* fn, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MatchAllTestsDoAddPersonaData* _data_;
	MatchAllTests* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	_data_ = g_slice_new0 (MatchAllTestsDoAddPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _match_all_tests_do_add_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _match_all_tests_do_add_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = fn;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->fn = _tmp2_;
	_match_all_tests_do_add_persona_co (_data_);
}


static void _match_all_tests_do_add_persona_finish (MatchAllTests* self, GAsyncResult* _res_) {
	MatchAllTestsDoAddPersonaData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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 _match_all_tests_do_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MatchAllTestsDoAddPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_match_all_tests_do_add_persona_co (_data_);
}


static gboolean _match_all_tests_do_add_persona_co (MatchAllTestsDoAddPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_str_hash;
	_data_->_tmp1_ = g_str_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
	_data_->details = _data_->_tmp2_;
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp3_, G_TYPE_STRING);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = __g_value_dup0 (&_data_->_tmp5_);
	__vala_GValue_free0 (_data_->val);
	_data_->val = _data_->_tmp6_;
	G_IS_VALUE (&_data_->_tmp5_) ? (g_value_unset (&_data_->_tmp5_), NULL) : NULL;
	_data_->_tmp7_ = _data_->val;
	_data_->_tmp8_ = _data_->fn;
	g_value_set_string (_data_->_tmp7_, _data_->_tmp8_);
	_data_->_tmp9_ = _data_->details;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_FULL_NAME);
	_data_->_tmp11_ = g_strdup (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->val;
	_data_->val = NULL;
	g_hash_table_insert (_data_->_tmp9_, _data_->_tmp11_, _data_->_tmp12_);
	{
		_data_->_tmp13_ = _data_->self->priv->_aggregator;
		_data_->_tmp14_ = _data_->self->priv->_pstore;
		_data_->_tmp15_ = _data_->details;
		_data_->_state_ = 1;
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp13_, NULL, (FolksPersonaStore*) _data_->_tmp14_, _data_->_tmp15_, _match_all_tests_do_add_persona_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp16_ = NULL;
		_data_->_tmp16_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp17_ = _data_->_tmp16_;
		_g_object_unref0 (_data_->_tmp17_);
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
				goto __catch2_folks_individual_aggregator_error;
			}
			__vala_GValue_free0 (_data_->val);
			_g_hash_table_unref0 (_data_->details);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	goto __finally2;
	__catch2_folks_individual_aggregator_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp18_ = _data_->e;
		_data_->_tmp19_ = _data_->_tmp18_->message;
		g_warning ("match-all.vala:232: [AddPersonaError] add_persona_from_details: %s\n", _data_->_tmp19_);
		_g_error_free0 (_data_->e);
	}
	__finally2:
	if (_data_->_inner_error_ != NULL) {
		__vala_GValue_free0 (_data_->val);
		_g_hash_table_unref0 (_data_->details);
		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;
	}
	__vala_GValue_free0 (_data_->val);
	_g_hash_table_unref0 (_data_->details);
	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 match_all_tests_class_init (MatchAllTestsClass * klass) {
	match_all_tests_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (MatchAllTestsPrivate));
	FOLKS_TEST_CASE_CLASS (klass)->set_up = match_all_tests_real_set_up;
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = match_all_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = match_all_tests_finalize;
}


static void match_all_tests_instance_init (MatchAllTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	self->priv = MATCH_ALL_TESTS_GET_PRIVATE (self);
	self->priv->_aggregator = NULL;
	_tmp0_ = g_strdup ("Bernie Innocenti");
	self->priv->_persona_fullname_1 = _tmp0_;
	_tmp1_ = g_strdup ("Bernardo H. Innocenti");
	self->priv->_persona_fullname_2 = _tmp1_;
	_tmp2_ = g_strdup ("Travis R.");
	self->priv->_persona_fullname_3 = _tmp2_;
	_tmp3_ = g_strdup ("Travis Reitter");
	self->priv->_persona_fullname_4 = _tmp3_;
	g_static_rec_mutex_init (&self->priv->__lock__added_personas);
	self->priv->_added_personas = FALSE;
	_tmp4_ = g_strdup ("");
	self->priv->_individual_id_1 = _tmp4_;
	_tmp5_ = g_strdup ("");
	self->priv->_individual_id_2 = _tmp5_;
	_tmp6_ = g_strdup ("");
	self->priv->_individual_id_3 = _tmp6_;
	_tmp7_ = g_strdup ("");
	self->priv->_individual_id_4 = _tmp7_;
	self->priv->_matches_all = NULL;
	self->priv->_matches_1 = 0;
}


static void match_all_tests_finalize (GObject* obj) {
	MatchAllTests * self;
	self = MATCH_ALL_TESTS (obj);
	_g_main_loop_unref0 (self->priv->_main_loop);
	_tracker_test_backend_unref0 (self->priv->_tracker_backend);
	_g_object_unref0 (self->priv->_aggregator);
	_g_free0 (self->priv->_persona_fullname_1);
	_g_free0 (self->priv->_persona_fullname_2);
	_g_free0 (self->priv->_persona_fullname_3);
	_g_free0 (self->priv->_persona_fullname_4);
	g_static_rec_mutex_free (&self->priv->__lock__added_personas);
	_g_free0 (self->priv->_individual_id_1);
	_g_free0 (self->priv->_individual_id_2);
	_g_free0 (self->priv->_individual_id_3);
	_g_free0 (self->priv->_individual_id_4);
	_g_object_unref0 (self->priv->_pstore);
	_g_list_free0 (self->priv->_matches_all);
	G_OBJECT_CLASS (match_all_tests_parent_class)->finalize (obj);
}


GType match_all_tests_get_type (void) {
	static volatile gsize match_all_tests_type_id__volatile = 0;
	if (g_once_init_enter (&match_all_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MatchAllTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) match_all_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MatchAllTests), 0, (GInstanceInitFunc) match_all_tests_instance_init, NULL };
		GType match_all_tests_type_id;
		match_all_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "MatchAllTests", &g_define_type_info, 0);
		g_once_init_leave (&match_all_tests_type_id__volatile, match_all_tests_type_id);
	}
	return match_all_tests_type_id__volatile;
}


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


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



