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


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


#define TYPE_USER_SEGMENT_DICTIONARY_TESTS (user_segment_dictionary_tests_get_type ())
#define USER_SEGMENT_DICTIONARY_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_SEGMENT_DICTIONARY_TESTS, UserSegmentDictionaryTests))
#define USER_SEGMENT_DICTIONARY_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_SEGMENT_DICTIONARY_TESTS, UserSegmentDictionaryTestsClass))
#define IS_USER_SEGMENT_DICTIONARY_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_SEGMENT_DICTIONARY_TESTS))
#define IS_USER_SEGMENT_DICTIONARY_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_SEGMENT_DICTIONARY_TESTS))
#define USER_SEGMENT_DICTIONARY_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_SEGMENT_DICTIONARY_TESTS, UserSegmentDictionaryTestsClass))

typedef struct _UserSegmentDictionaryTests UserSegmentDictionaryTests;
typedef struct _UserSegmentDictionaryTestsClass UserSegmentDictionaryTestsClass;
typedef struct _UserSegmentDictionaryTestsPrivate UserSegmentDictionaryTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_USER_SENTENCE_DICTIONARY_TESTS (user_sentence_dictionary_tests_get_type ())
#define USER_SENTENCE_DICTIONARY_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_SENTENCE_DICTIONARY_TESTS, UserSentenceDictionaryTests))
#define USER_SENTENCE_DICTIONARY_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_SENTENCE_DICTIONARY_TESTS, UserSentenceDictionaryTestsClass))
#define IS_USER_SENTENCE_DICTIONARY_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_SENTENCE_DICTIONARY_TESTS))
#define IS_USER_SENTENCE_DICTIONARY_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_SENTENCE_DICTIONARY_TESTS))
#define USER_SENTENCE_DICTIONARY_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_SENTENCE_DICTIONARY_TESTS, UserSentenceDictionaryTestsClass))

typedef struct _UserSentenceDictionaryTests UserSentenceDictionaryTests;
typedef struct _UserSentenceDictionaryTestsClass UserSentenceDictionaryTestsClass;
typedef struct _UserSentenceDictionaryTestsPrivate UserSentenceDictionaryTestsPrivate;

#define TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS (user_dictionary_with_context_tests_get_type ())
#define USER_DICTIONARY_WITH_CONTEXT_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS, UserDictionaryWithContextTests))
#define USER_DICTIONARY_WITH_CONTEXT_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS, UserDictionaryWithContextTestsClass))
#define IS_USER_DICTIONARY_WITH_CONTEXT_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS))
#define IS_USER_DICTIONARY_WITH_CONTEXT_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS))
#define USER_DICTIONARY_WITH_CONTEXT_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS, UserDictionaryWithContextTestsClass))

typedef struct _UserDictionaryWithContextTests UserDictionaryWithContextTests;
typedef struct _UserDictionaryWithContextTestsClass UserDictionaryWithContextTestsClass;
typedef struct _UserDictionaryWithContextTestsPrivate UserDictionaryWithContextTestsPrivate;
#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 _UserSegmentDictionaryTests {
	KkcTestCase parent_instance;
	UserSegmentDictionaryTestsPrivate * priv;
};

struct _UserSegmentDictionaryTestsClass {
	KkcTestCaseClass parent_class;
};

struct _UserSentenceDictionaryTests {
	KkcTestCase parent_instance;
	UserSentenceDictionaryTestsPrivate * priv;
};

struct _UserSentenceDictionaryTestsClass {
	KkcTestCaseClass parent_class;
};

struct _UserDictionaryWithContextTests {
	KkcTestCase parent_instance;
	UserDictionaryWithContextTestsPrivate * priv;
};

struct _UserDictionaryWithContextTestsClass {
	KkcTestCaseClass parent_class;
};

struct _UserDictionaryWithContextTestsPrivate {
	KkcContext* context;
	KkcUserDictionary* user_dictionary;
};


static gpointer user_segment_dictionary_tests_parent_class = NULL;
static gpointer user_sentence_dictionary_tests_parent_class = NULL;
static gpointer user_dictionary_with_context_tests_parent_class = NULL;

GType user_segment_dictionary_tests_get_type (void) G_GNUC_CONST;
enum  {
	USER_SEGMENT_DICTIONARY_TESTS_DUMMY_PROPERTY
};
UserSegmentDictionaryTests* user_segment_dictionary_tests_new (void);
UserSegmentDictionaryTests* user_segment_dictionary_tests_construct (GType object_type);
static void user_segment_dictionary_tests_test_load (UserSegmentDictionaryTests* self);
static void _user_segment_dictionary_tests_test_load_kkc_test_case_test_method (gpointer self);
static void user_segment_dictionary_tests_test_write (UserSegmentDictionaryTests* self);
static void _user_segment_dictionary_tests_test_write_kkc_test_case_test_method (gpointer self);
static void user_segment_dictionary_tests_real_set_up (KkcTestCase* base);
GType user_sentence_dictionary_tests_get_type (void) G_GNUC_CONST;
enum  {
	USER_SENTENCE_DICTIONARY_TESTS_DUMMY_PROPERTY
};
UserSentenceDictionaryTests* user_sentence_dictionary_tests_new (void);
UserSentenceDictionaryTests* user_sentence_dictionary_tests_construct (GType object_type);
static void user_sentence_dictionary_tests_test_load (UserSentenceDictionaryTests* self);
static void _user_sentence_dictionary_tests_test_load_kkc_test_case_test_method (gpointer self);
static void user_sentence_dictionary_tests_test_write (UserSentenceDictionaryTests* self);
static void _user_sentence_dictionary_tests_test_write_kkc_test_case_test_method (gpointer self);
static void _vala_array_add1 (KkcSegment*** array, int* length, int* size, KkcSegment* value);
static void _vala_array_add2 (KkcSegment*** array, int* length, int* size, KkcSegment* value);
static void _vala_array_add3 (KkcSegment*** array, int* length, int* size, KkcSegment* value);
static void user_sentence_dictionary_tests_real_set_up (KkcTestCase* base);
GType user_dictionary_with_context_tests_get_type (void) G_GNUC_CONST;
#define USER_DICTIONARY_WITH_CONTEXT_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS, UserDictionaryWithContextTestsPrivate))
enum  {
	USER_DICTIONARY_WITH_CONTEXT_TESTS_DUMMY_PROPERTY
};
UserDictionaryWithContextTests* user_dictionary_with_context_tests_new (void);
UserDictionaryWithContextTests* user_dictionary_with_context_tests_construct (GType object_type);
static void user_dictionary_with_context_tests_test_conversion (UserDictionaryWithContextTests* self);
static void _user_dictionary_with_context_tests_test_conversion_kkc_test_case_test_method (gpointer self);
static void user_dictionary_with_context_tests_test_phrase_conversion (UserDictionaryWithContextTests* self);
static void _user_dictionary_with_context_tests_test_phrase_conversion_kkc_test_case_test_method (gpointer self);
static void user_dictionary_with_context_tests_test_register (UserDictionaryWithContextTests* self);
static void _user_dictionary_with_context_tests_test_register_kkc_test_case_test_method (gpointer self);
static void __lambda4_ (UserDictionaryWithContextTests* self);
static void ___lambda4__kkc_context_request_selection_text (KkcContext* _sender, gpointer self);
static void __lambda5_ (UserDictionaryWithContextTests* self);
static void ___lambda5__kkc_context_request_selection_text (KkcContext* _sender, gpointer self);
static void user_dictionary_with_context_tests_real_set_up (KkcTestCase* base);
static void user_dictionary_with_context_tests_real_tear_down (KkcTestCase* base);
static void user_dictionary_with_context_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void _user_segment_dictionary_tests_test_load_kkc_test_case_test_method (gpointer self) {
#line 5 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_segment_dictionary_tests_test_load ((UserSegmentDictionaryTests*) self);
#line 147 "user-dictionary.c"
}


static void _user_segment_dictionary_tests_test_write_kkc_test_case_test_method (gpointer self) {
#line 6 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_segment_dictionary_tests_test_write ((UserSegmentDictionaryTests*) self);
#line 154 "user-dictionary.c"
}


UserSegmentDictionaryTests* user_segment_dictionary_tests_construct (GType object_type) {
	UserSegmentDictionaryTests * self = NULL;
#line 3 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserSegmentDictionaryTests*) kkc_test_case_construct (object_type, "UserSegmentDictionary");
#line 5 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "load", _user_segment_dictionary_tests_test_load_kkc_test_case_test_method, self);
#line 6 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "write", _user_segment_dictionary_tests_test_write_kkc_test_case_test_method, self);
#line 2 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return self;
#line 168 "user-dictionary.c"
}


UserSegmentDictionaryTests* user_segment_dictionary_tests_new (void) {
#line 2 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return user_segment_dictionary_tests_construct (TYPE_USER_SEGMENT_DICTIONARY_TESTS);
#line 175 "user-dictionary.c"
}


static void user_segment_dictionary_tests_test_load (UserSegmentDictionaryTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 9 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 186 "user-dictionary.c"
	{
		KkcUserSegmentDictionary* _tmp0_ = NULL;
		KkcUserSegmentDictionary* _tmp1_ = NULL;
#line 11 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = kkc_user_segment_dictionary_new ("test-user-segment-dictionary", &_inner_error_);
#line 11 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = _tmp0_;
#line 11 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp1_);
#line 11 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 198 "user-dictionary.c"
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 14 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 214 "user-dictionary.c"
	}
	__finally0:
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 10 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 225 "user-dictionary.c"
	}
#line 17 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = g_getenv ("srcdir");
#line 17 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 17 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	srcdir = _tmp3_;
#line 18 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 235 "user-dictionary.c"
	{
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		KkcUserSegmentDictionary* _tmp6_ = NULL;
		KkcUserSegmentDictionary* _tmp7_ = NULL;
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp4_ = g_build_filename (srcdir, "user-segment-dictionary-good", NULL);
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp5_ = _tmp4_;
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp6_ = kkc_user_segment_dictionary_new (_tmp5_, &_inner_error_);
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp7_ = _tmp6_;
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp7_);
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp5_);
#line 21 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 255 "user-dictionary.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 24 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 271 "user-dictionary.c"
	}
	__finally1:
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 20 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 284 "user-dictionary.c"
	}
	{
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		KkcUserSegmentDictionary* _tmp10_ = NULL;
		KkcUserSegmentDictionary* _tmp11_ = NULL;
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp8_ = g_build_filename (srcdir, "user-segment-dictionary-bad1", NULL);
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp9_ = _tmp8_;
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp10_ = kkc_user_segment_dictionary_new (_tmp9_, &_inner_error_);
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp11_ = _tmp10_;
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp11_);
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp9_);
#line 28 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 305 "user-dictionary.c"
			goto __catch2_g_error;
		}
#line 30 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 310 "user-dictionary.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 322 "user-dictionary.c"
	}
	__finally2:
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 27 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 335 "user-dictionary.c"
	}
	{
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		KkcUserSegmentDictionary* _tmp14_ = NULL;
		KkcUserSegmentDictionary* _tmp15_ = NULL;
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp12_ = g_build_filename (srcdir, "user-segment-dictionary-bad2", NULL);
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp13_ = _tmp12_;
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp14_ = kkc_user_segment_dictionary_new (_tmp13_, &_inner_error_);
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp15_ = _tmp14_;
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp15_);
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp13_);
#line 35 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 356 "user-dictionary.c"
			goto __catch3_g_error;
		}
#line 37 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 361 "user-dictionary.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 373 "user-dictionary.c"
	}
	__finally3:
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 34 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 386 "user-dictionary.c"
	}
#line 9 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (srcdir);
#line 390 "user-dictionary.c"
}


static void user_segment_dictionary_tests_test_write (UserSegmentDictionaryTests* self) {
	KkcSegmentDictionary* dictionary = NULL;
	KkcSegmentDictionary* _tmp3_ = NULL;
	KkcCandidate* _tmp4_ = NULL;
	KkcCandidate* _tmp5_ = NULL;
	KkcSegmentDictionary* _tmp6_ = NULL;
	KkcCandidate* _tmp7_ = NULL;
	KkcCandidate* _tmp8_ = NULL;
	KkcSegmentDictionary* _tmp9_ = NULL;
	KkcCandidate* _tmp10_ = NULL;
	KkcCandidate* _tmp11_ = NULL;
	KkcSegmentDictionary* _tmp12_ = NULL;
	KkcCandidate* _tmp13_ = NULL;
	KkcCandidate* _tmp14_ = NULL;
	KkcSegmentDictionary* _tmp15_ = NULL;
	KkcCandidate* _tmp16_ = NULL;
	KkcCandidate* _tmp17_ = NULL;
	KkcSegmentDictionary* _tmp18_ = NULL;
	KkcCandidate* _tmp19_ = NULL;
	KkcCandidate* _tmp20_ = NULL;
	KkcCandidate* candidate = NULL;
	KkcCandidate* _tmp21_ = NULL;
	KkcSegmentDictionary* _tmp22_ = NULL;
	KkcSegmentDictionary* _tmp23_ = NULL;
	KkcSegmentDictionary* _tmp24_ = NULL;
	KkcCandidate** candidates = NULL;
	gint candidates_length1 = 0;
	gint _candidates_size_ = 0;
	KkcSegmentDictionary* _tmp28_ = NULL;
	KkcCandidate** _tmp29_ = NULL;
	gint _tmp30_ = 0;
	gboolean _tmp31_ = FALSE;
	KkcCandidate** _tmp32_ = NULL;
	gint _tmp32__length1 = 0;
	KkcSegmentDictionary* _tmp37_ = NULL;
	KkcCandidate** _tmp38_ = NULL;
	gint _tmp39_ = 0;
	gboolean _tmp40_ = FALSE;
	KkcCandidate** _tmp41_ = NULL;
	gint _tmp41__length1 = 0;
	GError * _inner_error_ = NULL;
#line 42 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 43 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	dictionary = NULL;
#line 439 "user-dictionary.c"
	{
		KkcUserSegmentDictionary* _tmp0_ = NULL;
		KkcUserSegmentDictionary* _tmp1_ = NULL;
		KkcUserSegmentDictionary* _tmp2_ = NULL;
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = kkc_user_segment_dictionary_new ("test-user-segment-dictionary", &_inner_error_);
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = _tmp1_;
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 450 "user-dictionary.c"
			goto __catch4_g_error;
		}
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp2_ = _tmp0_;
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = NULL;
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 45 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		dictionary = (KkcSegmentDictionary*) _tmp2_;
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp0_);
#line 463 "user-dictionary.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 48 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 477 "user-dictionary.c"
	}
	__finally4:
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 44 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 490 "user-dictionary.c"
	}
#line 51 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = dictionary;
#line 51 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = kkc_candidate_new ("あい", FALSE, "愛", NULL, NULL);
#line 51 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp5_ = _tmp4_;
#line 51 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp3_, _tmp5_);
#line 51 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp5_);
#line 53 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = dictionary;
#line 53 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = kkc_candidate_new ("あお", FALSE, "青", NULL, NULL);
#line 53 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp8_ = _tmp7_;
#line 53 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp6_, _tmp8_);
#line 53 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp8_);
#line 55 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp9_ = dictionary;
#line 55 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp10_ = kkc_candidate_new ("あ お", FALSE, "青 ", NULL, NULL);
#line 55 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp11_ = _tmp10_;
#line 55 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp9_, _tmp11_);
#line 55 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp11_);
#line 57 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp12_ = dictionary;
#line 57 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp13_ = kkc_candidate_new ("あ/お", FALSE, "青/", NULL, NULL);
#line 57 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp14_ = _tmp13_;
#line 57 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp12_, _tmp14_);
#line 57 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp14_);
#line 59 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp15_ = dictionary;
#line 59 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp16_ = kkc_candidate_new ("あu", TRUE, "会u", NULL, NULL);
#line 59 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp17_ = _tmp16_;
#line 59 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp15_, _tmp17_);
#line 59 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp17_);
#line 61 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp18_ = dictionary;
#line 61 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp19_ = kkc_candidate_new ("あe", TRUE, "会e", NULL, NULL);
#line 61 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp20_ = _tmp19_;
#line 61 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp18_, _tmp20_);
#line 61 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp20_);
#line 64 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp21_ = kkc_candidate_new ("あw", TRUE, "会w", NULL, NULL);
#line 64 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidate = _tmp21_;
#line 65 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp22_ = dictionary;
#line 65 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_select_candidate (_tmp22_, candidate);
#line 66 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp23_ = dictionary;
#line 66 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_purge_candidate (_tmp23_, candidate);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp24_ = dictionary;
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_save ((KkcDictionary*) _tmp24_, &_inner_error_);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (candidate);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 68 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 580 "user-dictionary.c"
	}
	{
		KkcUserSegmentDictionary* _tmp25_ = NULL;
		KkcUserSegmentDictionary* _tmp26_ = NULL;
		KkcUserSegmentDictionary* _tmp27_ = NULL;
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp26_ = kkc_user_segment_dictionary_new ("test-user-segment-dictionary", &_inner_error_);
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp25_ = _tmp26_;
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 592 "user-dictionary.c"
			goto __catch5_g_error;
		}
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp27_ = _tmp25_;
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp25_ = NULL;
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 71 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		dictionary = (KkcSegmentDictionary*) _tmp27_;
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp25_);
#line 605 "user-dictionary.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 74 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 619 "user-dictionary.c"
	}
	__finally5:
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (candidate);
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 70 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 634 "user-dictionary.c"
	}
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp28_ = dictionary;
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_lookup_candidates (_tmp28_, "あ お", FALSE, &_tmp29_, &_tmp30_);
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates = (_vala_array_free (candidates, candidates_length1, (GDestroyNotify) g_object_unref), NULL);
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates = _tmp29_;
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates_length1 = _tmp30_;
#line 78 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_candidates_size_ = candidates_length1;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp32_ = candidates;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp32__length1 = candidates_length1;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (_tmp32__length1 == 1) {
#line 654 "user-dictionary.c"
		KkcCandidate** _tmp33_ = NULL;
		gint _tmp33__length1 = 0;
		KkcCandidate* _tmp34_ = NULL;
		const gchar* _tmp35_ = NULL;
		const gchar* _tmp36_ = NULL;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp33_ = candidates;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp33__length1 = candidates_length1;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp34_ = _tmp33_[0];
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp35_ = kkc_candidate_get_output (_tmp34_);
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp36_ = _tmp35_;
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp31_ = g_strcmp0 (_tmp36_, "青 ") == 0;
#line 672 "user-dictionary.c"
	} else {
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp31_ = FALSE;
#line 676 "user-dictionary.c"
	}
#line 79 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (_tmp31_, "candidates.length == 1 && candidates[0].output == \"\351\235\222 \"");
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp37_ = dictionary;
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_segment_dictionary_lookup_candidates (_tmp37_, "あ/お", FALSE, &_tmp38_, &_tmp39_);
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates = (_vala_array_free (candidates, candidates_length1, (GDestroyNotify) g_object_unref), NULL);
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates = _tmp38_;
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates_length1 = _tmp39_;
#line 80 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_candidates_size_ = candidates_length1;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp41_ = candidates;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp41__length1 = candidates_length1;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (_tmp41__length1 == 1) {
#line 698 "user-dictionary.c"
		KkcCandidate** _tmp42_ = NULL;
		gint _tmp42__length1 = 0;
		KkcCandidate* _tmp43_ = NULL;
		const gchar* _tmp44_ = NULL;
		const gchar* _tmp45_ = NULL;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp42_ = candidates;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp42__length1 = candidates_length1;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp43_ = _tmp42_[0];
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp44_ = kkc_candidate_get_output (_tmp43_);
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp45_ = _tmp44_;
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp40_ = g_strcmp0 (_tmp45_, "青/") == 0;
#line 716 "user-dictionary.c"
	} else {
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp40_ = FALSE;
#line 720 "user-dictionary.c"
	}
#line 81 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (_tmp40_, "candidates.length == 1 && candidates[0].output == \"\351\235\222/\"");
#line 42 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	candidates = (_vala_array_free (candidates, candidates_length1, (GDestroyNotify) g_object_unref), NULL);
#line 42 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (candidate);
#line 42 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (dictionary);
#line 730 "user-dictionary.c"
}


static void user_segment_dictionary_tests_real_set_up (KkcTestCase* base) {
	UserSegmentDictionaryTests * self;
#line 84 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserSegmentDictionaryTests*) base;
#line 85 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_remove ("test-user-segment-dictionary");
#line 740 "user-dictionary.c"
}


static void user_segment_dictionary_tests_class_init (UserSegmentDictionaryTestsClass * klass) {
#line 1 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_segment_dictionary_tests_parent_class = g_type_class_peek_parent (klass);
#line 1 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	((KkcTestCaseClass *) klass)->set_up = user_segment_dictionary_tests_real_set_up;
#line 749 "user-dictionary.c"
}


static void user_segment_dictionary_tests_instance_init (UserSegmentDictionaryTests * self) {
}


GType user_segment_dictionary_tests_get_type (void) {
	static volatile gsize user_segment_dictionary_tests_type_id__volatile = 0;
	if (g_once_init_enter (&user_segment_dictionary_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (UserSegmentDictionaryTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_segment_dictionary_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserSegmentDictionaryTests), 0, (GInstanceInitFunc) user_segment_dictionary_tests_instance_init, NULL };
		GType user_segment_dictionary_tests_type_id;
		user_segment_dictionary_tests_type_id = g_type_register_static (KKC_TYPE_TEST_CASE, "UserSegmentDictionaryTests", &g_define_type_info, 0);
		g_once_init_leave (&user_segment_dictionary_tests_type_id__volatile, user_segment_dictionary_tests_type_id);
	}
	return user_segment_dictionary_tests_type_id__volatile;
}


static void _user_sentence_dictionary_tests_test_load_kkc_test_case_test_method (gpointer self) {
#line 93 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_sentence_dictionary_tests_test_load ((UserSentenceDictionaryTests*) self);
#line 772 "user-dictionary.c"
}


static void _user_sentence_dictionary_tests_test_write_kkc_test_case_test_method (gpointer self) {
#line 94 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_sentence_dictionary_tests_test_write ((UserSentenceDictionaryTests*) self);
#line 779 "user-dictionary.c"
}


UserSentenceDictionaryTests* user_sentence_dictionary_tests_construct (GType object_type) {
	UserSentenceDictionaryTests * self = NULL;
#line 91 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserSentenceDictionaryTests*) kkc_test_case_construct (object_type, "UserSentenceDictionary");
#line 93 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "load", _user_sentence_dictionary_tests_test_load_kkc_test_case_test_method, self);
#line 94 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "write", _user_sentence_dictionary_tests_test_write_kkc_test_case_test_method, self);
#line 90 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return self;
#line 793 "user-dictionary.c"
}


UserSentenceDictionaryTests* user_sentence_dictionary_tests_new (void) {
#line 90 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return user_sentence_dictionary_tests_construct (TYPE_USER_SENTENCE_DICTIONARY_TESTS);
#line 800 "user-dictionary.c"
}


static void user_sentence_dictionary_tests_test_load (UserSentenceDictionaryTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 97 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 811 "user-dictionary.c"
	{
		KkcUserSentenceDictionary* _tmp0_ = NULL;
		KkcUserSentenceDictionary* _tmp1_ = NULL;
#line 99 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = kkc_user_sentence_dictionary_new ("user-sentence-dictionary", &_inner_error_);
#line 99 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = _tmp0_;
#line 99 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp1_);
#line 99 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 823 "user-dictionary.c"
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* e = NULL;
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 102 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 839 "user-dictionary.c"
	}
	__finally6:
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 98 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 850 "user-dictionary.c"
	}
#line 105 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = g_getenv ("srcdir");
#line 105 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 105 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	srcdir = _tmp3_;
#line 106 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 860 "user-dictionary.c"
	{
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		KkcUserSentenceDictionary* _tmp6_ = NULL;
		KkcUserSentenceDictionary* _tmp7_ = NULL;
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp4_ = g_build_filename (srcdir, "user-sentence-dictionary-good", NULL);
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp5_ = _tmp4_;
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp6_ = kkc_user_sentence_dictionary_new (_tmp5_, &_inner_error_);
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp7_ = _tmp6_;
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp7_);
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp5_);
#line 109 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 880 "user-dictionary.c"
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* e = NULL;
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 112 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 896 "user-dictionary.c"
	}
	__finally7:
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 108 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 909 "user-dictionary.c"
	}
	{
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		KkcUserSentenceDictionary* _tmp10_ = NULL;
		KkcUserSentenceDictionary* _tmp11_ = NULL;
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp8_ = g_build_filename (srcdir, "user-sentence-dictionary-bad1", NULL);
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp9_ = _tmp8_;
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp10_ = kkc_user_sentence_dictionary_new (_tmp9_, &_inner_error_);
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp11_ = _tmp10_;
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp11_);
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp9_);
#line 116 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 930 "user-dictionary.c"
			goto __catch8_g_error;
		}
#line 118 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 935 "user-dictionary.c"
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* e = NULL;
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 947 "user-dictionary.c"
	}
	__finally8:
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 115 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 960 "user-dictionary.c"
	}
	{
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		KkcUserSentenceDictionary* _tmp14_ = NULL;
		KkcUserSentenceDictionary* _tmp15_ = NULL;
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp12_ = g_build_filename (srcdir, "user-sentence-dictionary-bad2", NULL);
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp13_ = _tmp12_;
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp14_ = kkc_user_sentence_dictionary_new (_tmp13_, &_inner_error_);
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp15_ = _tmp14_;
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp15_);
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp13_);
#line 123 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 981 "user-dictionary.c"
			goto __catch9_g_error;
		}
#line 125 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 986 "user-dictionary.c"
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* e = NULL;
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 998 "user-dictionary.c"
	}
	__finally9:
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 122 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1011 "user-dictionary.c"
	}
#line 97 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (srcdir);
#line 1015 "user-dictionary.c"
}


static void _vala_array_add1 (KkcSegment*** array, int* length, int* size, KkcSegment* value) {
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if ((*length) == (*size)) {
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*array = g_renew (KkcSegment*, *array, (*size) + 1);
#line 1026 "user-dictionary.c"
	}
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[(*length)++] = value;
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[*length] = NULL;
#line 1032 "user-dictionary.c"
}


static void _vala_array_add2 (KkcSegment*** array, int* length, int* size, KkcSegment* value) {
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if ((*length) == (*size)) {
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*array = g_renew (KkcSegment*, *array, (*size) + 1);
#line 1043 "user-dictionary.c"
	}
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[(*length)++] = value;
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[*length] = NULL;
#line 1049 "user-dictionary.c"
}


static void _vala_array_add3 (KkcSegment*** array, int* length, int* size, KkcSegment* value) {
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if ((*length) == (*size)) {
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		*array = g_renew (KkcSegment*, *array, (*size) + 1);
#line 1060 "user-dictionary.c"
	}
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[(*length)++] = value;
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	(*array)[*length] = NULL;
#line 1066 "user-dictionary.c"
}


static void user_sentence_dictionary_tests_test_write (UserSentenceDictionaryTests* self) {
	KkcSentenceDictionary* dictionary = NULL;
	KkcSegment** segments = NULL;
	KkcSegment** _tmp3_ = NULL;
	gint segments_length1 = 0;
	gint _segments_size_ = 0;
	KkcSegment** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	KkcSegment* _tmp5_ = NULL;
	KkcSegment** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	KkcSegment* _tmp7_ = NULL;
	KkcSegment** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	KkcSegment* _tmp9_ = NULL;
	KkcSentenceDictionary* _tmp10_ = NULL;
	KkcSegment** _tmp11_ = NULL;
	gint _tmp11__length1 = 0;
	KkcSentenceDictionary* _tmp12_ = NULL;
	GError * _inner_error_ = NULL;
#line 130 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 131 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	dictionary = NULL;
#line 1094 "user-dictionary.c"
	{
		KkcUserSentenceDictionary* _tmp0_ = NULL;
		KkcUserSentenceDictionary* _tmp1_ = NULL;
		KkcUserSentenceDictionary* _tmp2_ = NULL;
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = kkc_user_sentence_dictionary_new ("test-user-sentence-dictionary", &_inner_error_);
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = _tmp1_;
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1105 "user-dictionary.c"
			goto __catch10_g_error;
		}
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp2_ = _tmp0_;
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = NULL;
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 133 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		dictionary = (KkcSentenceDictionary*) _tmp2_;
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp0_);
#line 1118 "user-dictionary.c"
	}
	goto __finally10;
	__catch10_g_error:
	{
		GError* e = NULL;
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 136 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1132 "user-dictionary.c"
	}
	__finally10:
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 132 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1145 "user-dictionary.c"
	}
#line 139 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = g_new0 (KkcSegment*, 0 + 1);
#line 139 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	segments = _tmp3_;
#line 139 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	segments_length1 = 0;
#line 139 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_segments_size_ = segments_length1;
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = segments;
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4__length1 = segments_length1;
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp5_ = kkc_segment_new ("left", "LEFT");
#line 141 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_array_add1 (&segments, &segments_length1, &_segments_size_, _tmp5_);
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = segments;
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6__length1 = segments_length1;
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = kkc_segment_new ("right", "RIGHT");
#line 142 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_array_add2 (&segments, &segments_length1, &_segments_size_, _tmp7_);
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp8_ = segments;
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp8__length1 = segments_length1;
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp9_ = kkc_segment_new ("\n", "\\");
#line 143 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_array_add3 (&segments, &segments_length1, &_segments_size_, _tmp9_);
#line 145 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp10_ = dictionary;
#line 145 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp11_ = segments;
#line 145 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp11__length1 = segments_length1;
#line 145 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_sentence_dictionary_select_segments (_tmp10_, _tmp11_, _tmp11__length1);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp12_ = dictionary;
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_save ((KkcDictionary*) _tmp12_, &_inner_error_);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		segments = (_vala_array_free (segments, segments_length1, (GDestroyNotify) g_object_unref), NULL);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 146 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1203 "user-dictionary.c"
	}
#line 130 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	segments = (_vala_array_free (segments, segments_length1, (GDestroyNotify) g_object_unref), NULL);
#line 130 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (dictionary);
#line 1209 "user-dictionary.c"
}


static void user_sentence_dictionary_tests_real_set_up (KkcTestCase* base) {
	UserSentenceDictionaryTests * self;
#line 149 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserSentenceDictionaryTests*) base;
#line 150 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_remove ("test-user-sentence-dictionary");
#line 1219 "user-dictionary.c"
}


static void user_sentence_dictionary_tests_class_init (UserSentenceDictionaryTestsClass * klass) {
#line 89 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_sentence_dictionary_tests_parent_class = g_type_class_peek_parent (klass);
#line 89 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	((KkcTestCaseClass *) klass)->set_up = user_sentence_dictionary_tests_real_set_up;
#line 1228 "user-dictionary.c"
}


static void user_sentence_dictionary_tests_instance_init (UserSentenceDictionaryTests * self) {
}


GType user_sentence_dictionary_tests_get_type (void) {
	static volatile gsize user_sentence_dictionary_tests_type_id__volatile = 0;
	if (g_once_init_enter (&user_sentence_dictionary_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (UserSentenceDictionaryTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_sentence_dictionary_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserSentenceDictionaryTests), 0, (GInstanceInitFunc) user_sentence_dictionary_tests_instance_init, NULL };
		GType user_sentence_dictionary_tests_type_id;
		user_sentence_dictionary_tests_type_id = g_type_register_static (KKC_TYPE_TEST_CASE, "UserSentenceDictionaryTests", &g_define_type_info, 0);
		g_once_init_leave (&user_sentence_dictionary_tests_type_id__volatile, user_sentence_dictionary_tests_type_id);
	}
	return user_sentence_dictionary_tests_type_id__volatile;
}


static void _user_dictionary_with_context_tests_test_conversion_kkc_test_case_test_method (gpointer self) {
#line 168 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_dictionary_with_context_tests_test_conversion ((UserDictionaryWithContextTests*) self);
#line 1251 "user-dictionary.c"
}


static void _user_dictionary_with_context_tests_test_phrase_conversion_kkc_test_case_test_method (gpointer self) {
#line 169 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_dictionary_with_context_tests_test_phrase_conversion ((UserDictionaryWithContextTests*) self);
#line 1258 "user-dictionary.c"
}


static void _user_dictionary_with_context_tests_test_register_kkc_test_case_test_method (gpointer self) {
#line 170 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_dictionary_with_context_tests_test_register ((UserDictionaryWithContextTests*) self);
#line 1265 "user-dictionary.c"
}


UserDictionaryWithContextTests* user_dictionary_with_context_tests_construct (GType object_type) {
	UserDictionaryWithContextTests * self = NULL;
	GError * _inner_error_ = NULL;
#line 159 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserDictionaryWithContextTests*) kkc_test_case_construct (object_type, "UserDictionaryWithContext");
#line 1274 "user-dictionary.c"
	{
		KkcLanguageModel* model = NULL;
		KkcLanguageModel* _tmp0_ = NULL;
		KkcContext* _tmp1_ = NULL;
#line 162 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp0_ = kkc_language_model_load ("sorted3", &_inner_error_);
#line 162 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		model = _tmp0_;
#line 162 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 162 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_LANGUAGE_MODEL_ERROR) {
#line 1287 "user-dictionary.c"
				goto __catch11_kkc_language_model_error;
			}
			goto __finally11;
		}
#line 163 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = kkc_context_new (model);
#line 163 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (self->priv->context);
#line 163 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		self->priv->context = _tmp1_;
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (model);
#line 1300 "user-dictionary.c"
	}
	goto __finally11;
	__catch11_kkc_language_model_error:
	{
		GError* e = NULL;
		FILE* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 165 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp2_ = stderr;
#line 165 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp3_ = e;
#line 165 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp4_ = _tmp3_->message;
#line 165 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		fprintf (_tmp2_, "%s\n", _tmp4_);
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1323 "user-dictionary.c"
	}
	__finally11:
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 161 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return NULL;
#line 1334 "user-dictionary.c"
	}
#line 168 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "conversion", _user_dictionary_with_context_tests_test_conversion_kkc_test_case_test_method, self);
#line 169 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "phrase-conversion", _user_dictionary_with_context_tests_test_phrase_conversion_kkc_test_case_test_method, self);
#line 170 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "register", _user_dictionary_with_context_tests_test_register_kkc_test_case_test_method, self);
#line 158 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return self;
#line 1344 "user-dictionary.c"
}


UserDictionaryWithContextTests* user_dictionary_with_context_tests_new (void) {
#line 158 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return user_dictionary_with_context_tests_construct (TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS);
#line 1351 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_test_conversion (UserDictionaryWithContextTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	KkcContext* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	KkcContext* _tmp5_ = NULL;
	KkcDictionaryList* _tmp6_ = NULL;
	KkcDictionaryList* _tmp7_ = NULL;
	KkcUserDictionary* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
#line 173 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 174 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = g_getenv ("srcdir");
#line 174 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 174 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	srcdir = _tmp1_;
#line 175 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 176 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = self->priv->context;
#line 176 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = g_build_filename (srcdir, "conversions-user-dictionary.json", NULL);
#line 176 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = _tmp3_;
#line 176 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_utils_do_conversions (_tmp2_, _tmp4_);
#line 176 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (_tmp4_);
#line 180 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp5_ = self->priv->context;
#line 180 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = kkc_context_get_dictionaries (_tmp5_);
#line 180 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = _tmp6_;
#line 180 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_list_save (_tmp7_);
#line 1395 "user-dictionary.c"
	{
		KkcUserDictionary* _tmp8_ = NULL;
		KkcUserDictionary* _tmp9_ = NULL;
#line 183 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp8_ = kkc_user_dictionary_new ("test-user-dictionary", &_inner_error_);
#line 183 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp9_ = _tmp8_;
#line 183 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp9_);
#line 183 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1407 "user-dictionary.c"
			goto __catch12_g_error;
		}
	}
	goto __finally12;
	__catch12_g_error:
	{
		GError* e = NULL;
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 185 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1423 "user-dictionary.c"
	}
	__finally12:
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 182 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1436 "user-dictionary.c"
	}
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp10_ = self->priv->user_dictionary;
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_reload ((KkcDictionary*) _tmp10_, &_inner_error_);
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 188 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1452 "user-dictionary.c"
	}
#line 173 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (srcdir);
#line 1456 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_test_phrase_conversion (UserDictionaryWithContextTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	KkcContext* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	KkcContext* _tmp5_ = NULL;
	KkcDictionaryList* _tmp6_ = NULL;
	KkcDictionaryList* _tmp7_ = NULL;
#line 191 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 192 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = g_getenv ("srcdir");
#line 192 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 192 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	srcdir = _tmp1_;
#line 193 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 194 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = self->priv->context;
#line 194 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = g_build_filename (srcdir, "conversions-user-dictionary-phrase.json", NULL);
#line 194 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = _tmp3_;
#line 194 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_test_utils_do_conversions (_tmp2_, _tmp4_);
#line 194 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (_tmp4_);
#line 198 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp5_ = self->priv->context;
#line 198 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = kkc_context_get_dictionaries (_tmp5_);
#line 198 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = _tmp6_;
#line 198 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_list_save (_tmp7_);
#line 191 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (srcdir);
#line 1500 "user-dictionary.c"
}


static void __lambda4_ (UserDictionaryWithContextTests* self) {
	KkcContext* _tmp0_ = NULL;
#line 203 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = self->priv->context;
#line 203 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_set_selection_text (_tmp0_, "abc");
#line 1510 "user-dictionary.c"
}


static void ___lambda4__kkc_context_request_selection_text (KkcContext* _sender, gpointer self) {
#line 202 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	__lambda4_ ((UserDictionaryWithContextTests*) self);
#line 1517 "user-dictionary.c"
}


static void __lambda5_ (UserDictionaryWithContextTests* self) {
	KkcContext* _tmp0_ = NULL;
#line 227 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = self->priv->context;
#line 227 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_set_selection_text (_tmp0_, NULL);
#line 1527 "user-dictionary.c"
}


static void ___lambda5__kkc_context_request_selection_text (KkcContext* _sender, gpointer self) {
#line 226 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	__lambda5_ ((UserDictionaryWithContextTests*) self);
#line 1534 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_test_register (UserDictionaryWithContextTests* self) {
	gulong handler_id = 0UL;
	KkcContext* _tmp0_ = NULL;
	gulong _tmp1_ = 0UL;
	KkcContext* _tmp3_ = NULL;
	KkcContext* _tmp4_ = NULL;
	KkcContext* _tmp6_ = NULL;
	KkcSegmentList* _tmp7_ = NULL;
	KkcSegmentList* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	KkcContext* _tmp11_ = NULL;
	KkcSegmentList* _tmp12_ = NULL;
	KkcSegmentList* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	KkcContext* _tmp16_ = NULL;
	KkcContext* _tmp17_ = NULL;
	KkcContext* _tmp18_ = NULL;
	KkcDictionaryList* _tmp19_ = NULL;
	KkcDictionaryList* _tmp20_ = NULL;
	KkcContext* _tmp21_ = NULL;
	KkcContext* _tmp22_ = NULL;
	KkcContext* _tmp24_ = NULL;
	KkcContext* _tmp25_ = NULL;
	KkcContext* _tmp29_ = NULL;
	KkcContext* _tmp30_ = NULL;
	KkcContext* _tmp32_ = NULL;
	KkcContext* _tmp33_ = NULL;
	KkcContext* _tmp35_ = NULL;
	KkcSegmentList* _tmp36_ = NULL;
	KkcSegmentList* _tmp37_ = NULL;
	gint _tmp38_ = 0;
	gint _tmp39_ = 0;
	KkcContext* _tmp40_ = NULL;
	KkcSegmentList* _tmp41_ = NULL;
	KkcSegmentList* _tmp42_ = NULL;
	gchar* _tmp43_ = NULL;
	gchar* _tmp44_ = NULL;
	KkcContext* _tmp45_ = NULL;
	KkcContext* _tmp46_ = NULL;
	GError * _inner_error_ = NULL;
#line 201 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 202 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = self->priv->context;
#line 202 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp1_ = g_signal_connect_object (_tmp0_, "request-selection-text", (GCallback) ___lambda4__kkc_context_request_selection_text, self, 0);
#line 202 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	handler_id = _tmp1_;
#line 1588 "user-dictionary.c"
	{
		KkcContext* _tmp2_ = NULL;
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp2_ = self->priv->context;
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp2_, "A-r a i SPC RET", &_inner_error_);
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1599 "user-dictionary.c"
				goto __catch13_kkc_key_event_format_error;
			}
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 206 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1608 "user-dictionary.c"
		}
	}
	goto __finally13;
	__catch13_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 208 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1623 "user-dictionary.c"
	}
	__finally13:
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 205 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1634 "user-dictionary.c"
	}
#line 210 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = self->priv->context;
#line 210 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp3_);
#line 211 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = self->priv->context;
#line 211 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp4_);
#line 1644 "user-dictionary.c"
	{
		KkcContext* _tmp5_ = NULL;
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp5_ = self->priv->context;
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp5_, "a i SPC", &_inner_error_);
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1655 "user-dictionary.c"
				goto __catch14_kkc_key_event_format_error;
			}
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 214 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1664 "user-dictionary.c"
		}
	}
	goto __finally14;
	__catch14_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 216 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1679 "user-dictionary.c"
	}
	__finally14:
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 213 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1690 "user-dictionary.c"
	}
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = self->priv->context;
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = kkc_context_get_segments (_tmp6_);
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp8_ = _tmp7_;
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp9_ = kkc_segment_list_get_size (_tmp8_);
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp10_ = _tmp9_;
#line 218 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (_tmp10_ == 1, "context.segments.size == 1");
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp11_ = self->priv->context;
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp12_ = kkc_context_get_segments (_tmp11_);
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp13_ = _tmp12_;
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp14_ = kkc_segment_list_get_output (_tmp13_);
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp15_ = _tmp14_;
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (g_strcmp0 (_tmp15_, "abc") == 0, "context.segments.get_output () == \"abc\"");
#line 219 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (_tmp15_);
#line 220 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp16_ = self->priv->context;
#line 220 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp16_);
#line 221 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp17_ = self->priv->context;
#line 221 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp17_);
#line 223 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp18_ = self->priv->context;
#line 223 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp19_ = kkc_context_get_dictionaries (_tmp18_);
#line 223 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp20_ = _tmp19_;
#line 223 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_list_save (_tmp20_);
#line 225 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp21_ = self->priv->context;
#line 225 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_signal_handler_disconnect ((GObject*) _tmp21_, handler_id);
#line 226 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp22_ = self->priv->context;
#line 226 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_signal_connect_object (_tmp22_, "request-selection-text", (GCallback) ___lambda5__kkc_context_request_selection_text, self, 0);
#line 1742 "user-dictionary.c"
	{
		KkcContext* _tmp23_ = NULL;
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp23_ = self->priv->context;
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp23_, "A-r a i SPC", &_inner_error_);
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1753 "user-dictionary.c"
				goto __catch15_kkc_key_event_format_error;
			}
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 230 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1762 "user-dictionary.c"
		}
	}
	goto __finally15;
	__catch15_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 232 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1777 "user-dictionary.c"
	}
	__finally15:
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 229 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1788 "user-dictionary.c"
	}
#line 234 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp24_ = self->priv->context;
#line 234 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp24_);
#line 235 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp25_ = self->priv->context;
#line 235 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp25_);
#line 1798 "user-dictionary.c"
	{
		KkcUserDictionary* _tmp26_ = NULL;
		KkcUserDictionary* _tmp27_ = NULL;
#line 238 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp26_ = kkc_user_dictionary_new ("test-user-dictionary", &_inner_error_);
#line 238 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp27_ = _tmp26_;
#line 238 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp27_);
#line 238 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1810 "user-dictionary.c"
			goto __catch16_g_error;
		}
	}
	goto __finally16;
	__catch16_g_error:
	{
		GError* e = NULL;
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 240 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1826 "user-dictionary.c"
	}
	__finally16:
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 237 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1837 "user-dictionary.c"
	}
	{
		KkcContext* _tmp28_ = NULL;
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp28_ = self->priv->context;
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp28_, "a TAB", &_inner_error_);
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1849 "user-dictionary.c"
				goto __catch17_kkc_key_event_format_error;
			}
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 244 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1858 "user-dictionary.c"
		}
	}
	goto __finally17;
	__catch17_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 246 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1873 "user-dictionary.c"
	}
	__finally17:
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 243 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1884 "user-dictionary.c"
	}
#line 248 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp29_ = self->priv->context;
#line 248 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp29_);
#line 249 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp30_ = self->priv->context;
#line 249 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp30_);
#line 1894 "user-dictionary.c"
	{
		KkcContext* _tmp31_ = NULL;
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp31_ = self->priv->context;
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp31_, "a i SPC C-BackSpace", &_inner_error_);
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1905 "user-dictionary.c"
				goto __catch18_kkc_key_event_format_error;
			}
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 252 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1914 "user-dictionary.c"
		}
	}
	goto __finally18;
	__catch18_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 254 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1929 "user-dictionary.c"
	}
	__finally18:
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 251 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1940 "user-dictionary.c"
	}
#line 256 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp32_ = self->priv->context;
#line 256 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp32_);
#line 257 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp33_ = self->priv->context;
#line 257 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp33_);
#line 1950 "user-dictionary.c"
	{
		KkcContext* _tmp34_ = NULL;
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp34_ = self->priv->context;
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_context_process_key_events (_tmp34_, "a i SPC", &_inner_error_);
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 1961 "user-dictionary.c"
				goto __catch19_kkc_key_event_format_error;
			}
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 260 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 1970 "user-dictionary.c"
		}
	}
	goto __finally19;
	__catch19_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 262 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 1985 "user-dictionary.c"
	}
	__finally19:
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 259 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 1996 "user-dictionary.c"
	}
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp35_ = self->priv->context;
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp36_ = kkc_context_get_segments (_tmp35_);
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp37_ = _tmp36_;
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp38_ = kkc_segment_list_get_size (_tmp37_);
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp39_ = _tmp38_;
#line 264 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (_tmp39_ == 1, "context.segments.size == 1");
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp40_ = self->priv->context;
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp41_ = kkc_context_get_segments (_tmp40_);
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp42_ = _tmp41_;
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp43_ = kkc_segment_list_get_output (_tmp42_);
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp44_ = _tmp43_;
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_vala_assert (g_strcmp0 (_tmp44_, "abc") != 0, "context.segments.get_output () != \"abc\"");
#line 265 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_free0 (_tmp44_);
#line 266 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp45_ = self->priv->context;
#line 266 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_reset (_tmp45_);
#line 267 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp46_ = self->priv->context;
#line 267 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_context_clear_output (_tmp46_);
#line 2032 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_real_set_up (KkcTestCase* base) {
	UserDictionaryWithContextTests * self;
	gboolean _tmp0_ = FALSE;
	GError * _inner_error_ = NULL;
#line 270 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserDictionaryWithContextTests*) base;
#line 271 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = g_file_test ("test-user-dictionary", G_FILE_TEST_EXISTS);
#line 271 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (_tmp0_) {
#line 2046 "user-dictionary.c"
		{
#line 273 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			kkc_test_utils_remove_dir ("test-user-dictionary", &_inner_error_);
#line 273 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2052 "user-dictionary.c"
				goto __catch20_g_error;
			}
		}
		goto __finally20;
		__catch20_g_error:
		{
			GError* e = NULL;
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			e = _inner_error_;
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			_inner_error_ = NULL;
#line 275 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_assert_not_reached ();
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			_g_error_free0 (e);
#line 2068 "user-dictionary.c"
		}
		__finally20:
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			g_clear_error (&_inner_error_);
#line 272 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			return;
#line 2079 "user-dictionary.c"
		}
	}
	{
		KkcUserDictionary* _tmp1_ = NULL;
		KkcUserDictionary* _tmp2_ = NULL;
		KkcUserDictionary* _tmp3_ = NULL;
		KkcContext* _tmp4_ = NULL;
		KkcDictionaryList* _tmp5_ = NULL;
		KkcDictionaryList* _tmp6_ = NULL;
		KkcUserDictionary* _tmp7_ = NULL;
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp2_ = kkc_user_dictionary_new ("test-user-dictionary", &_inner_error_);
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = _tmp2_;
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2096 "user-dictionary.c"
			goto __catch21_g_error;
		}
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp3_ = _tmp1_;
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp1_ = NULL;
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (self->priv->user_dictionary);
#line 280 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		self->priv->user_dictionary = _tmp3_;
#line 282 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp4_ = self->priv->context;
#line 282 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp5_ = kkc_context_get_dictionaries (_tmp4_);
#line 282 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp6_ = _tmp5_;
#line 282 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp7_ = self->priv->user_dictionary;
#line 282 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_dictionary_list_add (_tmp6_, (KkcDictionary*) _tmp7_);
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (_tmp1_);
#line 2119 "user-dictionary.c"
	}
	goto __finally21;
	__catch21_g_error:
	{
		GError* e = NULL;
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 284 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_assert_not_reached ();
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 2133 "user-dictionary.c"
	}
	__finally21:
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 279 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 2144 "user-dictionary.c"
	}
	{
		gchar* srcdir = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		KkcSystemSegmentDictionary* dictionary = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		KkcSystemSegmentDictionary* _tmp12_ = NULL;
		KkcSystemSegmentDictionary* _tmp13_ = NULL;
		KkcContext* _tmp14_ = NULL;
		KkcDictionaryList* _tmp15_ = NULL;
		KkcDictionaryList* _tmp16_ = NULL;
#line 288 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp8_ = g_getenv ("srcdir");
#line 288 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp9_ = g_strdup (_tmp8_);
#line 288 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		srcdir = _tmp9_;
#line 289 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_vala_assert (srcdir != NULL, "srcdir != null");
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp10_ = g_build_filename (srcdir, "system-segment-dictionary", NULL);
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp11_ = _tmp10_;
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp12_ = kkc_system_segment_dictionary_new (_tmp11_, "EUC-JP", &_inner_error_);
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp13_ = _tmp12_;
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (_tmp11_);
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		dictionary = _tmp13_;
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 290 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
			_g_free0 (srcdir);
#line 2182 "user-dictionary.c"
			goto __catch22_g_error;
		}
#line 292 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp14_ = self->priv->context;
#line 292 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp15_ = kkc_context_get_dictionaries (_tmp14_);
#line 292 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp16_ = _tmp15_;
#line 292 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		kkc_dictionary_list_add (_tmp16_, (KkcDictionary*) dictionary);
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_object_unref0 (dictionary);
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_free0 (srcdir);
#line 2197 "user-dictionary.c"
	}
	goto __finally22;
	__catch22_g_error:
	{
		GError* e = NULL;
		FILE* _tmp17_ = NULL;
		GError* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		e = _inner_error_;
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_inner_error_ = NULL;
#line 294 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp17_ = stderr;
#line 294 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp18_ = e;
#line 294 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_tmp19_ = _tmp18_->message;
#line 294 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		fprintf (_tmp17_, "%s\n", _tmp19_);
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		_g_error_free0 (e);
#line 2220 "user-dictionary.c"
	}
	__finally22:
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 287 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
		return;
#line 2231 "user-dictionary.c"
	}
}


static void user_dictionary_with_context_tests_real_tear_down (KkcTestCase* base) {
	UserDictionaryWithContextTests * self;
	KkcContext* _tmp0_ = NULL;
	KkcDictionaryList* _tmp1_ = NULL;
	KkcDictionaryList* _tmp2_ = NULL;
#line 298 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = (UserDictionaryWithContextTests*) base;
#line 299 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = self->priv->context;
#line 299 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp1_ = kkc_context_get_dictionaries (_tmp0_);
#line 299 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = _tmp1_;
#line 299 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_dictionary_list_clear (_tmp2_);
#line 2251 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_class_init (UserDictionaryWithContextTestsClass * klass) {
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	user_dictionary_with_context_tests_parent_class = g_type_class_peek_parent (klass);
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_type_class_add_private (klass, sizeof (UserDictionaryWithContextTestsPrivate));
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	((KkcTestCaseClass *) klass)->set_up = user_dictionary_with_context_tests_real_set_up;
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	((KkcTestCaseClass *) klass)->tear_down = user_dictionary_with_context_tests_real_tear_down;
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	G_OBJECT_CLASS (klass)->finalize = user_dictionary_with_context_tests_finalize;
#line 2266 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_instance_init (UserDictionaryWithContextTests * self) {
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self->priv = USER_DICTIONARY_WITH_CONTEXT_TESTS_GET_PRIVATE (self);
#line 2273 "user-dictionary.c"
}


static void user_dictionary_with_context_tests_finalize (GObject* obj) {
	UserDictionaryWithContextTests * self;
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_USER_DICTIONARY_WITH_CONTEXT_TESTS, UserDictionaryWithContextTests);
#line 155 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (self->priv->context);
#line 156 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (self->priv->user_dictionary);
#line 154 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	G_OBJECT_CLASS (user_dictionary_with_context_tests_parent_class)->finalize (obj);
#line 2287 "user-dictionary.c"
}


GType user_dictionary_with_context_tests_get_type (void) {
	static volatile gsize user_dictionary_with_context_tests_type_id__volatile = 0;
	if (g_once_init_enter (&user_dictionary_with_context_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (UserDictionaryWithContextTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_dictionary_with_context_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserDictionaryWithContextTests), 0, (GInstanceInitFunc) user_dictionary_with_context_tests_instance_init, NULL };
		GType user_dictionary_with_context_tests_type_id;
		user_dictionary_with_context_tests_type_id = g_type_register_static (KKC_TYPE_TEST_CASE, "UserDictionaryWithContextTests", &g_define_type_info, 0);
		g_once_init_leave (&user_dictionary_with_context_tests_type_id__volatile, user_dictionary_with_context_tests_type_id);
	}
	return user_dictionary_with_context_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* root = NULL;
	GTestSuite* _tmp0_ = NULL;
	UserSegmentDictionaryTests* _tmp1_ = NULL;
	UserSegmentDictionaryTests* _tmp2_ = NULL;
	GTestSuite* _tmp3_ = NULL;
	UserSentenceDictionaryTests* _tmp4_ = NULL;
	UserSentenceDictionaryTests* _tmp5_ = NULL;
	GTestSuite* _tmp6_ = NULL;
	UserDictionaryWithContextTests* _tmp7_ = NULL;
	UserDictionaryWithContextTests* _tmp8_ = NULL;
	GTestSuite* _tmp9_ = NULL;
#line 304 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	setlocale (LC_ALL, "");
#line 306 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_test_init (&args_length1, &args, NULL);
#line 307 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	kkc_init ();
#line 309 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp0_ = g_test_get_root ();
#line 309 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	root = _tmp0_;
#line 310 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp1_ = user_segment_dictionary_tests_new ();
#line 310 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp2_ = _tmp1_;
#line 310 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp3_ = kkc_test_case_get_suite ((KkcTestCase*) _tmp2_);
#line 310 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 310 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp2_);
#line 311 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp4_ = user_sentence_dictionary_tests_new ();
#line 311 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp5_ = _tmp4_;
#line 311 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp6_ = kkc_test_case_get_suite ((KkcTestCase*) _tmp5_);
#line 311 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_test_suite_add_suite (root, _tmp6_);
#line 311 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp5_);
#line 312 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp7_ = user_dictionary_with_context_tests_new ();
#line 312 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp8_ = _tmp7_;
#line 312 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_tmp9_ = kkc_test_case_get_suite ((KkcTestCase*) _tmp8_);
#line 312 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_test_suite_add_suite (root, _tmp9_);
#line 312 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	_g_object_unref0 (_tmp8_);
#line 314 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	g_test_run ();
#line 316 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	result = 0;
#line 316 "/home/ueno/devel/libkkc/tests/user-dictionary.vala"
	return result;
#line 2362 "user-dictionary.c"
}


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


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



