/* utils.c generated by valac 0.24.0.16-c045, 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)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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);
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 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	utils_tests_test_multi_map_equality ((UtilsTests*) self);
#line 72 "utils.c"
}


UtilsTests* utils_tests_construct (GType object_type) {
	UtilsTests * self = NULL;
#line 27 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	self = (UtilsTests*) folks_test_case_construct (object_type, "Utils");
#line 28 "/opt/gnome3/source/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 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	return self;
#line 84 "utils.c"
}


UtilsTests* utils_tests_new (void) {
#line 25 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	return utils_tests_construct (TYPE_UTILS_TESTS);
#line 91 "utils.c"
}


void utils_tests_test_multi_map_equality (UtilsTests* self) {
	GeeHashMultiMap* a_1 = NULL;
	GeeHashMultiMap* _tmp0_ = NULL;
	GeeHashMultiMap* a_2 = NULL;
	GeeHashMultiMap* _tmp1_ = NULL;
	GeeHashMultiMap* a_1_subset = NULL;
	GeeHashMultiMap* _tmp2_ = NULL;
	GeeHashMultiMap* b_1 = NULL;
	GeeHashMultiMap* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
#line 31 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	g_return_if_fail (self != NULL);
#line 33 "/opt/gnome3/source/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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 33 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	a_1 = _tmp0_;
#line 34 "/opt/gnome3/source/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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 34 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	a_2 = _tmp1_;
#line 35 "/opt/gnome3/source/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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 35 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	a_1_subset = _tmp2_;
#line 36 "/opt/gnome3/source/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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 36 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	b_1 = _tmp3_;
#line 38 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "foo", "bar");
#line 39 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "foo", "qux");
#line 40 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1, "baz", "quux");
#line 42 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "foo", "bar");
#line 43 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "foo", "qux");
#line 44 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_2, "baz", "quux");
#line 46 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1_subset, "foo", "bar");
#line 47 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) a_1_subset, "foo", "qux");
#line 49 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) b_1, "not", "at");
#line 50 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	gee_multi_map_set ((GeeMultiMap*) b_1, "all", "related");
#line 52 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp4_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_1);
#line 52 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_vala_assert (_tmp4_, "Utils.multi_map_str_str_equal (a_1, a_1)");
#line 53 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp5_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_2);
#line 53 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_vala_assert (_tmp5_, "Utils.multi_map_str_str_equal (a_1, a_2)");
#line 54 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp6_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_2, (GeeMultiMap*) a_1);
#line 54 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_vala_assert (_tmp6_, "Utils.multi_map_str_str_equal (a_2, a_1)");
#line 55 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp7_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) a_1_subset);
#line 55 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_vala_assert (!_tmp7_, "!Utils.multi_map_str_str_equal (a_1, a_1_subset)");
#line 56 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp8_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) a_1, (GeeMultiMap*) b_1);
#line 56 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_vala_assert (!_tmp8_, "!Utils.multi_map_str_str_equal (a_1, b_1)");
#line 31 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_g_object_unref0 (b_1);
#line 31 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_1_subset);
#line 31 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_2);
#line 31 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_g_object_unref0 (a_1);
#line 175 "utils.c"
}


static void utils_tests_class_init (UtilsTestsClass * klass) {
#line 23 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	utils_tests_parent_class = g_type_class_peek_parent (klass);
#line 182 "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;
	UtilsTests* tests = NULL;
	UtilsTests* _tmp0_ = NULL;
#line 62 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	g_test_init (&args_length1, &args, NULL);
#line 64 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_tmp0_ = utils_tests_new ();
#line 64 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	tests = _tmp0_;
#line 65 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	folks_test_case_register ((FolksTestCase*) tests);
#line 66 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	g_test_run ();
#line 67 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	folks_test_case_final_tear_down ((FolksTestCase*) tests);
#line 69 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	result = 0;
#line 69 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	_g_object_unref0 (tests);
#line 69 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	return result;
#line 224 "utils.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 60 "/opt/gnome3/source/folks/tests/folks/utils.vala"
	return _vala_main (argv, argc);
#line 234 "utils.c"
}



