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

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* GXmlTest.vala
 *
 * Copyright (C) 2011-2013  Richard Schwarting <aquarichy@gmail.com>
 * Copyright (C) 2011-2015  Daniel Espinosa <esodan@gmail.com>
 *
 * 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:
 *      Richard Schwarting <aquarichy@gmail.com>
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include <gxml/gxml.h>
#include <stdlib.h>
#include <string.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_TEXT_TEST (text_test_get_type ())
#define TEXT_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEXT_TEST, TextTest))
#define TEXT_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEXT_TEST, TextTestClass))
#define IS_TEXT_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEXT_TEST))
#define IS_TEXT_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEXT_TEST))
#define TEXT_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEXT_TEST, TextTestClass))

typedef struct _TextTest TextTest;
typedef struct _TextTestClass TextTestClass;
typedef struct _TextTestPrivate TextTestPrivate;
#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 _GXmlTest {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GXmlTestPrivate * priv;
};

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

struct _TextTest {
	GXmlTest parent_instance;
	TextTestPrivate * priv;
};

struct _TextTestClass {
	GXmlTestClass parent_class;
};


static gpointer text_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 text_test_get_type (void) G_GNUC_CONST;
enum  {
	TEXT_TEST_DUMMY_PROPERTY
};
void text_test_add_tests (void);
static void __lambda86_ (void);
GXmlxText* gxml_test_get_text_new_doc (const gchar* data, GXmlxDocument** doc);
void gxml_test_test_error (GXmlDomException expected);
static void ___lambda86__gcallback (void);
TextTest* text_test_new (void);
TextTest* text_test_construct (GType object_type);
GXmlTest* gxml_test_new (void);
GXmlTest* gxml_test_construct (GType object_type);


static void __lambda86_ (void) {
	GXmlxDocument* doc = NULL;
	GXmlxText* txt1 = NULL;
	GXmlxDocument* _tmp0_ = NULL;
	GXmlxText* _tmp1_ = NULL;
	GXmlxText* txt2 = NULL;
	GXmlxText* _tmp2_ = NULL;
	GXmlxText* _tmp3_ = NULL;
	GXmlxText* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GXmlxText* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	GXmlxText* _tmp10_ = NULL;
	GXmlxText* _tmp11_ = NULL;
	GXmlxText* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	GXmlxText* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	GXmlxText* _tmp18_ = NULL;
	GXmlxText* _tmp19_ = NULL;
	GXmlxText* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	GXmlxText* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	const gchar* _tmp25_ = NULL;
	GXmlxText* _tmp26_ = NULL;
	GXmlxText* _tmp27_ = NULL;
	GXmlxText* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	GXmlxText* _tmp31_ = NULL;
	const gchar* _tmp32_ = NULL;
	const gchar* _tmp33_ = NULL;
	GXmlxText* _tmp34_ = NULL;
	GXmlxText* _tmp35_ = NULL;
	GXmlxText* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	const gchar* _tmp38_ = NULL;
	GXmlxText* _tmp39_ = NULL;
	const gchar* _tmp40_ = NULL;
	const gchar* _tmp41_ = NULL;
#line 32 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp1_ = gxml_test_get_text_new_doc ("Constant vigilance!", &_tmp0_);
#line 32 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (doc);
#line 32 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	doc = _tmp0_;
#line 32 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt1 = _tmp1_;
#line 33 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp2_ = txt1;
#line 33 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp3_ = gxml_xtext_split_text (_tmp2_, (gulong) 5);
#line 33 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt2 = _tmp3_;
#line 35 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp4_ = txt1;
#line 35 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp5_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp4_);
#line 35 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp6_ = _tmp5_;
#line 35 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp6_, "Const") == 0, "txt1.node_value == \"Const\"");
#line 36 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp7_ = txt2;
#line 36 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp8_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp7_);
#line 36 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp9_ = _tmp8_;
#line 36 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp9_, "ant vigilance!") == 0, "txt2.node_value == \"ant vigilance!\"");
#line 48 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp10_ = txt1;
#line 48 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp11_ = gxml_xtext_split_text (_tmp10_, (gulong) 0);
#line 48 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt2);
#line 48 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt2 = _tmp11_;
#line 49 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp12_ = txt1;
#line 49 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp13_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp12_);
#line 49 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp14_ = _tmp13_;
#line 49 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp14_, "") == 0, "txt1.node_value == \"\"");
#line 50 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp15_ = txt2;
#line 50 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp16_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp15_);
#line 50 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp17_ = _tmp16_;
#line 50 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp17_, "Const") == 0, "txt2.node_value == \"Const\"");
#line 52 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp18_ = txt2;
#line 52 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp19_ = gxml_xtext_split_text (_tmp18_, (gulong) 5);
#line 52 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt1);
#line 52 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt1 = _tmp19_;
#line 53 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp20_ = txt1;
#line 53 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp21_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp20_);
#line 53 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp22_ = _tmp21_;
#line 53 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp22_, "") == 0, "txt1.node_value == \"\"");
#line 54 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp23_ = txt2;
#line 54 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp24_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp23_);
#line 54 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp25_ = _tmp24_;
#line 54 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp25_, "Const") == 0, "txt2.node_value == \"Const\"");
#line 56 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp26_ = txt2;
#line 56 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp27_ = gxml_xtext_split_text (_tmp26_, (gulong) (-2));
#line 56 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt1);
#line 56 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt1 = _tmp27_;
#line 57 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	gxml_test_test_error (GXML_DOM_EXCEPTION_INDEX_SIZE);
#line 58 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp28_ = txt1;
#line 58 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp29_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp28_);
#line 58 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp30_ = _tmp29_;
#line 58 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp30_, "") == 0, "txt1.node_value == \"\"");
#line 59 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp31_ = txt2;
#line 59 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp32_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp31_);
#line 59 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp33_ = _tmp32_;
#line 59 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp33_, "Const") == 0, "txt2.node_value == \"Const\"");
#line 61 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp34_ = txt2;
#line 61 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp35_ = gxml_xtext_split_text (_tmp34_, (gulong) 10);
#line 61 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt1);
#line 61 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	txt1 = _tmp35_;
#line 62 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	gxml_test_test_error (GXML_DOM_EXCEPTION_INDEX_SIZE);
#line 63 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp36_ = txt1;
#line 63 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp37_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp36_);
#line 63 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp38_ = _tmp37_;
#line 63 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp38_, "") == 0, "txt1.node_value == \"\"");
#line 64 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp39_ = txt2;
#line 64 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp40_ = gxml_xnode_get_node_value ((GXmlxNode*) _tmp39_);
#line 64 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_tmp41_ = _tmp40_;
#line 64 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_vala_assert (g_strcmp0 (_tmp41_, "Const") == 0, "txt2.node_value == \"Const\"");
#line 30 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt2);
#line 30 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (txt1);
#line 30 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	_g_object_unref0 (doc);
#line 290 "TextTest.c"
}


static void ___lambda86__gcallback (void) {
#line 30 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	__lambda86_ ();
#line 297 "TextTest.c"
}


void text_test_add_tests (void) {
#line 30 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	g_test_add_func ("/gxml/text/split_text", ___lambda86__gcallback);
#line 304 "TextTest.c"
}


TextTest* text_test_construct (GType object_type) {
	TextTest* self = NULL;
#line 26 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	self = (TextTest*) gxml_test_construct (object_type);
#line 26 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	return self;
#line 314 "TextTest.c"
}


TextTest* text_test_new (void) {
#line 26 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	return text_test_construct (TYPE_TEXT_TEST);
#line 321 "TextTest.c"
}


static void text_test_class_init (TextTestClass * klass) {
#line 26 "/home/despinosa/Proyectos/gxml/test/TextTest.vala"
	text_test_parent_class = g_type_class_peek_parent (klass);
#line 328 "TextTest.c"
}


static void text_test_instance_init (TextTest * self) {
}


GType text_test_get_type (void) {
	static volatile gsize text_test_type_id__volatile = 0;
	if (g_once_init_enter (&text_test_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TextTestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) text_test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TextTest), 0, (GInstanceInitFunc) text_test_instance_init, NULL };
		GType text_test_type_id;
		text_test_type_id = g_type_register_static (TYPE_GXML_TEST, "TextTest", &g_define_type_info, 0);
		g_once_init_leave (&text_test_type_id__volatile, text_test_type_id);
	}
	return text_test_type_id__volatile;
}



