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

/* testbidirsortedset.vala
 *
 * Copyright (C) 2012  Maciej Piechotka
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Maciej Piechotka <uzytkownik2@gmail.com>
 */

#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))

typedef struct _GeeTestCase GeeTestCase;
typedef struct _GeeTestCaseClass GeeTestCaseClass;
typedef struct _GeeTestCasePrivate GeeTestCasePrivate;

#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))

typedef struct _CollectionTests CollectionTests;
typedef struct _CollectionTestsClass CollectionTestsClass;
typedef struct _CollectionTestsPrivate CollectionTestsPrivate;

#define TYPE_SET_TESTS (set_tests_get_type ())
#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))

typedef struct _SetTests SetTests;
typedef struct _SetTestsClass SetTestsClass;
typedef struct _SetTestsPrivate SetTestsPrivate;

#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))

typedef struct _SortedSetTests SortedSetTests;
typedef struct _SortedSetTestsClass SortedSetTestsClass;
typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;

#define TYPE_BIDIR_SORTED_SET_TESTS (bidir_sorted_set_tests_get_type ())
#define BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTests))
#define BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
#define IS_BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_SET_TESTS))
#define IS_BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_SET_TESTS))
#define BIDIR_SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))

typedef struct _BidirSortedSetTests BidirSortedSetTests;
typedef struct _BidirSortedSetTestsClass BidirSortedSetTestsClass;
typedef struct _BidirSortedSetTestsPrivate BidirSortedSetTestsPrivate;
enum  {
	BIDIR_SORTED_SET_TESTS_0_PROPERTY,
	BIDIR_SORTED_SET_TESTS_NUM_PROPERTIES
};
static GParamSpec* bidir_sorted_set_tests_properties[BIDIR_SORTED_SET_TESTS_NUM_PROPERTIES];
typedef void (*GeeTestCaseTestMethod) (gpointer user_data);
typedef enum  {
	SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD,
	SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL,
	SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB,
	SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY
} SortedSetTestsSubSetTestsType;

#define SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TYPE (sorted_set_tests_sub_set_tests_type_get_type ())

#define BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS (bidir_sorted_set_tests_bidir_sub_set_tests_get_type ())
#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTests))
#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTestsClass))
#define BIDIR_SORTED_SET_TESTS_IS_BIDIR_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS))
#define BIDIR_SORTED_SET_TESTS_IS_BIDIR_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS))
#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTestsClass))

typedef struct _BidirSortedSetTestsBidirSubSetTests BidirSortedSetTestsBidirSubSetTests;
typedef struct _BidirSortedSetTestsBidirSubSetTestsClass BidirSortedSetTestsBidirSubSetTestsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BidirSortedSetTestsBidirSubSetTestsPrivate BidirSortedSetTestsBidirSubSetTestsPrivate;
enum  {
	BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_0_PROPERTY,
	BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_NUM_PROPERTIES
};
static GParamSpec* bidir_sorted_set_tests_bidir_sub_set_tests_properties[BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_NUM_PROPERTIES];
#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 _GeeTestCase {
	GObject parent_instance;
	GeeTestCasePrivate * priv;
};

struct _GeeTestCaseClass {
	GObjectClass parent_class;
	void (*set_up) (GeeTestCase* self);
	void (*tear_down) (GeeTestCase* self);
};

struct _CollectionTests {
	GeeTestCase parent_instance;
	CollectionTestsPrivate * priv;
	GeeCollection* test_collection;
};

struct _CollectionTestsClass {
	GeeTestCaseClass parent_class;
};

struct _SetTests {
	CollectionTests parent_instance;
	SetTestsPrivate * priv;
};

struct _SetTestsClass {
	CollectionTestsClass parent_class;
	void (*test_duplicates_are_ignored) (SetTests* self);
};

struct _SortedSetTests {
	SetTests parent_instance;
	SortedSetTestsPrivate * priv;
};

struct _SortedSetTestsClass {
	SetTestsClass parent_class;
};

struct _BidirSortedSetTests {
	SortedSetTests parent_instance;
	BidirSortedSetTestsPrivate * priv;
};

struct _BidirSortedSetTestsClass {
	SortedSetTestsClass parent_class;
};

struct _BidirSortedSetTestsBidirSubSetTests {
	GeeTestCase parent_instance;
	BidirSortedSetTestsBidirSubSetTestsPrivate * priv;
};

struct _BidirSortedSetTestsBidirSubSetTestsClass {
	GeeTestCaseClass parent_class;
};

struct _BidirSortedSetTestsBidirSubSetTestsPrivate {
	GeeBidirSortedSet* master;
	GeeBidirSortedSet* subset;
	BidirSortedSetTests* test;
	SortedSetTestsSubSetTestsType type;
};

static gpointer bidir_sorted_set_tests_parent_class = NULL;
static gint BidirSortedSetTestsBidirSubSetTests_private_offset;
static gpointer bidir_sorted_set_tests_bidir_sub_set_tests_parent_class = NULL;

VALA_EXTERN GType gee_test_case_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCase, g_object_unref)
VALA_EXTERN GType collection_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionTests, g_object_unref)
VALA_EXTERN GType set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SetTests, g_object_unref)
VALA_EXTERN GType sorted_set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SortedSetTests, g_object_unref)
VALA_EXTERN GType bidir_sorted_set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BidirSortedSetTests, g_object_unref)
VALA_EXTERN BidirSortedSetTests* bidir_sorted_set_tests_construct (GType object_type,
                                                       const gchar* name);
VALA_EXTERN SortedSetTests* sorted_set_tests_construct (GType object_type,
                                            const gchar* name,
                                            gboolean strict);
VALA_EXTERN void gee_test_case_add_test (GeeTestCase* self,
                             const gchar* name,
                             GeeTestCaseTestMethod test,
                             gpointer test_target,
                             GDestroyNotify test_target_destroy_notify);
VALA_EXTERN void bidir_sorted_set_tests_test_bidir_iterator_can_go_backward (BidirSortedSetTests* self);
static void _bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self);
VALA_EXTERN void bidir_sorted_set_tests_test_mutable_bidir_iterator (BidirSortedSetTests* self);
static void _bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self);
VALA_EXTERN void bidir_sorted_set_tests_test_bidir_iterator_first (BidirSortedSetTests* self);
static void _bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method (gpointer self);
VALA_EXTERN void bidir_sorted_set_tests_test_bidir_iterator_last (BidirSortedSetTests* self);
static void _bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self);
VALA_EXTERN GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
VALA_EXTERN GType sorted_set_tests_sub_set_tests_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_new (BidirSortedSetTests* test,
                                                                                     SortedSetTestsSubSetTestsType type);
VALA_EXTERN BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_construct (GType object_type,
                                                                                           BidirSortedSetTests* test,
                                                                                           SortedSetTestsSubSetTestsType type);
VALA_EXTERN GType bidir_sorted_set_tests_bidir_sub_set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BidirSortedSetTestsBidirSubSetTests, g_object_unref)
VALA_EXTERN void gee_test_case_set_up (GeeTestCase* self);
VALA_EXTERN void gee_test_case_tear_down (GeeTestCase* self);
VALA_EXTERN const gchar* sorted_set_tests_sub_set_tests_type_to_string (SortedSetTestsSubSetTestsType self);
VALA_EXTERN GeeTestCase* gee_test_case_construct (GType object_type,
                                      const gchar* name);
VALA_EXTERN void bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator (BidirSortedSetTestsBidirSubSetTests* self);
static void _bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method (gpointer self);
static void bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up (GeeTestCase* base);
static void bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down (GeeTestCase* base);
static void bidir_sorted_set_tests_bidir_sub_set_tests_finalize (GObject * obj);
static GType bidir_sorted_set_tests_bidir_sub_set_tests_get_type_once (void);
static GType bidir_sorted_set_tests_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static void
_bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self)
{
	bidir_sorted_set_tests_test_bidir_iterator_can_go_backward ((BidirSortedSetTests*) self);
}

static void
_bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self)
{
	bidir_sorted_set_tests_test_mutable_bidir_iterator ((BidirSortedSetTests*) self);
}

static void
_bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method (gpointer self)
{
	bidir_sorted_set_tests_test_bidir_iterator_first ((BidirSortedSetTests*) self);
}

static void
_bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self)
{
	bidir_sorted_set_tests_test_bidir_iterator_last ((BidirSortedSetTests*) self);
}

BidirSortedSetTests*
bidir_sorted_set_tests_construct (GType object_type,
                                  const gchar* name)
{
	BidirSortedSetTests * self = NULL;
	GTestSuite* _tmp0_;
	BidirSortedSetTestsBidirSubSetTests* _tmp1_;
	BidirSortedSetTestsBidirSubSetTests* _tmp2_;
	GTestSuite* _tmp3_;
	GTestSuite* _tmp4_;
	BidirSortedSetTestsBidirSubSetTests* _tmp5_;
	BidirSortedSetTestsBidirSubSetTests* _tmp6_;
	GTestSuite* _tmp7_;
	GTestSuite* _tmp8_;
	BidirSortedSetTestsBidirSubSetTests* _tmp9_;
	BidirSortedSetTestsBidirSubSetTests* _tmp10_;
	GTestSuite* _tmp11_;
	GTestSuite* _tmp12_;
	BidirSortedSetTestsBidirSubSetTests* _tmp13_;
	BidirSortedSetTestsBidirSubSetTests* _tmp14_;
	GTestSuite* _tmp15_;
	g_return_val_if_fail (name != NULL, NULL);
	self = (BidirSortedSetTests*) sorted_set_tests_construct (object_type, name, TRUE);
	gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can go backward", _bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators are mutable", _bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to beginning", _bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to end", _bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	_tmp0_ = gee_test_case_get_suite ((GeeTestCase*) self);
	_tmp1_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_test_case_get_suite ((GeeTestCase*) _tmp2_);
	g_test_suite_add_suite (_tmp0_, _tmp3_);
	_g_object_unref0 (_tmp2_);
	_tmp4_ = gee_test_case_get_suite ((GeeTestCase*) self);
	_tmp5_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_test_case_get_suite ((GeeTestCase*) _tmp6_);
	g_test_suite_add_suite (_tmp4_, _tmp7_);
	_g_object_unref0 (_tmp6_);
	_tmp8_ = gee_test_case_get_suite ((GeeTestCase*) self);
	_tmp9_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB);
	_tmp10_ = _tmp9_;
	_tmp11_ = gee_test_case_get_suite ((GeeTestCase*) _tmp10_);
	g_test_suite_add_suite (_tmp8_, _tmp11_);
	_g_object_unref0 (_tmp10_);
	_tmp12_ = gee_test_case_get_suite ((GeeTestCase*) self);
	_tmp13_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY);
	_tmp14_ = _tmp13_;
	_tmp15_ = gee_test_case_get_suite ((GeeTestCase*) _tmp14_);
	g_test_suite_add_suite (_tmp12_, _tmp15_);
	_g_object_unref0 (_tmp14_);
	return self;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
bidir_sorted_set_tests_test_bidir_iterator_can_go_backward (BidirSortedSetTests* self)
{
	GeeBidirSortedSet* test_set = NULL;
	GeeCollection* _tmp0_;
	GeeBidirSortedSet* _tmp1_;
	GeeBidirIterator* iterator = NULL;
	GeeBidirIterator* _tmp2_;
	GeeBidirIterator* _tmp3_;
	GeeBidirIterator* _tmp4_;
	GeeBidirIterator* _tmp5_;
	GeeBidirIterator* _tmp6_;
	gpointer _tmp7_;
	gchar* _tmp8_;
	GeeBidirIterator* _tmp9_;
	GeeBidirIterator* _tmp10_;
	GeeBidirIterator* _tmp11_;
	gpointer _tmp12_;
	gchar* _tmp13_;
	GeeBidirIterator* _tmp14_;
	GeeBidirIterator* _tmp15_;
	GeeBidirIterator* _tmp16_;
	gpointer _tmp17_;
	gchar* _tmp18_;
	GeeBidirIterator* _tmp19_;
	GeeBidirIterator* _tmp20_;
	GeeBidirIterator* _tmp21_;
	gpointer _tmp22_;
	gchar* _tmp23_;
	GeeBidirIterator* _tmp24_;
	GeeBidirIterator* _tmp25_;
	GeeBidirIterator* _tmp26_;
	gpointer _tmp27_;
	gchar* _tmp28_;
	GeeBidirIterator* _tmp29_;
	GeeBidirIterator* _tmp30_;
	GeeBidirIterator* _tmp31_;
	gpointer _tmp32_;
	gchar* _tmp33_;
	GeeBidirIterator* _tmp34_;
	GeeBidirIterator* _tmp35_;
	GeeBidirIterator* _tmp36_;
	GeeBidirIterator* _tmp37_;
	gpointer _tmp38_;
	gchar* _tmp39_;
	GeeBidirIterator* _tmp40_;
	GeeBidirIterator* _tmp41_;
	gpointer _tmp42_;
	gchar* _tmp43_;
	GeeBidirIterator* _tmp44_;
	GeeBidirIterator* _tmp45_;
	gpointer _tmp46_;
	gchar* _tmp47_;
	GeeBidirIterator* _tmp48_;
	GeeBidirIterator* _tmp49_;
	gpointer _tmp50_;
	gchar* _tmp51_;
	GeeBidirIterator* _tmp52_;
	GeeBidirIterator* _tmp53_;
	gpointer _tmp54_;
	gchar* _tmp55_;
	GeeBidirIterator* _tmp56_;
	GeeBidirIterator* _tmp57_;
	gpointer _tmp58_;
	gchar* _tmp59_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
	test_set = _tmp1_;
	_tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	iterator = _tmp2_;
	_tmp3_ = iterator;
	_vala_assert (!gee_bidir_iterator_has_previous (_tmp3_), "!iterator.has_previous ()");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "one"), "test_set.add (\"one\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "two"), "test_set.add (\"two\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "three"), "test_set.add (\"three\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "four"), "test_set.add (\"four\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "five"), "test_set.add (\"five\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "six"), "test_set.add (\"six\")");
	_tmp4_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	_g_object_unref0 (iterator);
	iterator = _tmp4_;
	_tmp5_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp5_), "iterator.next ()");
	_tmp6_ = iterator;
	_tmp7_ = gee_iterator_get ((GeeIterator*) _tmp6_);
	_tmp8_ = (gchar*) _tmp7_;
	_vala_assert (g_strcmp0 (_tmp8_, "five") == 0, "iterator.get () == \"five\"");
	_g_free0 (_tmp8_);
	_tmp9_ = iterator;
	_vala_assert (!gee_bidir_iterator_has_previous (_tmp9_), "!iterator.has_previous ()");
	_tmp10_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp10_), "iterator.next ()");
	_tmp11_ = iterator;
	_tmp12_ = gee_iterator_get ((GeeIterator*) _tmp11_);
	_tmp13_ = (gchar*) _tmp12_;
	_vala_assert (g_strcmp0 (_tmp13_, "four") == 0, "iterator.get () == \"four\"");
	_g_free0 (_tmp13_);
	_tmp14_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp14_), "iterator.has_previous ()");
	_tmp15_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp15_), "iterator.next ()");
	_tmp16_ = iterator;
	_tmp17_ = gee_iterator_get ((GeeIterator*) _tmp16_);
	_tmp18_ = (gchar*) _tmp17_;
	_vala_assert (g_strcmp0 (_tmp18_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp18_);
	_tmp19_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp19_), "iterator.has_previous ()");
	_tmp20_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp20_), "iterator.next ()");
	_tmp21_ = iterator;
	_tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
	_tmp23_ = (gchar*) _tmp22_;
	_vala_assert (g_strcmp0 (_tmp23_, "six") == 0, "iterator.get () == \"six\"");
	_g_free0 (_tmp23_);
	_tmp24_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp24_), "iterator.has_previous ()");
	_tmp25_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp25_), "iterator.next ()");
	_tmp26_ = iterator;
	_tmp27_ = gee_iterator_get ((GeeIterator*) _tmp26_);
	_tmp28_ = (gchar*) _tmp27_;
	_vala_assert (g_strcmp0 (_tmp28_, "three") == 0, "iterator.get () == \"three\"");
	_g_free0 (_tmp28_);
	_tmp29_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp29_), "iterator.has_previous ()");
	_tmp30_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp30_), "iterator.next ()");
	_tmp31_ = iterator;
	_tmp32_ = gee_iterator_get ((GeeIterator*) _tmp31_);
	_tmp33_ = (gchar*) _tmp32_;
	_vala_assert (g_strcmp0 (_tmp33_, "two") == 0, "iterator.get () == \"two\"");
	_g_free0 (_tmp33_);
	_tmp34_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp34_), "iterator.has_previous ()");
	_tmp35_ = iterator;
	_vala_assert (!gee_iterator_next ((GeeIterator*) _tmp35_), "!iterator.next ()");
	_tmp36_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp36_), "iterator.previous ()");
	_tmp37_ = iterator;
	_tmp38_ = gee_iterator_get ((GeeIterator*) _tmp37_);
	_tmp39_ = (gchar*) _tmp38_;
	_vala_assert (g_strcmp0 (_tmp39_, "three") == 0, "iterator.get () == \"three\"");
	_g_free0 (_tmp39_);
	_tmp40_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp40_), "iterator.previous ()");
	_tmp41_ = iterator;
	_tmp42_ = gee_iterator_get ((GeeIterator*) _tmp41_);
	_tmp43_ = (gchar*) _tmp42_;
	_vala_assert (g_strcmp0 (_tmp43_, "six") == 0, "iterator.get () == \"six\"");
	_g_free0 (_tmp43_);
	_tmp44_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp44_), "iterator.previous ()");
	_tmp45_ = iterator;
	_tmp46_ = gee_iterator_get ((GeeIterator*) _tmp45_);
	_tmp47_ = (gchar*) _tmp46_;
	_vala_assert (g_strcmp0 (_tmp47_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp47_);
	_tmp48_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp48_), "iterator.previous ()");
	_tmp49_ = iterator;
	_tmp50_ = gee_iterator_get ((GeeIterator*) _tmp49_);
	_tmp51_ = (gchar*) _tmp50_;
	_vala_assert (g_strcmp0 (_tmp51_, "four") == 0, "iterator.get () == \"four\"");
	_g_free0 (_tmp51_);
	_tmp52_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp52_), "iterator.previous ()");
	_tmp53_ = iterator;
	_tmp54_ = gee_iterator_get ((GeeIterator*) _tmp53_);
	_tmp55_ = (gchar*) _tmp54_;
	_vala_assert (g_strcmp0 (_tmp55_, "five") == 0, "iterator.get () == \"five\"");
	_g_free0 (_tmp55_);
	_tmp56_ = iterator;
	_vala_assert (!gee_bidir_iterator_previous (_tmp56_), "!iterator.previous ()");
	_tmp57_ = iterator;
	_tmp58_ = gee_iterator_get ((GeeIterator*) _tmp57_);
	_tmp59_ = (gchar*) _tmp58_;
	_vala_assert (g_strcmp0 (_tmp59_, "five") == 0, "iterator.get () == \"five\"");
	_g_free0 (_tmp59_);
	_g_object_unref0 (iterator);
	_g_object_unref0 (test_set);
}

void
bidir_sorted_set_tests_test_bidir_iterator_first (BidirSortedSetTests* self)
{
	GeeBidirSortedSet* test_set = NULL;
	GeeCollection* _tmp0_;
	GeeBidirSortedSet* _tmp1_;
	GeeBidirIterator* iterator = NULL;
	GeeBidirIterator* _tmp2_;
	GeeBidirIterator* _tmp3_;
	GeeBidirIterator* _tmp4_;
	GeeBidirIterator* _tmp5_;
	GeeBidirIterator* _tmp6_;
	gpointer _tmp7_;
	gchar* _tmp8_;
	GeeBidirIterator* _tmp9_;
	GeeBidirIterator* _tmp10_;
	gpointer _tmp11_;
	gchar* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
	test_set = _tmp1_;
	_tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	iterator = _tmp2_;
	_tmp3_ = iterator;
	_vala_assert (!gee_bidir_iterator_first (_tmp3_), "!iterator.first ()");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "one"), "test_set.add (\"one\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "two"), "test_set.add (\"two\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "three"), "test_set.add (\"three\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "four"), "test_set.add (\"four\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "five"), "test_set.add (\"five\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "six"), "test_set.add (\"six\")");
	_tmp4_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	_g_object_unref0 (iterator);
	iterator = _tmp4_;
	_tmp5_ = iterator;
	_vala_assert (gee_bidir_iterator_last (_tmp5_), "iterator.last ()");
	_tmp6_ = iterator;
	_tmp7_ = gee_iterator_get ((GeeIterator*) _tmp6_);
	_tmp8_ = (gchar*) _tmp7_;
	_vala_assert (g_strcmp0 (_tmp8_, "two") == 0, "iterator.get () == \"two\"");
	_g_free0 (_tmp8_);
	_tmp9_ = iterator;
	_vala_assert (gee_bidir_iterator_first (_tmp9_), "iterator.first ()");
	_tmp10_ = iterator;
	_tmp11_ = gee_iterator_get ((GeeIterator*) _tmp10_);
	_tmp12_ = (gchar*) _tmp11_;
	_vala_assert (g_strcmp0 (_tmp12_, "five") == 0, "iterator.get () == \"five\"");
	_g_free0 (_tmp12_);
	_g_object_unref0 (iterator);
	_g_object_unref0 (test_set);
}

void
bidir_sorted_set_tests_test_bidir_iterator_last (BidirSortedSetTests* self)
{
	GeeBidirSortedSet* test_set = NULL;
	GeeCollection* _tmp0_;
	GeeBidirSortedSet* _tmp1_;
	GeeBidirIterator* iterator = NULL;
	GeeBidirIterator* _tmp2_;
	GeeBidirIterator* _tmp3_;
	GeeBidirIterator* _tmp4_;
	GeeBidirIterator* _tmp5_;
	GeeBidirIterator* _tmp6_;
	gpointer _tmp7_;
	gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
	test_set = _tmp1_;
	_tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	iterator = _tmp2_;
	_tmp3_ = iterator;
	_vala_assert (!gee_bidir_iterator_last (_tmp3_), "!iterator.last ()");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "one"), "test_set.add (\"one\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "two"), "test_set.add (\"two\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "three"), "test_set.add (\"three\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "four"), "test_set.add (\"four\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "five"), "test_set.add (\"five\")");
	_vala_assert (gee_collection_add ((GeeCollection*) test_set, "six"), "test_set.add (\"six\")");
	_tmp4_ = gee_bidir_sorted_set_bidir_iterator (test_set);
	_g_object_unref0 (iterator);
	iterator = _tmp4_;
	_tmp5_ = iterator;
	_vala_assert (gee_bidir_iterator_last (_tmp5_), "iterator.last ()");
	_tmp6_ = iterator;
	_tmp7_ = gee_iterator_get ((GeeIterator*) _tmp6_);
	_tmp8_ = (gchar*) _tmp7_;
	_vala_assert (g_strcmp0 (_tmp8_, "two") == 0, "iterator.get () == \"two\"");
	_g_free0 (_tmp8_);
	_g_object_unref0 (iterator);
	_g_object_unref0 (test_set);
}

void
bidir_sorted_set_tests_test_mutable_bidir_iterator (BidirSortedSetTests* self)
{
	GeeBidirSortedSet* test_set = NULL;
	GeeCollection* _tmp0_;
	GeeBidirSortedSet* _tmp1_;
	GeeBidirIterator* iterator = NULL;
	GeeBidirSortedSet* _tmp2_;
	GeeBidirIterator* _tmp3_;
	GeeBidirIterator* _tmp4_;
	GeeBidirSortedSet* _tmp5_;
	GeeBidirSortedSet* _tmp6_;
	GeeBidirSortedSet* _tmp7_;
	GeeBidirSortedSet* _tmp8_;
	GeeBidirSortedSet* _tmp9_;
	GeeBidirSortedSet* _tmp10_;
	GeeBidirSortedSet* _tmp11_;
	GeeBidirIterator* _tmp12_;
	GeeBidirIterator* _tmp14_;
	GeeBidirIterator* _tmp15_;
	gpointer _tmp16_;
	gchar* _tmp17_;
	GeeBidirIterator* _tmp18_;
	GeeBidirSortedSet* _tmp19_;
	GeeBidirIterator* _tmp20_;
	GeeBidirIterator* _tmp21_;
	GeeBidirIterator* _tmp25_;
	GeeBidirIterator* _tmp26_;
	GeeBidirIterator* _tmp27_;
	gpointer _tmp28_;
	gchar* _tmp29_;
	GeeBidirIterator* _tmp30_;
	GeeBidirIterator* _tmp31_;
	gpointer _tmp32_;
	gchar* _tmp33_;
	GeeBidirIterator* _tmp34_;
	GeeBidirSortedSet* _tmp35_;
	GeeBidirIterator* _tmp36_;
	GeeBidirIterator* _tmp37_;
	GeeBidirIterator* _tmp38_;
	GeeBidirIterator* _tmp39_;
	gpointer _tmp40_;
	gchar* _tmp41_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
	test_set = _tmp1_;
	_tmp2_ = test_set;
	_tmp3_ = gee_bidir_sorted_set_bidir_iterator (_tmp2_);
	iterator = _tmp3_;
	_tmp4_ = iterator;
	_vala_assert (!gee_bidir_iterator_has_previous (_tmp4_), "!iterator.has_previous ()");
	_tmp5_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp5_, "one"), "test_set.add (\"one\")");
	_tmp6_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp6_, "two"), "test_set.add (\"two\")");
	_tmp7_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp7_, "three"), "test_set.add (\"three\")");
	_tmp8_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp8_, "four"), "test_set.add (\"four\")");
	_tmp9_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp9_, "five"), "test_set.add (\"five\")");
	_tmp10_ = test_set;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp10_, "six"), "test_set.add (\"six\")");
	_tmp11_ = test_set;
	_tmp12_ = gee_bidir_sorted_set_bidir_iterator (_tmp11_);
	_g_object_unref0 (iterator);
	iterator = _tmp12_;
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeBidirIterator* _tmp13_;
		_tmp13_ = iterator;
		gee_iterator_remove ((GeeIterator*) _tmp13_);
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp14_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp14_), "iterator.next ()");
	_tmp15_ = iterator;
	_tmp16_ = gee_iterator_get ((GeeIterator*) _tmp15_);
	_tmp17_ = (gchar*) _tmp16_;
	_vala_assert (g_strcmp0 (_tmp17_, "five") == 0, "iterator.get () == \"five\"");
	_g_free0 (_tmp17_);
	_tmp18_ = iterator;
	gee_iterator_remove ((GeeIterator*) _tmp18_);
	_tmp19_ = test_set;
	_vala_assert (!gee_collection_contains ((GeeCollection*) _tmp19_, "five"), "!test_set.contains (\"five\")");
	_tmp20_ = iterator;
	_vala_assert (gee_iterator_has_next ((GeeIterator*) _tmp20_), "iterator.has_next ()");
	_tmp21_ = iterator;
	_vala_assert (!gee_bidir_iterator_has_previous (_tmp21_), "!iterator.has_previous ()");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeBidirIterator* _tmp22_;
		gpointer _tmp23_;
		gchar* _tmp24_;
		_tmp22_ = iterator;
		_tmp23_ = gee_iterator_get ((GeeIterator*) _tmp22_);
		_tmp24_ = (gchar*) _tmp23_;
		_g_free0 (_tmp24_);
		exit (0);
	}
	_tmp25_ = iterator;
	_vala_assert (!gee_bidir_iterator_previous (_tmp25_), "!iterator.previous ()");
	_tmp26_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp26_), "iterator.next ()");
	_tmp27_ = iterator;
	_tmp28_ = gee_iterator_get ((GeeIterator*) _tmp27_);
	_tmp29_ = (gchar*) _tmp28_;
	_vala_assert (g_strcmp0 (_tmp29_, "four") == 0, "iterator.get () == \"four\"");
	_g_free0 (_tmp29_);
	_tmp30_ = iterator;
	_vala_assert (gee_iterator_next ((GeeIterator*) _tmp30_), "iterator.next ()");
	_tmp31_ = iterator;
	_tmp32_ = gee_iterator_get ((GeeIterator*) _tmp31_);
	_tmp33_ = (gchar*) _tmp32_;
	_vala_assert (g_strcmp0 (_tmp33_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp33_);
	_tmp34_ = iterator;
	gee_iterator_remove ((GeeIterator*) _tmp34_);
	_tmp35_ = test_set;
	_vala_assert (!gee_collection_contains ((GeeCollection*) _tmp35_, "one"), "!test_set.contains (\"one\")");
	_tmp36_ = iterator;
	_vala_assert (gee_iterator_has_next ((GeeIterator*) _tmp36_), "iterator.has_next ()");
	_tmp37_ = iterator;
	_vala_assert (gee_bidir_iterator_has_previous (_tmp37_), "iterator.has_previous ()");
	_tmp38_ = iterator;
	_vala_assert (gee_bidir_iterator_previous (_tmp38_), "iterator.previous ()");
	_tmp39_ = iterator;
	_tmp40_ = gee_iterator_get ((GeeIterator*) _tmp39_);
	_tmp41_ = (gchar*) _tmp40_;
	_vala_assert (g_strcmp0 (_tmp41_, "four") == 0, "iterator.get () == \"four\"");
	_g_free0 (_tmp41_);
	_g_object_unref0 (iterator);
	_g_object_unref0 (test_set);
}

static inline gpointer
bidir_sorted_set_tests_bidir_sub_set_tests_get_instance_private (BidirSortedSetTestsBidirSubSetTests* self)
{
	return G_STRUCT_MEMBER_P (self, BidirSortedSetTestsBidirSubSetTests_private_offset);
}

static void
_bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method (gpointer self)
{
	bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator ((BidirSortedSetTestsBidirSubSetTests*) self);
}

BidirSortedSetTestsBidirSubSetTests*
bidir_sorted_set_tests_bidir_sub_set_tests_construct (GType object_type,
                                                      BidirSortedSetTests* test,
                                                      SortedSetTestsSubSetTestsType type)
{
	BidirSortedSetTestsBidirSubSetTests * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	BidirSortedSetTests* _tmp3_;
	g_return_val_if_fail (test != NULL, NULL);
	_tmp0_ = sorted_set_tests_sub_set_tests_type_to_string (type);
	_tmp1_ = g_strdup_printf ("%s Subset", _tmp0_);
	_tmp2_ = _tmp1_;
	self = (BidirSortedSetTestsBidirSubSetTests*) gee_test_case_construct (object_type, _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = _g_object_ref0 (test);
	_g_object_unref0 (self->priv->test);
	self->priv->test = _tmp3_;
	self->priv->type = type;
	gee_test_case_add_test ((GeeTestCase*) self, "[BidirSortedSet] bi-directional iterator", _bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	return self;
}

BidirSortedSetTestsBidirSubSetTests*
bidir_sorted_set_tests_bidir_sub_set_tests_new (BidirSortedSetTests* test,
                                                SortedSetTestsSubSetTestsType type)
{
	return bidir_sorted_set_tests_bidir_sub_set_tests_construct (BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, test, type);
}

static void
bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up (GeeTestCase* base)
{
	BidirSortedSetTestsBidirSubSetTests * self;
	BidirSortedSetTests* _tmp0_;
	BidirSortedSetTests* _tmp1_;
	GeeCollection* _tmp2_;
	GeeBidirSortedSet* _tmp3_;
	self = (BidirSortedSetTestsBidirSubSetTests*) base;
	_tmp0_ = self->priv->test;
	gee_test_case_set_up ((GeeTestCase*) _tmp0_);
	_tmp1_ = self->priv->test;
	_tmp2_ = ((CollectionTests*) _tmp1_)->test_collection;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp2_) : NULL);
	_g_object_unref0 (self->priv->master);
	self->priv->master = _tmp3_;
	switch (self->priv->type) {
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
		{
			GeeBidirSortedSet* _tmp4_;
			GeeSortedSet* _tmp5_;
			GeeBidirSortedSet* _tmp6_;
			_tmp4_ = self->priv->master;
			_tmp5_ = gee_sorted_set_head_set ((GeeSortedSet*) _tmp4_, "one");
			_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp5_) : NULL;
			if (_tmp6_ == NULL) {
				_g_object_unref0 (_tmp5_);
			}
			_g_object_unref0 (self->priv->subset);
			self->priv->subset = _tmp6_;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
		{
			GeeBidirSortedSet* _tmp7_;
			GeeSortedSet* _tmp8_;
			GeeBidirSortedSet* _tmp9_;
			_tmp7_ = self->priv->master;
			_tmp8_ = gee_sorted_set_tail_set ((GeeSortedSet*) _tmp7_, "six");
			_tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp8_) : NULL;
			if (_tmp9_ == NULL) {
				_g_object_unref0 (_tmp8_);
			}
			_g_object_unref0 (self->priv->subset);
			self->priv->subset = _tmp9_;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
		{
			GeeBidirSortedSet* _tmp10_;
			GeeSortedSet* _tmp11_;
			GeeBidirSortedSet* _tmp12_;
			_tmp10_ = self->priv->master;
			_tmp11_ = gee_sorted_set_sub_set ((GeeSortedSet*) _tmp10_, "four", "three");
			_tmp12_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp11_) : NULL;
			if (_tmp12_ == NULL) {
				_g_object_unref0 (_tmp11_);
			}
			_g_object_unref0 (self->priv->subset);
			self->priv->subset = _tmp12_;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
		{
			GeeBidirSortedSet* _tmp13_;
			GeeSortedSet* _tmp14_;
			GeeBidirSortedSet* _tmp15_;
			_tmp13_ = self->priv->master;
			_tmp14_ = gee_sorted_set_sub_set ((GeeSortedSet*) _tmp13_, "three", "four");
			_tmp15_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp14_) : NULL;
			if (_tmp15_ == NULL) {
				_g_object_unref0 (_tmp14_);
			}
			_g_object_unref0 (self->priv->subset);
			self->priv->subset = _tmp15_;
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static void
bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down (GeeTestCase* base)
{
	BidirSortedSetTestsBidirSubSetTests * self;
	BidirSortedSetTests* _tmp0_;
	self = (BidirSortedSetTestsBidirSubSetTests*) base;
	_tmp0_ = self->priv->test;
	gee_test_case_tear_down ((GeeTestCase*) _tmp0_);
}

void
bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator (BidirSortedSetTestsBidirSubSetTests* self)
{
	GeeBidirSortedSet* _tmp0_;
	GeeBidirSortedSet* _tmp1_;
	GeeBidirSortedSet* _tmp2_;
	GeeBidirSortedSet* _tmp3_;
	GeeBidirSortedSet* _tmp4_;
	GeeBidirSortedSet* _tmp5_;
	GeeBidirSortedSet* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar** contains = NULL;
	gint contains_length1 = 0;
	gint _contains_size_ = 0;
	guint i = 0U;
	gchar** _tmp30_;
	gint _tmp30__length1;
	GeeBidirIterator* iter = NULL;
	GeeBidirSortedSet* _tmp31_;
	GeeBidirIterator* _tmp32_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp0_, "one"), "master.add (\"one\")");
	_tmp1_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp1_, "two"), "master.add (\"two\")");
	_tmp2_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp2_, "three"), "master.add (\"three\")");
	_tmp3_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp3_, "four"), "master.add (\"four\")");
	_tmp4_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp4_, "five"), "master.add (\"five\")");
	_tmp5_ = self->priv->master;
	_vala_assert (gee_collection_add ((GeeCollection*) _tmp5_, "six"), "master.add (\"six\")");
	_tmp6_ = self->priv->master;
	_tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	_vala_assert (_tmp8_ == 6, "master.size == 6");
	switch (self->priv->type) {
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
		{
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar** _tmp11_;
			_tmp9_ = g_strdup ("five");
			_tmp10_ = g_strdup ("four");
			_tmp11_ = g_new0 (gchar*, 2 + 1);
			_tmp11_[0] = _tmp9_;
			_tmp11_[1] = _tmp10_;
			contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
			contains = _tmp11_;
			contains_length1 = 2;
			_contains_size_ = contains_length1;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
		{
			gchar* _tmp12_;
			gchar* _tmp13_;
			gchar* _tmp14_;
			gchar** _tmp15_;
			_tmp12_ = g_strdup ("six");
			_tmp13_ = g_strdup ("three");
			_tmp14_ = g_strdup ("two");
			_tmp15_ = g_new0 (gchar*, 3 + 1);
			_tmp15_[0] = _tmp12_;
			_tmp15_[1] = _tmp13_;
			_tmp15_[2] = _tmp14_;
			contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
			contains = _tmp15_;
			contains_length1 = 3;
			_contains_size_ = contains_length1;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
		{
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar** _tmp19_;
			_tmp16_ = g_strdup ("four");
			_tmp17_ = g_strdup ("one");
			_tmp18_ = g_strdup ("six");
			_tmp19_ = g_new0 (gchar*, 3 + 1);
			_tmp19_[0] = _tmp16_;
			_tmp19_[1] = _tmp17_;
			_tmp19_[2] = _tmp18_;
			contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
			contains = _tmp19_;
			contains_length1 = 3;
			_contains_size_ = contains_length1;
			break;
		}
		case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
		{
			gchar** _tmp20_;
			_tmp20_ = g_new0 (gchar*, 0 + 1);
			contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
			contains = _tmp20_;
			contains_length1 = 0;
			_contains_size_ = contains_length1;
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	i = (guint) 0;
	{
		GeeIterator* _e_it = NULL;
		GeeBidirSortedSet* _tmp21_;
		GeeIterator* _tmp22_;
		_tmp21_ = self->priv->subset;
		_tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_);
		_e_it = _tmp22_;
		while (TRUE) {
			GeeIterator* _tmp23_;
			gchar* e = NULL;
			GeeIterator* _tmp24_;
			gpointer _tmp25_;
			const gchar* _tmp26_;
			gchar** _tmp27_;
			gint _tmp27__length1;
			guint _tmp28_;
			const gchar* _tmp29_;
			_tmp23_ = _e_it;
			if (!gee_iterator_next (_tmp23_)) {
				break;
			}
			_tmp24_ = _e_it;
			_tmp25_ = gee_iterator_get (_tmp24_);
			e = (gchar*) _tmp25_;
			_tmp26_ = e;
			_tmp27_ = contains;
			_tmp27__length1 = contains_length1;
			_tmp28_ = i;
			i = _tmp28_ + 1;
			_tmp29_ = _tmp27_[_tmp28_];
			_vala_assert (g_strcmp0 (_tmp26_, _tmp29_) == 0, "e == contains[i++]");
			_g_free0 (e);
		}
		_g_object_unref0 (_e_it);
	}
	_tmp30_ = contains;
	_tmp30__length1 = contains_length1;
	_vala_assert (i == ((guint) _tmp30__length1), "i == contains.length");
	_tmp31_ = self->priv->subset;
	_tmp32_ = gee_bidir_sorted_set_bidir_iterator (_tmp31_);
	iter = _tmp32_;
	if (self->priv->type != SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY) {
		GeeBidirIterator* _tmp33_;
		GeeBidirIterator* _tmp34_;
		gpointer _tmp35_;
		gchar* _tmp36_;
		gchar** _tmp37_;
		gint _tmp37__length1;
		gchar** _tmp38_;
		gint _tmp38__length1;
		const gchar* _tmp39_;
		GeeBidirIterator* _tmp40_;
		GeeBidirIterator* _tmp41_;
		gpointer _tmp42_;
		gchar* _tmp43_;
		gchar** _tmp44_;
		gint _tmp44__length1;
		const gchar* _tmp45_;
		GeeBidirIterator* _tmp46_;
		GeeBidirIterator* _tmp47_;
		GeeBidirIterator* _tmp48_;
		gpointer _tmp49_;
		gchar* _tmp50_;
		gchar** _tmp51_;
		gint _tmp51__length1;
		const gchar* _tmp52_;
		GeeBidirIterator* _tmp53_;
		GeeBidirIterator* _tmp54_;
		GeeBidirIterator* _tmp55_;
		GeeBidirIterator* _tmp58_;
		GeeBidirIterator* _tmp59_;
		gpointer _tmp60_;
		gchar* _tmp61_;
		gchar** _tmp62_;
		gint _tmp62__length1;
		const gchar* _tmp63_;
		_tmp33_ = iter;
		_vala_assert (gee_bidir_iterator_last (_tmp33_), "iter.last ()");
		_tmp34_ = iter;
		_tmp35_ = gee_iterator_get ((GeeIterator*) _tmp34_);
		_tmp36_ = (gchar*) _tmp35_;
		_tmp37_ = contains;
		_tmp37__length1 = contains_length1;
		_tmp38_ = contains;
		_tmp38__length1 = contains_length1;
		_tmp39_ = _tmp37_[_tmp38__length1 - 1];
		_vala_assert (g_strcmp0 (_tmp36_, _tmp39_) == 0, "iter.get () == contains[contains.length - 1]");
		_g_free0 (_tmp36_);
		_tmp40_ = iter;
		_vala_assert (gee_bidir_iterator_first (_tmp40_), "iter.first ()");
		_tmp41_ = iter;
		_tmp42_ = gee_iterator_get ((GeeIterator*) _tmp41_);
		_tmp43_ = (gchar*) _tmp42_;
		_tmp44_ = contains;
		_tmp44__length1 = contains_length1;
		_tmp45_ = _tmp44_[0];
		_vala_assert (g_strcmp0 (_tmp43_, _tmp45_) == 0, "iter.get () == contains[0]");
		_g_free0 (_tmp43_);
		_tmp46_ = iter;
		_vala_assert (gee_iterator_has_next ((GeeIterator*) _tmp46_), "iter.has_next ()");
		_tmp47_ = iter;
		_vala_assert (gee_iterator_next ((GeeIterator*) _tmp47_), "iter.next ()");
		_tmp48_ = iter;
		_tmp49_ = gee_iterator_get ((GeeIterator*) _tmp48_);
		_tmp50_ = (gchar*) _tmp49_;
		_tmp51_ = contains;
		_tmp51__length1 = contains_length1;
		_tmp52_ = _tmp51_[1];
		_vala_assert (g_strcmp0 (_tmp50_, _tmp52_) == 0, "iter.get () == contains[1]");
		_g_free0 (_tmp50_);
		_tmp53_ = iter;
		_vala_assert (gee_bidir_iterator_has_previous (_tmp53_), "iter.has_previous ()");
		_tmp54_ = iter;
		gee_iterator_remove ((GeeIterator*) _tmp54_);
		_tmp55_ = iter;
		_vala_assert (gee_bidir_iterator_has_previous (_tmp55_), "iter.has_previous ()");
		if (self->priv->type != SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD) {
			GeeBidirIterator* _tmp56_;
			_tmp56_ = iter;
			_vala_assert (gee_iterator_has_next ((GeeIterator*) _tmp56_), "iter.has_next ()");
		} else {
			GeeBidirIterator* _tmp57_;
			_tmp57_ = iter;
			_vala_assert (!gee_iterator_has_next ((GeeIterator*) _tmp57_), "!iter.has_next ()");
		}
		_tmp58_ = iter;
		_vala_assert (gee_bidir_iterator_previous (_tmp58_), "iter.previous ()");
		_tmp59_ = iter;
		_tmp60_ = gee_iterator_get ((GeeIterator*) _tmp59_);
		_tmp61_ = (gchar*) _tmp60_;
		_tmp62_ = contains;
		_tmp62__length1 = contains_length1;
		_tmp63_ = _tmp62_[0];
		_vala_assert (g_strcmp0 (_tmp61_, _tmp63_) == 0, "iter.get () == contains[0]");
		_g_free0 (_tmp61_);
	} else {
		GeeBidirIterator* _tmp64_;
		_tmp64_ = iter;
		_vala_assert (!gee_bidir_iterator_first (_tmp64_), "!iter.first ()");
		if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
			GeeBidirIterator* _tmp65_;
			_tmp65_ = iter;
			gee_iterator_remove ((GeeIterator*) _tmp65_);
			exit (0);
		}
		g_test_trap_assert_failed ();
	}
	_g_object_unref0 (iter);
	contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
}

static void
bidir_sorted_set_tests_bidir_sub_set_tests_class_init (BidirSortedSetTestsBidirSubSetTestsClass * klass,
                                                       gpointer klass_data)
{
	bidir_sorted_set_tests_bidir_sub_set_tests_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BidirSortedSetTestsBidirSubSetTests_private_offset);
	((GeeTestCaseClass *) klass)->set_up = (void (*) (GeeTestCase*)) bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up;
	((GeeTestCaseClass *) klass)->tear_down = (void (*) (GeeTestCase*)) bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = bidir_sorted_set_tests_bidir_sub_set_tests_finalize;
}

static void
bidir_sorted_set_tests_bidir_sub_set_tests_instance_init (BidirSortedSetTestsBidirSubSetTests * self,
                                                          gpointer klass)
{
	self->priv = bidir_sorted_set_tests_bidir_sub_set_tests_get_instance_private (self);
}

static void
bidir_sorted_set_tests_bidir_sub_set_tests_finalize (GObject * obj)
{
	BidirSortedSetTestsBidirSubSetTests * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTests);
	_g_object_unref0 (self->priv->master);
	_g_object_unref0 (self->priv->subset);
	_g_object_unref0 (self->priv->test);
	G_OBJECT_CLASS (bidir_sorted_set_tests_bidir_sub_set_tests_parent_class)->finalize (obj);
}

static GType
bidir_sorted_set_tests_bidir_sub_set_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BidirSortedSetTestsBidirSubSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_set_tests_bidir_sub_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedSetTestsBidirSubSetTests), 0, (GInstanceInitFunc) bidir_sorted_set_tests_bidir_sub_set_tests_instance_init, NULL };
	GType bidir_sorted_set_tests_bidir_sub_set_tests_type_id;
	bidir_sorted_set_tests_bidir_sub_set_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "BidirSortedSetTestsBidirSubSetTests", &g_define_type_info, 0);
	BidirSortedSetTestsBidirSubSetTests_private_offset = g_type_add_instance_private (bidir_sorted_set_tests_bidir_sub_set_tests_type_id, sizeof (BidirSortedSetTestsBidirSubSetTestsPrivate));
	return bidir_sorted_set_tests_bidir_sub_set_tests_type_id;
}

GType
bidir_sorted_set_tests_bidir_sub_set_tests_get_type (void)
{
	static volatile gsize bidir_sorted_set_tests_bidir_sub_set_tests_type_id__once = 0;
	if (g_once_init_enter (&bidir_sorted_set_tests_bidir_sub_set_tests_type_id__once)) {
		GType bidir_sorted_set_tests_bidir_sub_set_tests_type_id;
		bidir_sorted_set_tests_bidir_sub_set_tests_type_id = bidir_sorted_set_tests_bidir_sub_set_tests_get_type_once ();
		g_once_init_leave (&bidir_sorted_set_tests_bidir_sub_set_tests_type_id__once, bidir_sorted_set_tests_bidir_sub_set_tests_type_id);
	}
	return bidir_sorted_set_tests_bidir_sub_set_tests_type_id__once;
}

static void
bidir_sorted_set_tests_class_init (BidirSortedSetTestsClass * klass,
                                   gpointer klass_data)
{
	bidir_sorted_set_tests_parent_class = g_type_class_peek_parent (klass);
}

static void
bidir_sorted_set_tests_instance_init (BidirSortedSetTests * self,
                                      gpointer klass)
{
}

static GType
bidir_sorted_set_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BidirSortedSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedSetTests), 0, (GInstanceInitFunc) bidir_sorted_set_tests_instance_init, NULL };
	GType bidir_sorted_set_tests_type_id;
	bidir_sorted_set_tests_type_id = g_type_register_static (TYPE_SORTED_SET_TESTS, "BidirSortedSetTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return bidir_sorted_set_tests_type_id;
}

GType
bidir_sorted_set_tests_get_type (void)
{
	static volatile gsize bidir_sorted_set_tests_type_id__once = 0;
	if (g_once_init_enter (&bidir_sorted_set_tests_type_id__once)) {
		GType bidir_sorted_set_tests_type_id;
		bidir_sorted_set_tests_type_id = bidir_sorted_set_tests_get_type_once ();
		g_once_init_leave (&bidir_sorted_set_tests_type_id__once, bidir_sorted_set_tests_type_id);
	}
	return bidir_sorted_set_tests_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

