/* utils.c generated by valac 0.14.0.15-f8b5, the Vala compiler
 * generated from utils.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: Travis Reitter <travis.reitter@collabora.co.uk>
 */

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


#define TYPE_UTILS_TESTS (utils_tests_get_type ())
#define UTILS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UTILS_TESTS, UtilsTests))
#define UTILS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UTILS_TESTS, UtilsTestsClass))
#define IS_UTILS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UTILS_TESTS))
#define IS_UTILS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UTILS_TESTS))
#define UTILS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UTILS_TESTS, UtilsTestsClass))

typedef struct _UtilsTests UtilsTests;
typedef struct _UtilsTestsClass UtilsTestsClass;
typedef struct _UtilsTestsPrivate UtilsTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _UtilsTests {
	FolksTestCase parent_instance;
	UtilsTestsPrivate * priv;
};

struct _UtilsTestsClass {
	FolksTestCaseClass parent_class;
};


static gpointer utils_tests_parent_class = NULL;

GType utils_tests_get_type (void) G_GNUC_CONST;
enum  {
	UTILS_TESTS_DUMMY_PROPERTY
};
UtilsTests* utils_tests_new (void);
UtilsTests* utils_tests_construct (GType object_type);
void utils_tests_test_multi_map_equality (UtilsTests* self);
static void _utils_tests_test_multi_map_equality_folks_test_case_test_method (gpointer self);
static void utils_tests_real_set_up (FolksTestCase* base);
static void utils_tests_real_tear_down (FolksTestCase* base);
gint _vala_main (gchar** args, int args_length1);


static void _utils_tests_test_multi_map_equality_folks_test_case_test_method (gpointer self) {
#line 28 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	utils_tests_test_multi_map_equality (self);
#line 73 "utils.c"
}


UtilsTests* utils_tests_construct (GType object_type) {
	UtilsTests * self = NULL;
#line 27 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	self = (UtilsTests*) folks_test_case_construct (object_type, "Utils");
#line 28 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "MultiMap equality", _utils_tests_test_multi_map_equality_folks_test_case_test_method, self);
#line 25 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	return self;
#line 85 "utils.c"
}


UtilsTests* utils_tests_new (void) {
#line 25 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	return utils_tests_construct (TYPE_UTILS_TESTS);
#line 92 "utils.c"
}


static void utils_tests_real_set_up (FolksTestCase* base) {
	UtilsTests * self;
#line 31 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	self = (UtilsTests*) base;
#line 100 "utils.c"
}


static void utils_tests_real_tear_down (FolksTestCase* base) {
	UtilsTests * self;
#line 35 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	self = (UtilsTests*) base;
#line 108 "utils.c"
}


void utils_tests_test_multi_map_equality (UtilsTests* self) {
	GeeHashMultiMap* _tmp0_;
	GeeHashMultiMap* a_1;
	GeeHashMultiMap* _tmp1_;
	GeeHashMultiMap* a_2;
	GeeHashMultiMap* _tmp2_;
	GeeHashMultiMap* a_1_subset;
	GeeHashMultiMap* _tmp3_;
	GeeHashMultiMap* b_1;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
#line 39 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_return_if_fail (self != NULL);
#line 41 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
#line 41 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	a_1 = _tmp0_;
#line 42 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp1_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
#line 42 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	a_2 = _tmp1_;
#line 43 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp2_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
#line 43 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	a_1_subset = _tmp2_;
#line 44 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp3_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
#line 44 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	b_1 = _tmp3_;
#line 46 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "foo", "bar");
#line 47 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "foo", "qux");
#line 48 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "baz", "quux");
#line 50 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "foo", "bar");
#line 51 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "foo", "qux");
#line 52 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "baz", "quux");
#line 54 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1_subset, "foo", "bar");
#line 55 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1_subset, "foo", "qux");
#line 57 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) b_1, "not", "at");
#line 58 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) b_1, "all", "related");
#line 60 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp4_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_1);
#line 60 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_assert (_tmp4_);
#line 61 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp5_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_2);
#line 61 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_assert (_tmp5_);
#line 62 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp6_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_2, (GeeMultiMap*) a_1);
#line 62 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_assert (_tmp6_);
#line 63 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp7_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_1_subset);
#line 63 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_assert (!_tmp7_);
#line 64 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp8_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) b_1);
#line 64 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_assert (!_tmp8_);
#line 39 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_g_object_unref0 (b_1);
#line 39 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_1_subset);
#line 39 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_2);
#line 39 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_1);
#line 192 "utils.c"
}


static void utils_tests_class_init (UtilsTestsClass * klass) {
#line 23 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	utils_tests_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = utils_tests_real_set_up;
#line 23 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = utils_tests_real_tear_down;
#line 203 "utils.c"
}


static void utils_tests_instance_init (UtilsTests * self) {
}


GType utils_tests_get_type (void) {
	static volatile gsize utils_tests_type_id__volatile = 0;
	if (g_once_init_enter (&utils_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (UtilsTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) utils_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UtilsTests), 0, (GInstanceInitFunc) utils_tests_instance_init, NULL };
		GType utils_tests_type_id;
		utils_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "UtilsTests", &g_define_type_info, 0);
		g_once_init_leave (&utils_tests_type_id__volatile, utils_tests_type_id);
	}
	return utils_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	UtilsTests* _tmp1_;
	UtilsTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 70 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_test_init (&args_length1, &args, NULL);
#line 72 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp0_ = g_test_get_root ();
#line 72 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	root = _tmp0_;
#line 73 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp1_ = utils_tests_new ();
#line 73 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp2_ = _tmp1_;
#line 73 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 73 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 73 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	_g_object_unref0 (_tmp2_);
#line 75 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_test_run ();
#line 77 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	result = 0;
#line 77 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	return result;
#line 252 "utils.c"
}


int main (int argc, char ** argv) {
#line 68 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	g_type_init ();
#line 68 "/home/treitter/collabora/folks/tests/folks/utils.vala"
	return _vala_main (argv, argc);
#line 261 "utils.c"
}



