/* utils.c generated by valac 0.13.1.106-1068, 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) {
	utils_tests_test_multi_map_equality (self);
}


UtilsTests* utils_tests_construct (GType object_type) {
	UtilsTests * self = NULL;
	self = (UtilsTests*) folks_test_case_construct (object_type, "Utils");
	folks_test_case_add_test ((FolksTestCase*) self, "MultiMap equality", _utils_tests_test_multi_map_equality_folks_test_case_test_method, self);
	return self;
}


UtilsTests* utils_tests_new (void) {
	return utils_tests_construct (TYPE_UTILS_TESTS);
}


static void utils_tests_real_set_up (FolksTestCase* base) {
	UtilsTests * self;
	self = (UtilsTests*) base;
}


static void utils_tests_real_tear_down (FolksTestCase* base) {
	UtilsTests * self;
	self = (UtilsTests*) base;
}


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;
	GeeHashMultiMap* _tmp4_;
	GeeHashMultiMap* _tmp5_;
	GeeHashMultiMap* _tmp6_;
	GeeHashMultiMap* _tmp7_;
	GeeHashMultiMap* _tmp8_;
	GeeHashMultiMap* _tmp9_;
	GeeHashMultiMap* _tmp10_;
	GeeHashMultiMap* _tmp11_;
	GeeHashMultiMap* _tmp12_;
	GeeHashMultiMap* _tmp13_;
	GeeHashMultiMap* _tmp14_;
	GeeHashMultiMap* _tmp15_;
	gboolean _tmp16_ = FALSE;
	GeeHashMultiMap* _tmp17_;
	GeeHashMultiMap* _tmp18_;
	gboolean _tmp19_ = FALSE;
	GeeHashMultiMap* _tmp20_;
	GeeHashMultiMap* _tmp21_;
	gboolean _tmp22_ = FALSE;
	GeeHashMultiMap* _tmp23_;
	GeeHashMultiMap* _tmp24_;
	gboolean _tmp25_ = FALSE;
	GeeHashMultiMap* _tmp26_;
	GeeHashMultiMap* _tmp27_;
	gboolean _tmp28_ = FALSE;
	g_return_if_fail (self != NULL);
	_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);
	a_1 = _tmp0_;
	_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);
	a_2 = _tmp1_;
	_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);
	a_1_subset = _tmp2_;
	_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);
	b_1 = _tmp3_;
	_tmp4_ = a_1;
	gee_multi_map_set ((GeeMultiMap*) _tmp4_, "foo", "bar");
	_tmp5_ = a_1;
	gee_multi_map_set ((GeeMultiMap*) _tmp5_, "foo", "qux");
	_tmp6_ = a_1;
	gee_multi_map_set ((GeeMultiMap*) _tmp6_, "baz", "quux");
	_tmp7_ = a_2;
	gee_multi_map_set ((GeeMultiMap*) _tmp7_, "foo", "bar");
	_tmp8_ = a_2;
	gee_multi_map_set ((GeeMultiMap*) _tmp8_, "foo", "qux");
	_tmp9_ = a_2;
	gee_multi_map_set ((GeeMultiMap*) _tmp9_, "baz", "quux");
	_tmp10_ = a_1_subset;
	gee_multi_map_set ((GeeMultiMap*) _tmp10_, "foo", "bar");
	_tmp11_ = a_1_subset;
	gee_multi_map_set ((GeeMultiMap*) _tmp11_, "foo", "qux");
	_tmp12_ = b_1;
	gee_multi_map_set ((GeeMultiMap*) _tmp12_, "not", "at");
	_tmp13_ = b_1;
	gee_multi_map_set ((GeeMultiMap*) _tmp13_, "all", "related");
	_tmp14_ = a_1;
	_tmp15_ = a_1;
	_tmp16_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) _tmp14_, (GeeMultiMap*) _tmp15_);
	g_assert (_tmp16_);
	_tmp17_ = a_1;
	_tmp18_ = a_2;
	_tmp19_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) _tmp17_, (GeeMultiMap*) _tmp18_);
	g_assert (_tmp19_);
	_tmp20_ = a_2;
	_tmp21_ = a_1;
	_tmp22_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) _tmp20_, (GeeMultiMap*) _tmp21_);
	g_assert (_tmp22_);
	_tmp23_ = a_1;
	_tmp24_ = a_1_subset;
	_tmp25_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) _tmp23_, (GeeMultiMap*) _tmp24_);
	g_assert (!_tmp25_);
	_tmp26_ = a_1;
	_tmp27_ = b_1;
	_tmp28_ = folks_utils_multi_map_str_str_equal ((GeeMultiMap*) _tmp26_, (GeeMultiMap*) _tmp27_);
	g_assert (!_tmp28_);
	_g_object_unref0 (b_1);
	_g_object_unref0 (a_1_subset);
	_g_object_unref0 (a_2);
	_g_object_unref0 (a_1);
}


static void utils_tests_class_init (UtilsTestsClass * klass) {
	utils_tests_parent_class = g_type_class_peek_parent (klass);
	FOLKS_TEST_CASE_CLASS (klass)->set_up = utils_tests_real_set_up;
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = utils_tests_real_tear_down;
}


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;
	GTestSuite* _tmp1_;
	UtilsTests* _tmp2_;
	UtilsTests* _tmp3_;
	GTestSuite* _tmp4_ = NULL;
	g_test_init (&args_length1, &args, NULL);
	_tmp0_ = g_test_get_root ();
	root = _tmp0_;
	_tmp1_ = root;
	_tmp2_ = utils_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);
}



