/* trellis-node.c generated by valac 0.26.0.83-ed603, the Vala compiler
 * generated from trellis-node.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <libkkc-test.h>
#include <libkkc/libkkc-internals.h>
#include <string.h>
#include <stdlib.h>


#define TYPE_TRELLIS_NODE_TESTS (trellis_node_tests_get_type ())
#define TRELLIS_NODE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRELLIS_NODE_TESTS, TrellisNodeTests))
#define TRELLIS_NODE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRELLIS_NODE_TESTS, TrellisNodeTestsClass))
#define IS_TRELLIS_NODE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRELLIS_NODE_TESTS))
#define IS_TRELLIS_NODE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRELLIS_NODE_TESTS))
#define TRELLIS_NODE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRELLIS_NODE_TESTS, TrellisNodeTestsClass))

typedef struct _TrellisNodeTests TrellisNodeTests;
typedef struct _TrellisNodeTestsClass TrellisNodeTestsClass;
typedef struct _TrellisNodeTestsPrivate TrellisNodeTestsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _kkc_trellis_node_unref0(var) ((var == NULL) ? NULL : (var = (kkc_trellis_node_unref (var), NULL)))
#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 _TrellisNodeTests {
	KkcTestCase parent_instance;
	TrellisNodeTestsPrivate * priv;
};

struct _TrellisNodeTestsClass {
	KkcTestCaseClass parent_class;
};


static gpointer trellis_node_tests_parent_class = NULL;

GType trellis_node_tests_get_type (void) G_GNUC_CONST;
enum  {
	TRELLIS_NODE_TESTS_DUMMY_PROPERTY
};
TrellisNodeTests* trellis_node_tests_new (void);
TrellisNodeTests* trellis_node_tests_construct (GType object_type);
static void trellis_node_tests_test_unigram (TrellisNodeTests* self);
static void _trellis_node_tests_test_unigram_kkc_test_case_test_method (gpointer self);
static void trellis_node_tests_test_bigram (TrellisNodeTests* self);
static void _trellis_node_tests_test_bigram_kkc_test_case_test_method (gpointer self);
static KkcLanguageModelEntry* _vala_array_dup1 (KkcLanguageModelEntry* self, int length);
static gboolean _kkc_language_model_entry_equal (const KkcLanguageModelEntry* s1, const KkcLanguageModelEntry* s2);
static void _vala_KkcLanguageModelEntry_array_free (KkcLanguageModelEntry* array, gint array_length);
static KkcLanguageModelEntry* _vala_array_dup2 (KkcLanguageModelEntry* self, int length);
gint _vala_main (gchar** args, int args_length1);


static void _trellis_node_tests_test_unigram_kkc_test_case_test_method (gpointer self) {
#line 5 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	trellis_node_tests_test_unigram ((TrellisNodeTests*) self);
#line 64 "trellis-node.c"
}


static void _trellis_node_tests_test_bigram_kkc_test_case_test_method (gpointer self) {
#line 6 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	trellis_node_tests_test_bigram ((TrellisNodeTests*) self);
#line 71 "trellis-node.c"
}


TrellisNodeTests* trellis_node_tests_construct (GType object_type) {
	TrellisNodeTests * self = NULL;
#line 3 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	self = (TrellisNodeTests*) kkc_test_case_construct (object_type, "TrellisNode");
#line 5 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "unigram", _trellis_node_tests_test_unigram_kkc_test_case_test_method, self);
#line 6 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "bigram", _trellis_node_tests_test_bigram_kkc_test_case_test_method, self);
#line 2 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return self;
#line 85 "trellis-node.c"
}


TrellisNodeTests* trellis_node_tests_new (void) {
#line 2 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return trellis_node_tests_construct (TYPE_TRELLIS_NODE_TESTS);
#line 92 "trellis-node.c"
}


static KkcLanguageModelEntry* _vala_array_dup1 (KkcLanguageModelEntry* self, int length) {
	KkcLanguageModelEntry* result;
	int i;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	result = g_new0 (KkcLanguageModelEntry, length);
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	for (i = 0; i < length; i++) {
#line 103 "trellis-node.c"
		KkcLanguageModelEntry _tmp0_ = {0};
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		kkc_language_model_entry_copy (&self[i], &_tmp0_);
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		result[i] = _tmp0_;
#line 109 "trellis-node.c"
	}
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return result;
#line 113 "trellis-node.c"
}


static gboolean _kkc_language_model_entry_equal (const KkcLanguageModelEntry* s1, const KkcLanguageModelEntry* s2) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (s1 == s2) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return TRUE;
#line 122 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (s1 == NULL) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return FALSE;
#line 128 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (s2 == NULL) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return FALSE;
#line 134 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (g_strcmp0 (s1->input, s2->input)) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return FALSE;
#line 140 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (g_strcmp0 (s1->output, s2->output)) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return FALSE;
#line 146 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (s1->id != s2->id) {
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		return FALSE;
#line 152 "trellis-node.c"
	}
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return TRUE;
#line 156 "trellis-node.c"
}


static void _vala_KkcLanguageModelEntry_array_free (KkcLanguageModelEntry* array, gint array_length) {
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	if (array != NULL) {
#line 163 "trellis-node.c"
		int i;
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
			kkc_language_model_entry_destroy (&array[i]);
#line 169 "trellis-node.c"
		}
	}
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_free (array);
#line 174 "trellis-node.c"
}


static void trellis_node_tests_test_unigram (TrellisNodeTests* self) {
	KkcTrellisNode* node = NULL;
	KkcLanguageModelEntry entry = {0};
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	KkcLanguageModelEntry _tmp2_ = {0};
	KkcLanguageModelEntry _tmp3_ = {0};
	KkcLanguageModelEntry _tmp4_ = {0};
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	KkcUnigramTrellisNode* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	KkcLanguageModelEntry* entries = NULL;
	KkcLanguageModelEntry* _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
	KkcLanguageModelEntry* _tmp13_ = NULL;
	gint _tmp13__length1 = 0;
	KkcLanguageModelEntry* _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
	gint entries_length1 = 0;
	gint _entries_size_ = 0;
	KkcLanguageModelEntry _tmp15_ = {0};
	KkcLanguageModelEntry _tmp16_ = {0};
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_return_if_fail (self != NULL);
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp0_ = g_strdup ("foo");
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp1_ = g_strdup ("bar");
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	memset (&_tmp2_, 0, sizeof (KkcLanguageModelEntry));
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp2_.input);
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.input = _tmp0_;
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp2_.output);
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.output = _tmp1_;
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.id = (guint) 0;
#line 12 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entry = _tmp2_;
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp3_ = entry;
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp4_ = entry;
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp5_ = _tmp4_.input;
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp6_ = g_utf8_strlen (_tmp5_, (gssize) (-1));
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp7_ = kkc_unigram_trellis_node_new (&_tmp3_, (guint) _tmp6_);
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (node);
#line 18 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	node = (KkcTrellisNode*) _tmp7_;
#line 19 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp8_ = kkc_trellis_node_get_input (node);
#line 19 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp9_ = _tmp8_;
#line 19 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp9_, "foo") == 0, "node.input == \"foo\"");
#line 20 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp10_ = kkc_trellis_node_to_string (node);
#line 20 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp11_ = _tmp10_;
#line 20 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp11_, "<foo/bar>") == 0, "node.to_string () == \"<foo/bar>\"");
#line 20 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp11_);
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp12_ = kkc_trellis_node_get_entries (node, &_tmp12__length1);
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp13_ = _tmp12_;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp13__length1 = _tmp12__length1;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp14_ = (_tmp13_ != NULL) ? _vala_array_dup1 (_tmp13_, _tmp13__length1) : ((gpointer) _tmp13_);
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp14__length1 = _tmp13__length1;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries = _tmp14_;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries_length1 = _tmp14__length1;
#line 22 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_entries_size_ = entries_length1;
#line 23 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (entries_length1 == 1, "entries.length == 1");
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp15_ = entries[0];
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp16_ = entry;
#line 24 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (_kkc_language_model_entry_equal (&_tmp15_, &_tmp16_) == TRUE, "entries[0] == entry");
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries = (_vala_KkcLanguageModelEntry_array_free (entries, entries_length1), NULL);
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_language_model_entry_destroy (&entry);
#line 9 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (node);
#line 282 "trellis-node.c"
}


static KkcLanguageModelEntry* _vala_array_dup2 (KkcLanguageModelEntry* self, int length) {
	KkcLanguageModelEntry* result;
	int i;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	result = g_new0 (KkcLanguageModelEntry, length);
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	for (i = 0; i < length; i++) {
#line 293 "trellis-node.c"
		KkcLanguageModelEntry _tmp0_ = {0};
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		kkc_language_model_entry_copy (&self[i], &_tmp0_);
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
		result[i] = _tmp0_;
#line 299 "trellis-node.c"
	}
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return result;
#line 303 "trellis-node.c"
}


static void trellis_node_tests_test_bigram (TrellisNodeTests* self) {
	KkcLanguageModelEntry left_entry = {0};
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	KkcLanguageModelEntry _tmp2_ = {0};
	KkcUnigramTrellisNode* left_node = NULL;
	KkcLanguageModelEntry _tmp3_ = {0};
	KkcLanguageModelEntry _tmp4_ = {0};
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	KkcUnigramTrellisNode* _tmp7_ = NULL;
	KkcLanguageModelEntry right_entry = {0};
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	KkcLanguageModelEntry _tmp10_ = {0};
	KkcUnigramTrellisNode* right_node = NULL;
	KkcLanguageModelEntry _tmp11_ = {0};
	guint _tmp12_ = 0U;
	guint _tmp13_ = 0U;
	KkcLanguageModelEntry _tmp14_ = {0};
	const gchar* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	KkcUnigramTrellisNode* _tmp17_ = NULL;
	KkcTrellisNode* node = NULL;
	guint _tmp18_ = 0U;
	guint _tmp19_ = 0U;
	KkcBigramTrellisNode* _tmp20_ = NULL;
	KkcTrellisNode* _tmp21_ = NULL;
	guint _tmp22_ = 0U;
	guint _tmp23_ = 0U;
	guint _tmp24_ = 0U;
	guint _tmp25_ = 0U;
	KkcTrellisNode* _tmp26_ = NULL;
	const gchar* _tmp27_ = NULL;
	const gchar* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
	const gchar* _tmp31_ = NULL;
	const gchar* _tmp32_ = NULL;
	gchar* _tmp33_ = NULL;
	gchar* _tmp34_ = NULL;
	KkcTrellisNode* _tmp35_ = NULL;
	const gchar* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	const gchar* _tmp38_ = NULL;
	const gchar* _tmp39_ = NULL;
	const gchar* _tmp40_ = NULL;
	const gchar* _tmp41_ = NULL;
	gchar* _tmp42_ = NULL;
	gchar* _tmp43_ = NULL;
	KkcTrellisNode* _tmp44_ = NULL;
	gchar* _tmp45_ = NULL;
	gchar* _tmp46_ = NULL;
	KkcLanguageModelEntry* entries = NULL;
	KkcTrellisNode* _tmp47_ = NULL;
	KkcLanguageModelEntry* _tmp48_ = NULL;
	gint _tmp48__length1 = 0;
	KkcLanguageModelEntry* _tmp49_ = NULL;
	gint _tmp49__length1 = 0;
	KkcLanguageModelEntry* _tmp50_ = NULL;
	gint _tmp50__length1 = 0;
	gint entries_length1 = 0;
	gint _entries_size_ = 0;
	KkcLanguageModelEntry _tmp51_ = {0};
	KkcLanguageModelEntry _tmp52_ = {0};
	KkcLanguageModelEntry _tmp53_ = {0};
	KkcLanguageModelEntry _tmp54_ = {0};
	guint _tmp55_ = 0U;
	guint _tmp56_ = 0U;
	KkcBigramTrellisNode* _tmp57_ = NULL;
	KkcTrellisNode* _tmp58_ = NULL;
	const gchar* _tmp59_ = NULL;
	const gchar* _tmp60_ = NULL;
	const gchar* _tmp61_ = NULL;
	const gchar* _tmp62_ = NULL;
	KkcTrellisNode* _tmp63_ = NULL;
	const gchar* _tmp64_ = NULL;
	const gchar* _tmp65_ = NULL;
	const gchar* _tmp66_ = NULL;
	const gchar* _tmp67_ = NULL;
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp0_ = g_strdup ("left");
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp1_ = g_strdup ("LEFT");
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	memset (&_tmp2_, 0, sizeof (KkcLanguageModelEntry));
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp2_.input);
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.input = _tmp0_;
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp2_.output);
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.output = _tmp1_;
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_.id = (guint) 0;
#line 28 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	left_entry = _tmp2_;
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp3_ = left_entry;
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp4_ = left_entry;
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp5_ = _tmp4_.input;
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp6_ = g_utf8_strlen (_tmp5_, (gssize) (-1));
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp7_ = kkc_unigram_trellis_node_new (&_tmp3_, (guint) _tmp6_);
#line 33 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	left_node = _tmp7_;
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp8_ = g_strdup ("right");
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp9_ = g_strdup ("RIGHT");
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	memset (&_tmp10_, 0, sizeof (KkcLanguageModelEntry));
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp10_.input);
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp10_.input = _tmp8_;
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp10_.output);
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp10_.output = _tmp9_;
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp10_.id = (guint) 0;
#line 37 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	right_entry = _tmp10_;
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp11_ = right_entry;
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp12_ = kkc_trellis_node_get_endpos ((KkcTrellisNode*) left_node);
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp13_ = _tmp12_;
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp14_ = right_entry;
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp15_ = _tmp14_.input;
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp16_ = g_utf8_strlen (_tmp15_, (gssize) (-1));
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp17_ = kkc_unigram_trellis_node_new (&_tmp11_, _tmp13_ + _tmp16_);
#line 42 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	right_node = _tmp17_;
#line 47 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp18_ = kkc_trellis_node_get_endpos ((KkcTrellisNode*) right_node);
#line 47 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp19_ = _tmp18_;
#line 47 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp20_ = kkc_bigram_trellis_node_new (left_node, right_node, _tmp19_);
#line 47 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (node);
#line 47 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	node = (KkcTrellisNode*) _tmp20_;
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp21_ = node;
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp22_ = kkc_trellis_node_get_endpos (_tmp21_);
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp23_ = _tmp22_;
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp24_ = kkc_trellis_node_get_endpos ((KkcTrellisNode*) right_node);
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp25_ = _tmp24_;
#line 50 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (_tmp23_ == _tmp25_, "node.endpos == right_node.endpos");
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp26_ = node;
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp27_ = kkc_trellis_node_get_input (_tmp26_);
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp28_ = _tmp27_;
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp29_ = kkc_trellis_node_get_input ((KkcTrellisNode*) left_node);
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp30_ = _tmp29_;
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp31_ = kkc_trellis_node_get_input ((KkcTrellisNode*) right_node);
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp32_ = _tmp31_;
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp33_ = g_strconcat (_tmp30_, _tmp32_, NULL);
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp34_ = _tmp33_;
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp28_, _tmp34_) == 0, "node.input == left_node.input + right_node.input");
#line 51 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp34_);
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp35_ = node;
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp36_ = kkc_trellis_node_get_output (_tmp35_);
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp37_ = _tmp36_;
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp38_ = kkc_trellis_node_get_output ((KkcTrellisNode*) left_node);
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp39_ = _tmp38_;
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp40_ = kkc_trellis_node_get_output ((KkcTrellisNode*) right_node);
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp41_ = _tmp40_;
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp42_ = g_strconcat (_tmp39_, _tmp41_, NULL);
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp43_ = _tmp42_;
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp37_, _tmp43_) == 0, "node.output == left_node.output + right_node.output");
#line 52 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp43_);
#line 53 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp44_ = node;
#line 53 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp45_ = kkc_trellis_node_to_string (_tmp44_);
#line 53 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp46_ = _tmp45_;
#line 53 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp46_, "<left/LEFT><right/RIGHT>") == 0, "node.to_string () == \"<left/LEFT><right/RIGHT>\"");
#line 53 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_free0 (_tmp46_);
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp47_ = node;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp48_ = kkc_trellis_node_get_entries (_tmp47_, &_tmp48__length1);
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp49_ = _tmp48_;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp49__length1 = _tmp48__length1;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp50_ = (_tmp49_ != NULL) ? _vala_array_dup2 (_tmp49_, _tmp49__length1) : ((gpointer) _tmp49_);
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp50__length1 = _tmp49__length1;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries = _tmp50_;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries_length1 = _tmp50__length1;
#line 55 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_entries_size_ = entries_length1;
#line 56 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (entries_length1 == 2, "entries.length == 2");
#line 57 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp51_ = entries[0];
#line 57 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp52_ = left_entry;
#line 57 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (_kkc_language_model_entry_equal (&_tmp51_, &_tmp52_) == TRUE, "entries[0] == left_entry");
#line 58 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp53_ = entries[1];
#line 58 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp54_ = right_entry;
#line 58 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (_kkc_language_model_entry_equal (&_tmp53_, &_tmp54_) == TRUE, "entries[1] == right_entry");
#line 60 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp55_ = kkc_trellis_node_get_endpos ((KkcTrellisNode*) left_node);
#line 60 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp56_ = _tmp55_;
#line 60 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp57_ = kkc_bigram_trellis_node_new (left_node, right_node, _tmp56_);
#line 60 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (node);
#line 60 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	node = (KkcTrellisNode*) _tmp57_;
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp58_ = node;
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp59_ = kkc_trellis_node_get_input (_tmp58_);
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp60_ = _tmp59_;
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp61_ = kkc_trellis_node_get_input ((KkcTrellisNode*) left_node);
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp62_ = _tmp61_;
#line 63 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp60_, _tmp62_) == 0, "node.input == left_node.input");
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp63_ = node;
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp64_ = kkc_trellis_node_get_output (_tmp63_);
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp65_ = _tmp64_;
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp66_ = kkc_trellis_node_get_output ((KkcTrellisNode*) left_node);
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp67_ = _tmp66_;
#line 64 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_vala_assert (g_strcmp0 (_tmp65_, _tmp67_) == 0, "node.output == left_node.output");
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	entries = (_vala_KkcLanguageModelEntry_array_free (entries, entries_length1), NULL);
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (node);
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (right_node);
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_language_model_entry_destroy (&right_entry);
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_kkc_trellis_node_unref0 (left_node);
#line 27 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_language_model_entry_destroy (&left_entry);
#line 607 "trellis-node.c"
}


static void trellis_node_tests_class_init (TrellisNodeTestsClass * klass) {
#line 1 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	trellis_node_tests_parent_class = g_type_class_peek_parent (klass);
#line 614 "trellis-node.c"
}


static void trellis_node_tests_instance_init (TrellisNodeTests * self) {
}


GType trellis_node_tests_get_type (void) {
	static volatile gsize trellis_node_tests_type_id__volatile = 0;
	if (g_once_init_enter (&trellis_node_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrellisNodeTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) trellis_node_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrellisNodeTests), 0, (GInstanceInitFunc) trellis_node_tests_instance_init, NULL };
		GType trellis_node_tests_type_id;
		trellis_node_tests_type_id = g_type_register_static (KKC_TYPE_TEST_CASE, "TrellisNodeTests", &g_define_type_info, 0);
		g_once_init_leave (&trellis_node_tests_type_id__volatile, trellis_node_tests_type_id);
	}
	return trellis_node_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* root = NULL;
	GTestSuite* _tmp0_ = NULL;
	TrellisNodeTests* _tmp1_ = NULL;
	TrellisNodeTests* _tmp2_ = NULL;
	GTestSuite* _tmp3_ = NULL;
#line 69 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_test_init (&args_length1, &args, NULL);
#line 70 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	kkc_init ();
#line 72 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp0_ = g_test_get_root ();
#line 72 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	root = _tmp0_;
#line 73 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp1_ = trellis_node_tests_new ();
#line 73 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp2_ = _tmp1_;
#line 73 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_tmp3_ = kkc_test_case_get_suite ((KkcTestCase*) _tmp2_);
#line 73 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 73 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	_g_object_unref0 (_tmp2_);
#line 75 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	g_test_run ();
#line 77 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	result = 0;
#line 77 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return result;
#line 665 "trellis-node.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 68 "/home/ueno/devel/libkkc/tests/trellis-node.vala"
	return _vala_main (argv, argc);
#line 675 "trellis-node.c"
}



