/* testhashmultimap.c generated by valac 0.52.0, the Vala compiler
 * generated from testhashmultimap.vala, do not modify */

/* testhashmultimap.vala
 *
 * Copyright (C) 2008  Jürg Billeter
 * Copyright (C) 2009  Didier Villevalois, Julien Peeters
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Jürg Billeter <j@bitron.ch>
 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
 * 	Julien Peeters <contact@julienpeeters.fr>
 */

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

#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))

typedef struct _GeeTestCase GeeTestCase;
typedef struct _GeeTestCaseClass GeeTestCaseClass;
typedef struct _GeeTestCasePrivate GeeTestCasePrivate;

#define TYPE_MULTI_MAP_TESTS (multi_map_tests_get_type ())
#define MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTI_MAP_TESTS, MultiMapTests))
#define MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTI_MAP_TESTS, MultiMapTestsClass))
#define IS_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTI_MAP_TESTS))
#define IS_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTI_MAP_TESTS))
#define MULTI_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTI_MAP_TESTS, MultiMapTestsClass))

typedef struct _MultiMapTests MultiMapTests;
typedef struct _MultiMapTestsClass MultiMapTestsClass;
typedef struct _MultiMapTestsPrivate MultiMapTestsPrivate;

#define TYPE_HASH_MULTI_MAP_TESTS (hash_multi_map_tests_get_type ())
#define HASH_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HASH_MULTI_MAP_TESTS, HashMultiMapTests))
#define HASH_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HASH_MULTI_MAP_TESTS, HashMultiMapTestsClass))
#define IS_HASH_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HASH_MULTI_MAP_TESTS))
#define IS_HASH_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HASH_MULTI_MAP_TESTS))
#define HASH_MULTI_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HASH_MULTI_MAP_TESTS, HashMultiMapTestsClass))

typedef struct _HashMultiMapTests HashMultiMapTests;
typedef struct _HashMultiMapTestsClass HashMultiMapTestsClass;
typedef struct _HashMultiMapTestsPrivate HashMultiMapTestsPrivate;
enum  {
	HASH_MULTI_MAP_TESTS_0_PROPERTY,
	HASH_MULTI_MAP_TESTS_NUM_PROPERTIES
};
static GParamSpec* hash_multi_map_tests_properties[HASH_MULTI_MAP_TESTS_NUM_PROPERTIES];
typedef void (*GeeTestCaseTestMethod) (gpointer user_data);
#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);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GeeTestCase {
	GObject parent_instance;
	GeeTestCasePrivate * priv;
};

struct _GeeTestCaseClass {
	GObjectClass parent_class;
	void (*set_up) (GeeTestCase* self);
	void (*tear_down) (GeeTestCase* self);
};

struct _MultiMapTests {
	GeeTestCase parent_instance;
	MultiMapTestsPrivate * priv;
	GeeMultiMap* test_multi_map;
};

struct _MultiMapTestsClass {
	GeeTestCaseClass parent_class;
};

struct _HashMultiMapTests {
	MultiMapTests parent_instance;
	HashMultiMapTestsPrivate * priv;
};

struct _HashMultiMapTestsClass {
	MultiMapTestsClass parent_class;
};

static gpointer hash_multi_map_tests_parent_class = NULL;

GType gee_test_case_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCase, g_object_unref)
GType multi_map_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MultiMapTests, g_object_unref)
GType hash_multi_map_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (HashMultiMapTests, g_object_unref)
void gee_test_case_set_up (GeeTestCase* self);
void gee_test_case_tear_down (GeeTestCase* self);
HashMultiMapTests* hash_multi_map_tests_new (void);
HashMultiMapTests* hash_multi_map_tests_construct (GType object_type);
MultiMapTests* multi_map_tests_construct (GType object_type,
                                          const gchar* name);
void gee_test_case_add_test (GeeTestCase* self,
                             const gchar* name,
                             GeeTestCaseTestMethod test,
                             gpointer test_target,
                             GDestroyNotify test_target_destroy_notify);
static void hash_multi_map_tests_test_selected_functions (HashMultiMapTests* self);
static void _hash_multi_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void hash_multi_map_tests_real_set_up (GeeTestCase* base);
static void hash_multi_map_tests_real_tear_down (GeeTestCase* base);
static GType hash_multi_map_tests_get_type_once (void);

static void
_hash_multi_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self)
{
	hash_multi_map_tests_test_selected_functions ((HashMultiMapTests*) self);
}

HashMultiMapTests*
hash_multi_map_tests_construct (GType object_type)
{
	HashMultiMapTests * self = NULL;
	self = (HashMultiMapTests*) multi_map_tests_construct (object_type, "HashMultiMap");
	gee_test_case_add_test ((GeeTestCase*) self, "[HashMultiMap] selected functions", _hash_multi_map_tests_test_selected_functions_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	return self;
}

HashMultiMapTests*
hash_multi_map_tests_new (void)
{
	return hash_multi_map_tests_construct (TYPE_HASH_MULTI_MAP_TESTS);
}

static void
hash_multi_map_tests_real_set_up (GeeTestCase* base)
{
	HashMultiMapTests * self;
	GeeHashMultiMap* _tmp0_;
	self = (HashMultiMapTests*) base;
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
	((MultiMapTests*) self)->test_multi_map = (GeeMultiMap*) _tmp0_;
}

static void
hash_multi_map_tests_real_tear_down (GeeTestCase* base)
{
	HashMultiMapTests * self;
	self = (HashMultiMapTests*) base;
	_g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
	((MultiMapTests*) self)->test_multi_map = NULL;
}

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

static void
hash_multi_map_tests_test_selected_functions (HashMultiMapTests* self)
{
	GeeHashMultiMap* test_hash_multi_map = NULL;
	GeeMultiMap* _tmp0_;
	GeeHashMultiMap* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((MultiMapTests*) self)->test_multi_map;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_MULTI_MAP) ? ((GeeHashMultiMap*) _tmp0_) : NULL);
	test_hash_multi_map = _tmp1_;
	_vala_assert (test_hash_multi_map != NULL, "test_hash_multi_map != null");
	_g_object_unref0 (test_hash_multi_map);
}

static void
hash_multi_map_tests_class_init (HashMultiMapTestsClass * klass,
                                 gpointer klass_data)
{
	hash_multi_map_tests_parent_class = g_type_class_peek_parent (klass);
	((GeeTestCaseClass *) klass)->set_up = (void (*) (GeeTestCase*)) hash_multi_map_tests_real_set_up;
	((GeeTestCaseClass *) klass)->tear_down = (void (*) (GeeTestCase*)) hash_multi_map_tests_real_tear_down;
}

static void
hash_multi_map_tests_instance_init (HashMultiMapTests * self,
                                    gpointer klass)
{
}

static GType
hash_multi_map_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (HashMultiMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) hash_multi_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HashMultiMapTests), 0, (GInstanceInitFunc) hash_multi_map_tests_instance_init, NULL };
	GType hash_multi_map_tests_type_id;
	hash_multi_map_tests_type_id = g_type_register_static (TYPE_MULTI_MAP_TESTS, "HashMultiMapTests", &g_define_type_info, 0);
	return hash_multi_map_tests_type_id;
}

GType
hash_multi_map_tests_get_type (void)
{
	static volatile gsize hash_multi_map_tests_type_id__volatile = 0;
	if (g_once_init_enter (&hash_multi_map_tests_type_id__volatile)) {
		GType hash_multi_map_tests_type_id;
		hash_multi_map_tests_type_id = hash_multi_map_tests_get_type_once ();
		g_once_init_leave (&hash_multi_map_tests_type_id__volatile, hash_multi_map_tests_type_id);
	}
	return hash_multi_map_tests_type_id__volatile;
}

