/* set-postal-addresses.c generated by valac 0.21.1.1-0d6f, the Vala compiler
 * generated from set-postal-addresses.vala, do not modify */

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

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


#define TYPE_SET_POSTAL_ADDRESSES_TESTS (set_postal_addresses_tests_get_type ())
#define SET_POSTAL_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_POSTAL_ADDRESSES_TESTS, SetPostalAddressesTests))
#define SET_POSTAL_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_POSTAL_ADDRESSES_TESTS, SetPostalAddressesTestsClass))
#define IS_SET_POSTAL_ADDRESSES_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_POSTAL_ADDRESSES_TESTS))
#define IS_SET_POSTAL_ADDRESSES_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_POSTAL_ADDRESSES_TESTS))
#define SET_POSTAL_ADDRESSES_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_POSTAL_ADDRESSES_TESTS, SetPostalAddressesTestsClass))

typedef struct _SetPostalAddressesTests SetPostalAddressesTests;
typedef struct _SetPostalAddressesTestsClass SetPostalAddressesTestsClass;
typedef struct _SetPostalAddressesTestsPrivate SetPostalAddressesTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SetPostalAddressesTestsTestSetPostalAddressesAsyncData SetPostalAddressesTestsTestSetPostalAddressesAsyncData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _SetPostalAddressesTests {
	TrackerTestTestCase parent_instance;
	SetPostalAddressesTestsPrivate * priv;
};

struct _SetPostalAddressesTestsClass {
	TrackerTestTestCaseClass parent_class;
};

struct _SetPostalAddressesTestsPrivate {
	GMainLoop* _main_loop;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname;
	gboolean _postal_address_found;
	FolksPostalAddressFieldDetails* _postal_address_fd;
};

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


static gpointer set_postal_addresses_tests_parent_class = NULL;

GType set_postal_addresses_tests_get_type (void) G_GNUC_CONST;
#define SET_POSTAL_ADDRESSES_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_POSTAL_ADDRESSES_TESTS, SetPostalAddressesTestsPrivate))
enum  {
	SET_POSTAL_ADDRESSES_TESTS_DUMMY_PROPERTY
};
SetPostalAddressesTests* set_postal_addresses_tests_new (void);
SetPostalAddressesTests* set_postal_addresses_tests_construct (GType object_type);
void set_postal_addresses_tests_test_set_postal_addresses (SetPostalAddressesTests* self);
static void _set_postal_addresses_tests_test_set_postal_addresses_folks_test_case_test_method (gpointer self);
static void _set_postal_addresses_tests_test_set_postal_addresses_async (SetPostalAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _set_postal_addresses_tests_test_set_postal_addresses_finish (SetPostalAddressesTests* self, GAsyncResult* _res_);
static void _set_postal_addresses_tests_test_set_postal_addresses_async_data_free (gpointer _data);
static gboolean _set_postal_addresses_tests_test_set_postal_addresses_async_co (SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_);
static void _set_postal_addresses_tests_test_set_postal_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _set_postal_addresses_tests_individuals_changed_cb (SetPostalAddressesTests* self, GeeMultiMap* changes);
static void __set_postal_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self);
static void _set_postal_addresses_tests_notify_postal_cb (SetPostalAddressesTests* self, GObject* individual_obj, GParamSpec* ps);
static void __set_postal_addresses_tests_notify_postal_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void set_postal_addresses_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _set_postal_addresses_tests_test_set_postal_addresses_folks_test_case_test_method (gpointer self) {
#line 38 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	set_postal_addresses_tests_test_set_postal_addresses (self);
#line 118 "set-postal-addresses.c"
}


SetPostalAddressesTests* set_postal_addresses_tests_construct (GType object_type) {
	SetPostalAddressesTests * self = NULL;
#line 36 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self = (SetPostalAddressesTests*) tracker_test_test_case_construct (object_type, "SetPostalAddressesTests");
#line 38 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "test setting postal addresses ", _set_postal_addresses_tests_test_set_postal_addresses_folks_test_case_test_method, self);
#line 34 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return self;
#line 130 "set-postal-addresses.c"
}


SetPostalAddressesTests* set_postal_addresses_tests_new (void) {
#line 34 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return set_postal_addresses_tests_construct (TYPE_SET_POSTAL_ADDRESSES_TESTS);
#line 137 "set-postal-addresses.c"
}


void set_postal_addresses_tests_test_set_postal_addresses (SetPostalAddressesTests* self) {
	GMainLoop* _tmp0_ = NULL;
	GeeHashMap* c1 = NULL;
	GeeHashMap* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	TrackerTestBackend* _tmp4_ = NULL;
	FolksPostalAddress* pa = NULL;
	FolksPostalAddress* _tmp5_ = NULL;
	FolksPostalAddressFieldDetails* _tmp6_ = NULL;
	TrackerTestBackend* _tmp7_ = NULL;
	GMainLoop* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
#line 42 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (self != NULL);
#line 44 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 44 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 44 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self->priv->_main_loop = _tmp0_;
#line 45 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 45 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	c1 = _tmp1_;
#line 46 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp2_ = g_strdup ("persona #1");
#line 46 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 46 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self->priv->_persona_fullname = _tmp2_;
#line 48 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp3_ = self->priv->_persona_fullname;
#line 48 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	gee_abstract_map_set ((GeeAbstractMap*) c1, TRF_ONTOLOGY_DEFS_NCO_FULLNAME, _tmp3_);
#line 49 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp4_ = ((TrackerTestTestCase*) self)->tracker_backend;
#line 49 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	tracker_test_backend_add_contact (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TRACKER_TEST_TYPE_BACKEND, TrackerTestBackend), c1);
#line 51 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp5_ = folks_postal_address_new (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 51 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	pa = _tmp5_;
#line 53 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_po_box (pa, "12345");
#line 54 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_locality (pa, "locality");
#line 55 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_postal_code (pa, "code");
#line 56 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_street (pa, "some street");
#line 57 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_extension (pa, "some extension");
#line 58 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_country (pa, "some country");
#line 59 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_postal_address_set_region (pa, "some region");
#line 60 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp6_ = folks_postal_address_field_details_new (pa, NULL);
#line 60 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (self->priv->_postal_address_fd);
#line 60 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self->priv->_postal_address_fd = _tmp6_;
#line 62 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp7_ = ((TrackerTestTestCase*) self)->tracker_backend;
#line 62 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	tracker_test_backend_set_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TRACKER_TEST_TYPE_BACKEND, TrackerTestBackend));
#line 64 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self->priv->_postal_address_found = FALSE;
#line 66 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_set_postal_addresses_tests_test_set_postal_addresses_async (self, NULL, NULL);
#line 68 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp8_ = self->priv->_main_loop;
#line 68 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_test_utils_loop_run_with_timeout (_tmp8_, 5);
#line 70 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp9_ = self->priv->_postal_address_found;
#line 70 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_vala_assert (_tmp9_, "this._postal_address_found");
#line 42 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (pa);
#line 42 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (c1);
#line 224 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_test_set_postal_addresses_async_data_free (gpointer _data) {
	SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_;
	_data_ = _data;
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (_data_->self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_slice_free (SetPostalAddressesTestsTestSetPostalAddressesAsyncData, _data_);
#line 235 "set-postal-addresses.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return self ? g_object_ref (self) : NULL;
#line 242 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_test_set_postal_addresses_async (SetPostalAddressesTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_;
	SetPostalAddressesTests* _tmp0_ = NULL;
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_ = g_slice_new0 (SetPostalAddressesTestsTestSetPostalAddressesAsyncData);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _set_postal_addresses_tests_test_set_postal_addresses_async);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _set_postal_addresses_tests_test_set_postal_addresses_async_data_free);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->self = _tmp0_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_set_postal_addresses_tests_test_set_postal_addresses_async_co (_data_);
#line 261 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_test_set_postal_addresses_finish (SetPostalAddressesTests* self, GAsyncResult* _res_) {
	SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_;
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 269 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_test_set_postal_addresses_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_ = _user_data_;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_source_object_ = source_object;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_res_ = _res_;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_set_postal_addresses_tests_test_set_postal_addresses_async_co (_data_);
#line 283 "set-postal-addresses.c"
}


static void __set_postal_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed (FolksIndividualAggregator* _sender, GeeMultiMap* changes, gpointer self) {
#line 78 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_set_postal_addresses_tests_individuals_changed_cb (self, changes);
#line 290 "set-postal-addresses.c"
}


static gboolean _set_postal_addresses_tests_test_set_postal_addresses_async_co (SetPostalAddressesTestsTestSetPostalAddressesAsyncData* _data_) {
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	switch (_data_->_state_) {
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		case 0:
#line 299 "set-postal-addresses.c"
		goto _state_0;
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		case 1:
#line 303 "set-postal-addresses.c"
		goto _state_1;
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		case 2:
#line 307 "set-postal-addresses.c"
		goto _state_2;
		default:
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_assert_not_reached ();
#line 312 "set-postal-addresses.c"
	}
	_state_0:
#line 75 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp0_ = NULL;
#line 75 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp0_ = folks_backend_store_dup ();
#line 75 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->store = _data_->_tmp0_;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_state_ = 1;
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_backend_store_prepare (_data_->store, _set_postal_addresses_tests_test_set_postal_addresses_async_ready, _data_);
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return FALSE;
#line 327 "set-postal-addresses.c"
	_state_1:
#line 76 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
#line 77 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp1_ = NULL;
#line 77 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp1_ = folks_individual_aggregator_dup ();
#line 77 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (_data_->self->priv->_aggregator);
#line 77 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->self->priv->_aggregator = _data_->_tmp1_;
#line 78 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp2_ = NULL;
#line 78 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_data_->_tmp2_ = _data_->self->priv->_aggregator;
#line 78 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_signal_connect_object (_data_->_tmp2_, "individuals-changed-detailed", (GCallback) __set_postal_addresses_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed_detailed, _data_->self, 0);
#line 345 "set-postal-addresses.c"
	{
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp3_ = NULL;
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_state_ = 2;
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		folks_individual_aggregator_prepare (_data_->_tmp3_, _set_postal_addresses_tests_test_set_postal_addresses_async_ready, _data_);
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		return FALSE;
#line 357 "set-postal-addresses.c"
		_state_2:
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		folks_individual_aggregator_prepare_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error_);
#line 82 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		if (_data_->_inner_error_ != NULL) {
#line 363 "set-postal-addresses.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->e = _data_->_inner_error_;
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_inner_error_ = NULL;
#line 86 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp4_ = NULL;
#line 86 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp4_ = _data_->e;
#line 86 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp5_ = NULL;
#line 86 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_data_->_tmp5_ = _data_->_tmp4_->message;
#line 86 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_warning ("set-postal-addresses.vala:86: Error when calling prepare: %s\n", _data_->_tmp5_);
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_g_error_free0 (_data_->e);
#line 386 "set-postal-addresses.c"
	}
	__finally0:
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	if (_data_->_inner_error_ != NULL) {
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_g_object_unref0 (_data_->store);
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_clear_error (&_data_->_inner_error_);
#line 80 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		return FALSE;
#line 399 "set-postal-addresses.c"
	}
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (_data_->store);
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	if (_data_->_state_ == 0) {
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 407 "set-postal-addresses.c"
	} else {
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 411 "set-postal-addresses.c"
	}
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_object_unref (_data_->_async_result);
#line 73 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return FALSE;
#line 417 "set-postal-addresses.c"
}


static void __set_postal_addresses_tests_notify_postal_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 102 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_set_postal_addresses_tests_notify_postal_cb (self, _sender, pspec);
#line 424 "set-postal-addresses.c"
}


static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = folks_abstract_field_details_hash_static (v);
#line 104 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return result;
#line 433 "set-postal-addresses.c"
}


static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gboolean result;
	result = folks_abstract_field_details_equal_static (a, b);
#line 104 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return result;
#line 442 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_individuals_changed_cb (SetPostalAddressesTests* self, GeeMultiMap* changes) {
	GeeCollection* added = NULL;
	GeeMultiMap* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeSet* removed = NULL;
	GeeMultiMap* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp74_ = NULL;
	gint _tmp75_ = 0;
	gint _tmp76_ = 0;
#line 90 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (self != NULL);
#line 90 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (changes != NULL);
#line 93 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp0_ = changes;
#line 93 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp1_ = gee_multi_map_get_values (_tmp0_);
#line 93 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	added = _tmp1_;
#line 94 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp2_ = changes;
#line 94 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp3_ = gee_multi_map_get_keys (_tmp2_);
#line 94 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	removed = _tmp3_;
#line 472 "set-postal-addresses.c"
	{
		GeeIterator* _i_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_tmp4_ = added;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_i_it = _tmp5_;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		while (TRUE) {
#line 485 "set-postal-addresses.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			FolksIndividual* _tmp10_ = NULL;
			FolksIndividual* _tmp11_ = NULL;
			const gchar* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp6_ = _i_it;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			if (!_tmp7_) {
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				break;
#line 504 "set-postal-addresses.c"
			}
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp8_ = _i_it;
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			i = (FolksIndividual*) _tmp9_;
#line 98 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp10_ = i;
#line 98 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_vala_assert (_tmp10_ != NULL, "i != null");
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp11_ = i;
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp12_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp11_);
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp13_ = _tmp12_;
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp14_ = self->priv->_persona_fullname;
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			if (g_strcmp0 (_tmp13_, _tmp14_) == 0) {
#line 526 "set-postal-addresses.c"
				FolksIndividual* _tmp15_ = NULL;
				GeeHashSet* addresses = NULL;
				GeeHashSet* _tmp16_ = NULL;
				FolksPostalAddress* pa = NULL;
				FolksPostalAddress* _tmp17_ = NULL;
				FolksPostalAddress* _tmp18_ = NULL;
				FolksPostalAddressFieldDetails* _tmp19_ = NULL;
				gconstpointer _tmp20_ = NULL;
				FolksPostalAddress* _tmp21_ = NULL;
				const gchar* _tmp22_ = NULL;
				const gchar* _tmp23_ = NULL;
				FolksPostalAddress* _tmp24_ = NULL;
				FolksPostalAddressFieldDetails* _tmp25_ = NULL;
				gconstpointer _tmp26_ = NULL;
				FolksPostalAddress* _tmp27_ = NULL;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_ = NULL;
				FolksPostalAddress* _tmp30_ = NULL;
				FolksPostalAddressFieldDetails* _tmp31_ = NULL;
				gconstpointer _tmp32_ = NULL;
				FolksPostalAddress* _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				const gchar* _tmp35_ = NULL;
				FolksPostalAddress* _tmp36_ = NULL;
				FolksPostalAddressFieldDetails* _tmp37_ = NULL;
				gconstpointer _tmp38_ = NULL;
				FolksPostalAddress* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				const gchar* _tmp41_ = NULL;
				FolksPostalAddress* _tmp42_ = NULL;
				FolksPostalAddressFieldDetails* _tmp43_ = NULL;
				gconstpointer _tmp44_ = NULL;
				FolksPostalAddress* _tmp45_ = NULL;
				const gchar* _tmp46_ = NULL;
				const gchar* _tmp47_ = NULL;
				FolksPostalAddress* _tmp48_ = NULL;
				FolksPostalAddressFieldDetails* _tmp49_ = NULL;
				gconstpointer _tmp50_ = NULL;
				FolksPostalAddress* _tmp51_ = NULL;
				const gchar* _tmp52_ = NULL;
				const gchar* _tmp53_ = NULL;
				FolksPostalAddress* _tmp54_ = NULL;
				FolksPostalAddressFieldDetails* _tmp55_ = NULL;
				gconstpointer _tmp56_ = NULL;
				FolksPostalAddress* _tmp57_ = NULL;
				const gchar* _tmp58_ = NULL;
				const gchar* _tmp59_ = NULL;
				FolksPostalAddressFieldDetails* pafd = NULL;
				FolksPostalAddress* _tmp60_ = NULL;
				FolksPostalAddressFieldDetails* _tmp61_ = NULL;
				GeeHashSet* _tmp62_ = NULL;
				FolksPostalAddressFieldDetails* _tmp63_ = NULL;
#line 102 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp15_ = i;
#line 102 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				g_signal_connect_object ((GObject*) _tmp15_, "notify::postal-addresses", (GCallback) __set_postal_addresses_tests_notify_postal_cb_g_object_notify, self, 0);
#line 104 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp16_ = gee_hash_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
#line 104 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				addresses = _tmp16_;
#line 107 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp17_ = folks_postal_address_new (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 107 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				pa = _tmp17_;
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp18_ = pa;
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp19_ = self->priv->_postal_address_fd;
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp20_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp19_);
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp21_ = _tmp20_;
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp22_ = folks_postal_address_get_po_box ((FolksPostalAddress*) _tmp21_);
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp23_ = _tmp22_;
#line 109 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_po_box (_tmp18_, _tmp23_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp24_ = pa;
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp25_ = self->priv->_postal_address_fd;
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp26_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp25_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp27_ = _tmp26_;
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp28_ = folks_postal_address_get_locality ((FolksPostalAddress*) _tmp27_);
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp29_ = _tmp28_;
#line 110 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_locality (_tmp24_, _tmp29_);
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp30_ = pa;
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp31_ = self->priv->_postal_address_fd;
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp32_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp31_);
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp33_ = _tmp32_;
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp34_ = folks_postal_address_get_postal_code ((FolksPostalAddress*) _tmp33_);
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp35_ = _tmp34_;
#line 111 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_postal_code (_tmp30_, _tmp35_);
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp36_ = pa;
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp37_ = self->priv->_postal_address_fd;
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp38_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp37_);
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp39_ = _tmp38_;
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp40_ = folks_postal_address_get_street ((FolksPostalAddress*) _tmp39_);
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp41_ = _tmp40_;
#line 112 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_street (_tmp36_, _tmp41_);
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp42_ = pa;
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp43_ = self->priv->_postal_address_fd;
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp44_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp43_);
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp45_ = _tmp44_;
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp46_ = folks_postal_address_get_extension ((FolksPostalAddress*) _tmp45_);
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp47_ = _tmp46_;
#line 113 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_extension (_tmp42_, _tmp47_);
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp48_ = pa;
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp49_ = self->priv->_postal_address_fd;
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp50_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp49_);
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp51_ = _tmp50_;
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp52_ = folks_postal_address_get_country ((FolksPostalAddress*) _tmp51_);
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp53_ = _tmp52_;
#line 114 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_country (_tmp48_, _tmp53_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp54_ = pa;
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp55_ = self->priv->_postal_address_fd;
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp56_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp55_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp57_ = _tmp56_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp58_ = folks_postal_address_get_region ((FolksPostalAddress*) _tmp57_);
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp59_ = _tmp58_;
#line 115 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_postal_address_set_region (_tmp54_, _tmp59_);
#line 116 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp60_ = pa;
#line 116 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp61_ = folks_postal_address_field_details_new (_tmp60_, NULL);
#line 116 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				pafd = _tmp61_;
#line 118 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp62_ = addresses;
#line 118 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp63_ = pafd;
#line 118 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp62_, _tmp63_);
#line 701 "set-postal-addresses.c"
				{
					GeeIterator* _p_it = NULL;
					FolksIndividual* _tmp64_ = NULL;
					GeeSet* _tmp65_ = NULL;
					GeeSet* _tmp66_ = NULL;
					GeeIterator* _tmp67_ = NULL;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_tmp64_ = i;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_tmp65_ = folks_individual_get_personas (_tmp64_);
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_tmp66_ = _tmp65_;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_tmp67_ = gee_iterable_iterator ((GeeIterable*) _tmp66_);
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_p_it = _tmp67_;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					while (TRUE) {
#line 720 "set-postal-addresses.c"
						GeeIterator* _tmp68_ = NULL;
						gboolean _tmp69_ = FALSE;
						FolksPersona* p = NULL;
						GeeIterator* _tmp70_ = NULL;
						gpointer _tmp71_ = NULL;
						FolksPersona* _tmp72_ = NULL;
						GeeHashSet* _tmp73_ = NULL;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp68_ = _p_it;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp69_ = gee_iterator_next (_tmp68_);
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						if (!_tmp69_) {
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
							break;
#line 736 "set-postal-addresses.c"
						}
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp70_ = _p_it;
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp71_ = gee_iterator_get (_tmp70_);
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						p = (FolksPersona*) _tmp71_;
#line 122 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp72_ = p;
#line 122 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_tmp73_ = addresses;
#line 122 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						folks_postal_address_details_set_postal_addresses (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS, FolksPostalAddressDetails), (GeeSet*) _tmp73_);
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
						_g_object_unref0 (p);
#line 752 "set-postal-addresses.c"
					}
#line 120 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_g_object_unref0 (_p_it);
#line 756 "set-postal-addresses.c"
				}
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_g_object_unref0 (pafd);
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_g_object_unref0 (pa);
#line 100 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_g_object_unref0 (addresses);
#line 764 "set-postal-addresses.c"
			}
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_g_object_unref0 (i);
#line 768 "set-postal-addresses.c"
		}
#line 96 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_g_object_unref0 (_i_it);
#line 772 "set-postal-addresses.c"
	}
#line 127 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp74_ = removed;
#line 127 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp75_ = gee_collection_get_size ((GeeCollection*) _tmp74_);
#line 127 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp76_ = _tmp75_;
#line 127 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_vala_assert (_tmp76_ == 1, "removed.size == 1");
#line 782 "set-postal-addresses.c"
	{
		GeeIterator* _i_it = NULL;
		GeeSet* _tmp77_ = NULL;
		GeeIterator* _tmp78_ = NULL;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_tmp77_ = removed;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_tmp78_ = gee_iterable_iterator ((GeeIterable*) _tmp77_);
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_i_it = _tmp78_;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		while (TRUE) {
#line 795 "set-postal-addresses.c"
			GeeIterator* _tmp79_ = NULL;
			gboolean _tmp80_ = FALSE;
			FolksIndividual* i = NULL;
			GeeIterator* _tmp81_ = NULL;
			gpointer _tmp82_ = NULL;
			FolksIndividual* _tmp83_ = NULL;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp79_ = _i_it;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp80_ = gee_iterator_next (_tmp79_);
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			if (!_tmp80_) {
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				break;
#line 810 "set-postal-addresses.c"
			}
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp81_ = _i_it;
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp82_ = gee_iterator_get (_tmp81_);
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			i = (FolksIndividual*) _tmp82_;
#line 131 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp83_ = i;
#line 131 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_vala_assert (_tmp83_ == NULL, "i == null");
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_g_object_unref0 (i);
#line 824 "set-postal-addresses.c"
		}
#line 129 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
		_g_object_unref0 (_i_it);
#line 828 "set-postal-addresses.c"
	}
#line 90 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (removed);
#line 90 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (added);
#line 834 "set-postal-addresses.c"
}


static void _set_postal_addresses_tests_notify_postal_cb (SetPostalAddressesTests* self, GObject* individual_obj, GParamSpec* ps) {
	FolksIndividual* i = NULL;
	GObject* _tmp0_ = NULL;
	FolksIndividual* _tmp1_ = NULL;
	FolksIndividual* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
#line 135 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (self != NULL);
#line 135 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (individual_obj != NULL);
#line 135 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_return_if_fail (ps != NULL);
#line 137 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp0_ = individual_obj;
#line 137 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, FOLKS_TYPE_INDIVIDUAL, FolksIndividual));
#line 137 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	i = _tmp1_;
#line 138 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp2_ = i;
#line 138 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp3_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp2_);
#line 138 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp4_ = _tmp3_;
#line 138 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp5_ = self->priv->_persona_fullname;
#line 138 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
#line 868 "set-postal-addresses.c"
		{
			GeeIterator* _pafd_it = NULL;
			FolksIndividual* _tmp6_ = NULL;
			GeeSet* _tmp7_ = NULL;
			GeeSet* _tmp8_ = NULL;
			GeeIterator* _tmp9_ = NULL;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp6_ = i;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp7_ = folks_postal_address_details_get_postal_addresses ((FolksPostalAddressDetails*) _tmp6_);
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp8_ = _tmp7_;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_);
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_pafd_it = _tmp9_;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			while (TRUE) {
#line 887 "set-postal-addresses.c"
				GeeIterator* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				FolksPostalAddressFieldDetails* pafd = NULL;
				GeeIterator* _tmp12_ = NULL;
				gpointer _tmp13_ = NULL;
				FolksPostalAddressFieldDetails* _tmp14_ = NULL;
				FolksPostalAddressFieldDetails* _tmp15_ = NULL;
				const gchar* _tmp16_ = NULL;
				const gchar* _tmp17_ = NULL;
				FolksPostalAddressFieldDetails* _tmp18_ = NULL;
				FolksPostalAddressFieldDetails* _tmp19_ = NULL;
				gboolean _tmp20_ = FALSE;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp10_ = _pafd_it;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp11_ = gee_iterator_next (_tmp10_);
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				if (!_tmp11_) {
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					break;
#line 908 "set-postal-addresses.c"
				}
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp12_ = _pafd_it;
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp13_ = gee_iterator_get (_tmp12_);
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				pafd = (FolksPostalAddressFieldDetails*) _tmp13_;
#line 143 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp14_ = self->priv->_postal_address_fd;
#line 143 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp15_ = pafd;
#line 143 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp16_ = folks_abstract_field_details_get_id ((FolksAbstractFieldDetails*) _tmp15_);
#line 143 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp17_ = _tmp16_;
#line 143 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				folks_abstract_field_details_set_id ((FolksAbstractFieldDetails*) _tmp14_, _tmp17_);
#line 144 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp18_ = pafd;
#line 144 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp19_ = self->priv->_postal_address_fd;
#line 144 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_tmp20_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _tmp18_, (FolksAbstractFieldDetails*) _tmp19_);
#line 144 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				if (_tmp20_) {
#line 934 "set-postal-addresses.c"
					GMainLoop* _tmp21_ = NULL;
#line 146 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					self->priv->_postal_address_found = TRUE;
#line 147 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					_tmp21_ = self->priv->_main_loop;
#line 147 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
					g_main_loop_quit (_tmp21_);
#line 942 "set-postal-addresses.c"
				}
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
				_g_object_unref0 (pafd);
#line 946 "set-postal-addresses.c"
			}
#line 140 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
			_g_object_unref0 (_pafd_it);
#line 950 "set-postal-addresses.c"
		}
	}
#line 135 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (i);
#line 955 "set-postal-addresses.c"
}


static void set_postal_addresses_tests_class_init (SetPostalAddressesTestsClass * klass) {
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	set_postal_addresses_tests_parent_class = g_type_class_peek_parent (klass);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_type_class_add_private (klass, sizeof (SetPostalAddressesTestsPrivate));
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	G_OBJECT_CLASS (klass)->finalize = set_postal_addresses_tests_finalize;
#line 966 "set-postal-addresses.c"
}


static void set_postal_addresses_tests_instance_init (SetPostalAddressesTests * self) {
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self->priv = SET_POSTAL_ADDRESSES_TESTS_GET_PRIVATE (self);
#line 973 "set-postal-addresses.c"
}


static void set_postal_addresses_tests_finalize (GObject* obj) {
	SetPostalAddressesTests * self;
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_POSTAL_ADDRESSES_TESTS, SetPostalAddressesTests);
#line 28 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_main_loop_unref0 (self->priv->_main_loop);
#line 29 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (self->priv->_aggregator);
#line 30 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_free0 (self->priv->_persona_fullname);
#line 32 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (self->priv->_postal_address_fd);
#line 26 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	G_OBJECT_CLASS (set_postal_addresses_tests_parent_class)->finalize (obj);
#line 991 "set-postal-addresses.c"
}


GType set_postal_addresses_tests_get_type (void) {
	static volatile gsize set_postal_addresses_tests_type_id__volatile = 0;
	if (g_once_init_enter (&set_postal_addresses_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetPostalAddressesTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_postal_addresses_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetPostalAddressesTests), 0, (GInstanceInitFunc) set_postal_addresses_tests_instance_init, NULL };
		GType set_postal_addresses_tests_type_id;
		set_postal_addresses_tests_type_id = g_type_register_static (TRACKER_TEST_TYPE_TEST_CASE, "SetPostalAddressesTests", &g_define_type_info, 0);
		g_once_init_leave (&set_postal_addresses_tests_type_id__volatile, set_postal_addresses_tests_type_id);
	}
	return set_postal_addresses_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	SetPostalAddressesTests* tests = NULL;
	SetPostalAddressesTests* _tmp0_ = NULL;
#line 156 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_test_init (&args_length1, &args, NULL);
#line 158 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_tmp0_ = set_postal_addresses_tests_new ();
#line 158 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	tests = _tmp0_;
#line 159 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 160 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_test_run ();
#line 161 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 163 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	result = 0;
#line 163 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	_g_object_unref0 (tests);
#line 163 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return result;
#line 1029 "set-postal-addresses.c"
}


int main (int argc, char ** argv) {
#line 154 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	g_type_init ();
#line 154 "/home/treitter/collabora/folks/tests/tracker/set-postal-addresses.vala"
	return _vala_main (argv, argc);
#line 1038 "set-postal-addresses.c"
}



