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

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */

#include <glib-object.h>
#include <glib.h>
#include <libxml/hash.h>

#define TYPE_GXML_TEST (gxml_test_get_type ())
#define GXML_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GXML_TEST, GXmlTest))
#define GXML_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GXML_TEST, GXmlTestClass))
#define IS_GXML_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GXML_TEST))
#define IS_GXML_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GXML_TEST))
#define GXML_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GXML_TEST, GXmlTestClass))

typedef struct _GXmlTest GXmlTest;
typedef struct _GXmlTestClass GXmlTestClass;
typedef struct _GXmlTestPrivate GXmlTestPrivate;

#define TYPE_VALA_LIBXML2_TEST (vala_libxml2_test_get_type ())
#define VALA_LIBXML2_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_LIBXML2_TEST, ValaLibxml2Test))
#define VALA_LIBXML2_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_LIBXML2_TEST, ValaLibxml2TestClass))
#define IS_VALA_LIBXML2_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_LIBXML2_TEST))
#define IS_VALA_LIBXML2_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_LIBXML2_TEST))
#define VALA_LIBXML2_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_LIBXML2_TEST, ValaLibxml2TestClass))

typedef struct _ValaLibxml2Test ValaLibxml2Test;
typedef struct _ValaLibxml2TestClass ValaLibxml2TestClass;
typedef struct _ValaLibxml2TestPrivate ValaLibxml2TestPrivate;
#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 _GXmlTest {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GXmlTestPrivate * priv;
};

struct _GXmlTestClass {
	GTypeClass parent_class;
	void (*finalize) (GXmlTest *self);
};

struct _ValaLibxml2Test {
	GXmlTest parent_instance;
	ValaLibxml2TestPrivate * priv;
};

struct _ValaLibxml2TestClass {
	GXmlTestClass parent_class;
};

static gpointer vala_libxml2_test_parent_class = NULL;

gpointer gxml_test_ref (gpointer instance);
void gxml_test_unref (gpointer instance);
GParamSpec* param_spec_gxml_test (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
void value_set_gxml_test (GValue* value,
                          gpointer v_object);
void value_take_gxml_test (GValue* value,
                           gpointer v_object);
gpointer value_get_gxml_test (const GValue* value);
GType gxml_test_get_type (void) G_GNUC_CONST;
GType vala_libxml2_test_get_type (void) G_GNUC_CONST;
void vala_libxml2_test_add_tests (void);
static void __lambda4_ (void);
static void ___lambda4__gtest_func (void);
ValaLibxml2Test* vala_libxml2_test_new (void);
ValaLibxml2Test* vala_libxml2_test_construct (GType object_type);
GXmlTest* gxml_test_new (void);
GXmlTest* gxml_test_construct (GType object_type);

static void
__lambda4_ (void)
{
	xmlHashTable* table = NULL;
	xmlHashTable* _tmp0_;
	void* _tmp1_;
#line 8 "ValaLibxml2Test.vala"
	_tmp0_ = xmlHashCreate (10);
#line 8 "ValaLibxml2Test.vala"
	table = _tmp0_;
#line 9 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 0, "table->size () == 0");
#line 10 "ValaLibxml2Test.vala"
	xmlHashAddEntry (table, "maple", "syrup");
#line 11 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 1, "table->size () == 1");
#line 14 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashAddEntry (table, "swiss", "cheese") == 0, "table->add_entry (\"swiss\", \"cheese\") == 0");
#line 15 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 2, "table->size () == 2");
#line 18 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashAddEntry (table, "swiss", "cheese") == -1, "table->add_entry (\"swiss\", \"cheese\") == -1");
#line 19 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 2, "table->size () == 2");
#line 22 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashRemoveEntry (table, "maple", NULL) == 0, "table->remove_entry (\"maple\", null) == 0");
#line 23 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 1, "table->size () == 1");
#line 26 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashRemoveEntry (table, "maple", NULL) == -1, "table->remove_entry (\"maple\", null) == -1");
#line 27 "ValaLibxml2Test.vala"
	_vala_assert (xmlHashSize (table) == 1, "table->size () == 1");
#line 29 "ValaLibxml2Test.vala"
	_tmp1_ = xmlHashLookup (table, "swiss");
#line 29 "ValaLibxml2Test.vala"
	_vala_assert (_tmp1_ == "cheese", "table->lookup (\"swiss\") == \"cheese\"");
#line 31 "ValaLibxml2Test.vala"
	xmlHashFree (table, NULL);
#line 119 "ValaLibxml2Test.c"
}

static void
___lambda4__gtest_func (void)
{
#line 6 "ValaLibxml2Test.vala"
	__lambda4_ ();
#line 127 "ValaLibxml2Test.c"
}

void
vala_libxml2_test_add_tests (void)
{
#line 6 "ValaLibxml2Test.vala"
	g_test_add_func ("/gxml/vala_libxml2/xmlHashTable", ___lambda4__gtest_func);
#line 135 "ValaLibxml2Test.c"
}

ValaLibxml2Test*
vala_libxml2_test_construct (GType object_type)
{
	ValaLibxml2Test* self = NULL;
#line 4 "ValaLibxml2Test.vala"
	self = (ValaLibxml2Test*) gxml_test_construct (object_type);
#line 4 "ValaLibxml2Test.vala"
	return self;
#line 146 "ValaLibxml2Test.c"
}

ValaLibxml2Test*
vala_libxml2_test_new (void)
{
#line 4 "ValaLibxml2Test.vala"
	return vala_libxml2_test_construct (TYPE_VALA_LIBXML2_TEST);
#line 154 "ValaLibxml2Test.c"
}

static void
vala_libxml2_test_class_init (ValaLibxml2TestClass * klass,
                              gpointer klass_data)
{
#line 4 "ValaLibxml2Test.vala"
	vala_libxml2_test_parent_class = g_type_class_peek_parent (klass);
#line 163 "ValaLibxml2Test.c"
}

static void
vala_libxml2_test_instance_init (ValaLibxml2Test * self,
                                 gpointer klass)
{
}

GType
vala_libxml2_test_get_type (void)
{
	static volatile gsize vala_libxml2_test_type_id__volatile = 0;
	if (g_once_init_enter (&vala_libxml2_test_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaLibxml2TestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_libxml2_test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaLibxml2Test), 0, (GInstanceInitFunc) vala_libxml2_test_instance_init, NULL };
		GType vala_libxml2_test_type_id;
		vala_libxml2_test_type_id = g_type_register_static (TYPE_GXML_TEST, "ValaLibxml2Test", &g_define_type_info, 0);
		g_once_init_leave (&vala_libxml2_test_type_id__volatile, vala_libxml2_test_type_id);
	}
	return vala_libxml2_test_type_id__volatile;
}

