/* candidate-list.c generated by valac 0.26.0.83-ed603, the Vala compiler
 * generated from candidate-list.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>


#define TYPE_CANDIDATE_LIST_TESTS (candidate_list_tests_get_type ())
#define CANDIDATE_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CANDIDATE_LIST_TESTS, CandidateListTests))
#define CANDIDATE_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CANDIDATE_LIST_TESTS, CandidateListTestsClass))
#define IS_CANDIDATE_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CANDIDATE_LIST_TESTS))
#define IS_CANDIDATE_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CANDIDATE_LIST_TESTS))
#define CANDIDATE_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CANDIDATE_LIST_TESTS, CandidateListTestsClass))

typedef struct _CandidateListTests CandidateListTests;
typedef struct _CandidateListTestsClass CandidateListTestsClass;
typedef struct _CandidateListTestsPrivate CandidateListTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _CandidateListTests {
	KkcTestCase parent_instance;
	CandidateListTestsPrivate * priv;
};

struct _CandidateListTestsClass {
	KkcTestCaseClass parent_class;
};


static gpointer candidate_list_tests_parent_class = NULL;

GType candidate_list_tests_get_type (void) G_GNUC_CONST;
enum  {
	CANDIDATE_LIST_TESTS_DUMMY_PROPERTY
};
CandidateListTests* candidate_list_tests_new (void);
CandidateListTests* candidate_list_tests_construct (GType object_type);
static void candidate_list_tests_test_properties (CandidateListTests* self);
static void _candidate_list_tests_test_properties_kkc_test_case_test_method (gpointer self);
static void candidate_list_tests_test_cursor_move (CandidateListTests* self);
static void _candidate_list_tests_test_cursor_move_kkc_test_case_test_method (gpointer self);
gint _vala_main (gchar** args, int args_length1);


static void _candidate_list_tests_test_properties_kkc_test_case_test_method (gpointer self) {
#line 5 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	candidate_list_tests_test_properties ((CandidateListTests*) self);
#line 58 "candidate-list.c"
}


static void _candidate_list_tests_test_cursor_move_kkc_test_case_test_method (gpointer self) {
#line 6 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	candidate_list_tests_test_cursor_move ((CandidateListTests*) self);
#line 65 "candidate-list.c"
}


CandidateListTests* candidate_list_tests_construct (GType object_type) {
	CandidateListTests * self = NULL;
#line 3 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	self = (CandidateListTests*) kkc_test_case_construct (object_type, "CandidateList");
#line 5 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "properties", _candidate_list_tests_test_properties_kkc_test_case_test_method, self);
#line 6 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_test_case_add_test ((KkcTestCase*) self, "cursor_move", _candidate_list_tests_test_cursor_move_kkc_test_case_test_method, self);
#line 2 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	return self;
#line 79 "candidate-list.c"
}


CandidateListTests* candidate_list_tests_new (void) {
#line 2 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	return candidate_list_tests_construct (TYPE_CANDIDATE_LIST_TESTS);
#line 86 "candidate-list.c"
}


static void candidate_list_tests_test_properties (CandidateListTests* self) {
	GObject* candidates = NULL;
	KkcCandidateList* _tmp0_ = NULL;
	GObject* _tmp1_ = NULL;
	gint cursor_pos = 0;
	gint size = 0;
	guint page_start = 0U;
	guint page_size = 0U;
	gboolean round = FALSE;
	gboolean page_visible = FALSE;
#line 9 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_return_if_fail (self != NULL);
#line 10 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp0_ = kkc_candidate_list_new ((guint) 4, (guint) 7, FALSE);
#line 10 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, G_TYPE_OBJECT) ? ((GObject*) _tmp0_) : NULL;
#line 10 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	if (_tmp1_ == NULL) {
#line 10 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
		_g_object_unref0 (_tmp0_);
#line 110 "candidate-list.c"
	}
#line 10 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	candidates = _tmp1_;
#line 19 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_object_get (candidates, "cursor-pos", &cursor_pos, "size", &size, "page-start", &page_start, "page-size", &page_size, "round", &round, "page-visible", &page_visible, NULL);
#line 26 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_object_set (candidates, "cursor-pos", cursor_pos, "page-start", page_start, "page-size", page_size, "round", round, NULL);
#line 9 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (candidates);
#line 120 "candidate-list.c"
}


static void candidate_list_tests_test_cursor_move (CandidateListTests* self) {
	KkcCandidateList* candidates = NULL;
	KkcCandidateList* _tmp0_ = NULL;
	KkcCandidate* _tmp1_ = NULL;
	KkcCandidate* _tmp2_ = NULL;
	KkcCandidate* _tmp3_ = NULL;
	KkcCandidate* _tmp4_ = NULL;
	KkcCandidate* _tmp5_ = NULL;
	KkcCandidate* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	KkcCandidate* _tmp13_ = NULL;
	KkcCandidate* _tmp14_ = NULL;
	KkcCandidate* _tmp15_ = NULL;
	KkcCandidate* _tmp16_ = NULL;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gboolean _tmp22_ = FALSE;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	gboolean _tmp25_ = FALSE;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gboolean _tmp28_ = FALSE;
	gint _tmp29_ = 0;
	gint _tmp30_ = 0;
	gboolean _tmp31_ = FALSE;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp35_ = FALSE;
	gboolean _tmp36_ = FALSE;
	gint _tmp37_ = 0;
	gint _tmp38_ = 0;
#line 32 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_return_if_fail (self != NULL);
#line 33 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp0_ = kkc_candidate_list_new ((guint) 4, (guint) 7, FALSE);
#line 33 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	candidates = _tmp0_;
#line 35 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_set_page_start (candidates, (guint) 2);
#line 36 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_set_page_size (candidates, (guint) 3);
#line 38 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp1_ = kkc_candidate_new ("a", FALSE, "1", NULL, NULL);
#line 38 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp2_ = _tmp1_;
#line 38 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_add (candidates, _tmp2_);
#line 38 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp2_);
#line 39 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp3_ = kkc_candidate_new ("a", FALSE, "2", NULL, NULL);
#line 39 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp4_ = _tmp3_;
#line 39 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_add (candidates, _tmp4_);
#line 39 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp4_);
#line 40 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp5_ = kkc_candidate_new ("a", FALSE, "3", NULL, NULL);
#line 40 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp6_ = _tmp5_;
#line 40 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_add (candidates, _tmp6_);
#line 40 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp6_);
#line 42 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp7_ = kkc_candidate_list_get_page_visible (candidates);
#line 42 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp8_ = _tmp7_;
#line 42 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (!_tmp8_, "!candidates.page_visible");
#line 43 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_cursor_down (candidates);
#line 44 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp9_ = kkc_candidate_list_get_page_visible (candidates);
#line 44 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp10_ = _tmp9_;
#line 44 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (!_tmp10_, "!candidates.page_visible");
#line 45 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_cursor_down (candidates);
#line 46 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp11_ = kkc_candidate_list_get_page_visible (candidates);
#line 46 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp12_ = _tmp11_;
#line 46 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp12_, "candidates.page_visible");
#line 48 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp13_ = kkc_candidate_new ("a", FALSE, "4", NULL, NULL);
#line 48 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp14_ = _tmp13_;
#line 48 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_add (candidates, _tmp14_);
#line 48 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp14_);
#line 49 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp15_ = kkc_candidate_new ("a", FALSE, "5", NULL, NULL);
#line 49 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp16_ = _tmp15_;
#line 49 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_add (candidates, _tmp16_);
#line 49 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp16_);
#line 51 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_set_round (candidates, FALSE);
#line 52 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp17_ = kkc_candidate_list_page_down (candidates);
#line 52 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (!_tmp17_, "!candidates.page_down ()");
#line 53 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp18_ = kkc_candidate_list_page_up (candidates);
#line 53 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (!_tmp18_, "!candidates.page_up ()");
#line 55 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_set_round (candidates, TRUE);
#line 56 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp19_ = kkc_candidate_list_page_down (candidates);
#line 56 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp19_, "candidates.page_down ()");
#line 57 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp20_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 57 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp21_ = _tmp20_;
#line 57 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp21_ == 0, "candidates.cursor_pos == 0");
#line 58 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp22_ = kkc_candidate_list_page_up (candidates);
#line 58 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp22_, "candidates.page_up ()");
#line 59 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp23_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 59 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp24_ = _tmp23_;
#line 59 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp24_ == 3, "candidates.cursor_pos == 3");
#line 61 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp25_ = kkc_candidate_list_select_at (candidates, (guint) 1);
#line 61 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp25_, "candidates.select_at (1)");
#line 62 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp26_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 62 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp27_ = _tmp26_;
#line 62 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp27_ == 4, "candidates.cursor_pos == 4");
#line 64 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_candidate_list_first (candidates);
#line 65 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp28_ = kkc_candidate_list_next (candidates);
#line 65 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp28_, "candidates.next ()");
#line 66 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp29_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 66 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp30_ = _tmp29_;
#line 66 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp30_ == 1, "candidates.cursor_pos == 1");
#line 67 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp31_ = kkc_candidate_list_previous (candidates);
#line 67 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp31_, "candidates.previous ()");
#line 68 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp32_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 68 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp33_ = _tmp32_;
#line 68 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp33_ == 0, "candidates.cursor_pos == 0");
#line 69 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp34_ = kkc_candidate_list_next (candidates);
#line 69 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp34_, "candidates.next ()");
#line 70 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp35_ = kkc_candidate_list_next (candidates);
#line 70 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp35_, "candidates.next ()");
#line 71 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp36_ = kkc_candidate_list_next (candidates);
#line 71 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp36_, "candidates.next ()");
#line 72 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp37_ = kkc_candidate_list_get_cursor_pos (candidates);
#line 72 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp38_ = _tmp37_;
#line 72 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_vala_assert (_tmp38_ == 0, "candidates.cursor_pos == 0");
#line 32 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (candidates);
#line 321 "candidate-list.c"
}


static void candidate_list_tests_class_init (CandidateListTestsClass * klass) {
#line 1 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	candidate_list_tests_parent_class = g_type_class_peek_parent (klass);
#line 328 "candidate-list.c"
}


static void candidate_list_tests_instance_init (CandidateListTests * self) {
}


GType candidate_list_tests_get_type (void) {
	static volatile gsize candidate_list_tests_type_id__volatile = 0;
	if (g_once_init_enter (&candidate_list_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (CandidateListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) candidate_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CandidateListTests), 0, (GInstanceInitFunc) candidate_list_tests_instance_init, NULL };
		GType candidate_list_tests_type_id;
		candidate_list_tests_type_id = g_type_register_static (KKC_TYPE_TEST_CASE, "CandidateListTests", &g_define_type_info, 0);
		g_once_init_leave (&candidate_list_tests_type_id__volatile, candidate_list_tests_type_id);
	}
	return candidate_list_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* root = NULL;
	GTestSuite* _tmp0_ = NULL;
	CandidateListTests* _tmp1_ = NULL;
	CandidateListTests* _tmp2_ = NULL;
	GTestSuite* _tmp3_ = NULL;
#line 77 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_test_init (&args_length1, &args, NULL);
#line 78 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	kkc_init ();
#line 80 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp0_ = g_test_get_root ();
#line 80 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	root = _tmp0_;
#line 81 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp1_ = candidate_list_tests_new ();
#line 81 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp2_ = _tmp1_;
#line 81 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_tmp3_ = kkc_test_case_get_suite ((KkcTestCase*) _tmp2_);
#line 81 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 81 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	_g_object_unref0 (_tmp2_);
#line 83 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	g_test_run ();
#line 85 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	result = 0;
#line 85 "/home/ueno/devel/libkkc/tests/candidate-list.vala"
	return result;
#line 379 "candidate-list.c"
}


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



