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

/* testdeque.vala
 *
 * Copyright (C) 2009  Didier Villevalois
 *
 * 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:
 * 	Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
 */

#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_QUEUE_TESTS (queue_tests_get_type ())
#define QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUEUE_TESTS, QueueTests))
#define QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUEUE_TESTS, QueueTestsClass))
#define IS_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUEUE_TESTS))
#define IS_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUEUE_TESTS))
#define QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUEUE_TESTS, QueueTestsClass))

typedef struct _QueueTests QueueTests;
typedef struct _QueueTestsClass QueueTestsClass;
typedef struct _QueueTestsPrivate QueueTestsPrivate;

#define TYPE_DEQUE_TESTS (deque_tests_get_type ())
#define DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEQUE_TESTS, DequeTests))
#define DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEQUE_TESTS, DequeTestsClass))
#define IS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEQUE_TESTS))
#define IS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEQUE_TESTS))
#define DEQUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEQUE_TESTS, DequeTestsClass))

typedef struct _DequeTests DequeTests;
typedef struct _DequeTestsClass DequeTestsClass;
typedef struct _DequeTestsPrivate DequeTestsPrivate;
enum  {
	DEQUE_TESTS_0_PROPERTY,
	DEQUE_TESTS_NUM_PROPERTIES
};
static GParamSpec* deque_tests_properties[DEQUE_TESTS_NUM_PROPERTIES];
typedef void (*GeeTestCaseTestMethod) (gpointer user_data);
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _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 _QueueTests {
	CollectionTests parent_instance;
	QueueTestsPrivate * priv;
};

struct _QueueTestsClass {
	CollectionTestsClass parent_class;
};

struct _DequeTests {
	QueueTests parent_instance;
	DequeTestsPrivate * priv;
};

struct _DequeTestsClass {
	QueueTestsClass parent_class;
};

static gpointer deque_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 queue_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (QueueTests, g_object_unref)
VALA_EXTERN GType deque_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DequeTests, g_object_unref)
VALA_EXTERN DequeTests* deque_tests_construct (GType object_type,
                                   const gchar* name);
VALA_EXTERN QueueTests* queue_tests_construct (GType object_type,
                                   const gchar* name);
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 deque_tests_test_queue_use (DequeTests* self);
static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self);
VALA_EXTERN void deque_tests_test_stack_use (DequeTests* self);
static void _deque_tests_test_stack_use_gee_test_case_test_method (gpointer self);
VALA_EXTERN void deque_tests_test_reversed_stack_use (DequeTests* self);
static void _deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self);
static GType deque_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
_deque_tests_test_queue_use_gee_test_case_test_method (gpointer self)
{
	deque_tests_test_queue_use ((DequeTests*) self);
}

static void
_deque_tests_test_stack_use_gee_test_case_test_method (gpointer self)
{
	deque_tests_test_stack_use ((DequeTests*) self);
}

static void
_deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self)
{
	deque_tests_test_reversed_stack_use ((DequeTests*) self);
}

DequeTests*
deque_tests_construct (GType object_type,
                       const gchar* name)
{
	DequeTests * self = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (DequeTests*) queue_tests_construct (object_type, name);
	gee_test_case_add_test ((GeeTestCase*) self, "[Deque] queue use", _deque_tests_test_queue_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[Deque] stack use", _deque_tests_test_stack_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[Deque] reversed stack use", _deque_tests_test_reversed_stack_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	return self;
}

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

void
deque_tests_test_queue_use (DequeTests* self)
{
	GeeDeque* test_deque = NULL;
	GeeCollection* _tmp0_;
	GeeDeque* _tmp1_;
	GeeArrayList* recipient = NULL;
	GeeArrayList* _tmp2_;
	GeeDeque* _tmp3_;
	gchar** to_offer = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar** _tmp43_;
	gint to_offer_length1;
	gint _to_offer_size_;
	GeeDeque* _tmp70_;
	gpointer _tmp71_;
	gchar* _tmp72_;
	GeeDeque* _tmp73_;
	gpointer _tmp74_;
	gchar* _tmp75_;
	GeeArrayList* _tmp76_;
	GeeDeque* _tmp83_;
	gint _tmp84_;
	gint _tmp85_;
	gchar** _tmp86_;
	gint _tmp86__length1;
	GeeDeque* _tmp87_;
	GeeArrayList* _tmp88_;
	GeeDeque* _tmp89_;
	gint _tmp90_;
	gint _tmp91_;
	gchar** _tmp92_;
	gint _tmp92__length1;
	GeeArrayList* _tmp93_;
	gint _tmp94_;
	gint _tmp95_;
	GeeArrayList* _tmp96_;
	gpointer _tmp97_;
	gchar* _tmp98_;
	gchar** _tmp99_;
	gint _tmp99__length1;
	const gchar* _tmp100_;
	GeeDeque* _tmp101_;
	GeeArrayList* _tmp102_;
	gchar** _tmp103_;
	gint _tmp103__length1;
	GeeDeque* _tmp104_;
	gint _tmp105_;
	gint _tmp106_;
	GeeArrayList* _tmp107_;
	gint _tmp108_;
	gint _tmp109_;
	gchar** _tmp110_;
	gint _tmp110__length1;
	GeeArrayList* _tmp119_;
	GeeDeque* _tmp120_;
	GeeArrayList* _tmp121_;
	GeeDeque* _tmp122_;
	gint _tmp123_;
	gint _tmp124_;
	GeeArrayList* _tmp125_;
	gint _tmp126_;
	gint _tmp127_;
	GeeArrayList* _tmp128_;
	GeeDeque* _tmp129_;
	GeeArrayList* _tmp130_;
	GeeDeque* _tmp131_;
	gint _tmp132_;
	gint _tmp133_;
	GeeArrayList* _tmp134_;
	gint _tmp135_;
	gint _tmp136_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
	test_deque = _tmp1_;
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	recipient = _tmp2_;
	_tmp3_ = test_deque;
	_vala_assert (_tmp3_ != NULL, "test_deque != null");
	_tmp4_ = g_strdup ("one");
	_tmp5_ = g_strdup ("two");
	_tmp6_ = g_strdup ("three");
	_tmp7_ = g_strdup ("four");
	_tmp8_ = g_strdup ("five");
	_tmp9_ = g_strdup ("six");
	_tmp10_ = g_strdup ("seven");
	_tmp11_ = g_strdup ("\neight");
	_tmp12_ = g_strdup ("nine");
	_tmp13_ = g_strdup ("ten");
	_tmp14_ = g_strdup ("eleven");
	_tmp15_ = g_strdup ("twelve");
	_tmp16_ = g_strdup ("thirteen");
	_tmp17_ = g_strdup ("fourteen\n");
	_tmp18_ = g_strdup ("fifteen");
	_tmp19_ = g_strdup ("sixteen");
	_tmp20_ = g_strdup ("seventeen");
	_tmp21_ = g_strdup ("eighteen");
	_tmp22_ = g_strdup ("nineteen\n");
	_tmp23_ = g_strdup ("twenty");
	_tmp24_ = g_strdup ("twenty one");
	_tmp25_ = g_strdup ("twenty two");
	_tmp26_ = g_strdup ("twenty three");
	_tmp27_ = g_strdup ("twenty four");
	_tmp28_ = g_strdup ("twenty five");
	_tmp29_ = g_strdup ("twenty six");
	_tmp30_ = g_strdup ("twenty seven");
	_tmp31_ = g_strdup ("twenty eight");
	_tmp32_ = g_strdup ("twenty nine");
	_tmp33_ = g_strdup ("thirty");
	_tmp34_ = g_strdup ("thirty one");
	_tmp35_ = g_strdup ("thirty two");
	_tmp36_ = g_strdup ("thirty four");
	_tmp37_ = g_strdup ("thirty five");
	_tmp38_ = g_strdup ("thirty six");
	_tmp39_ = g_strdup ("thirty seven");
	_tmp40_ = g_strdup ("thirty eight");
	_tmp41_ = g_strdup ("thirty nine");
	_tmp42_ = g_strdup ("fourty");
	_tmp43_ = g_new0 (gchar*, 39 + 1);
	_tmp43_[0] = _tmp4_;
	_tmp43_[1] = _tmp5_;
	_tmp43_[2] = _tmp6_;
	_tmp43_[3] = _tmp7_;
	_tmp43_[4] = _tmp8_;
	_tmp43_[5] = _tmp9_;
	_tmp43_[6] = _tmp10_;
	_tmp43_[7] = _tmp11_;
	_tmp43_[8] = _tmp12_;
	_tmp43_[9] = _tmp13_;
	_tmp43_[10] = _tmp14_;
	_tmp43_[11] = _tmp15_;
	_tmp43_[12] = _tmp16_;
	_tmp43_[13] = _tmp17_;
	_tmp43_[14] = _tmp18_;
	_tmp43_[15] = _tmp19_;
	_tmp43_[16] = _tmp20_;
	_tmp43_[17] = _tmp21_;
	_tmp43_[18] = _tmp22_;
	_tmp43_[19] = _tmp23_;
	_tmp43_[20] = _tmp24_;
	_tmp43_[21] = _tmp25_;
	_tmp43_[22] = _tmp26_;
	_tmp43_[23] = _tmp27_;
	_tmp43_[24] = _tmp28_;
	_tmp43_[25] = _tmp29_;
	_tmp43_[26] = _tmp30_;
	_tmp43_[27] = _tmp31_;
	_tmp43_[28] = _tmp32_;
	_tmp43_[29] = _tmp33_;
	_tmp43_[30] = _tmp34_;
	_tmp43_[31] = _tmp35_;
	_tmp43_[32] = _tmp36_;
	_tmp43_[33] = _tmp37_;
	_tmp43_[34] = _tmp38_;
	_tmp43_[35] = _tmp39_;
	_tmp43_[36] = _tmp40_;
	_tmp43_[37] = _tmp41_;
	_tmp43_[38] = _tmp42_;
	to_offer = _tmp43_;
	to_offer_length1 = 39;
	_to_offer_size_ = to_offer_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp44_ = FALSE;
			_tmp44_ = TRUE;
			while (TRUE) {
				gchar** _tmp46_;
				gint _tmp46__length1;
				GeeDeque* _tmp47_;
				gchar** _tmp48_;
				gint _tmp48__length1;
				const gchar* _tmp49_;
				GeeDeque* _tmp50_;
				gint _tmp51_;
				gint _tmp52_;
				if (!_tmp44_) {
					gint _tmp45_;
					_tmp45_ = i;
					i = _tmp45_ + 1;
				}
				_tmp44_ = FALSE;
				_tmp46_ = to_offer;
				_tmp46__length1 = to_offer_length1;
				if (!(i < _tmp46__length1)) {
					break;
				}
				_tmp47_ = test_deque;
				_tmp48_ = to_offer;
				_tmp48__length1 = to_offer_length1;
				_tmp49_ = _tmp48_[i];
				_vala_assert (gee_deque_offer_tail (_tmp47_, _tmp49_), "test_deque.offer_tail (to_offer[i])");
				_tmp50_ = test_deque;
				_tmp51_ = gee_collection_get_size ((GeeCollection*) _tmp50_);
				_tmp52_ = _tmp51_;
				_vala_assert (_tmp52_ == (i + 1), "test_deque.size == i + 1");
			}
		}
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp53_ = FALSE;
			_tmp53_ = TRUE;
			while (TRUE) {
				gchar** _tmp55_;
				gint _tmp55__length1;
				GeeDeque* _tmp56_;
				gpointer _tmp57_;
				gchar* _tmp58_;
				gchar** _tmp59_;
				gint _tmp59__length1;
				const gchar* _tmp60_;
				GeeDeque* _tmp61_;
				gpointer _tmp62_;
				gchar* _tmp63_;
				gchar** _tmp64_;
				gint _tmp64__length1;
				const gchar* _tmp65_;
				GeeDeque* _tmp66_;
				gint _tmp67_;
				gint _tmp68_;
				gchar** _tmp69_;
				gint _tmp69__length1;
				if (!_tmp53_) {
					gint _tmp54_;
					_tmp54_ = i;
					i = _tmp54_ + 1;
				}
				_tmp53_ = FALSE;
				_tmp55_ = to_offer;
				_tmp55__length1 = to_offer_length1;
				if (!(i < _tmp55__length1)) {
					break;
				}
				_tmp56_ = test_deque;
				_tmp57_ = gee_deque_peek_head (_tmp56_);
				_tmp58_ = (gchar*) _tmp57_;
				_tmp59_ = to_offer;
				_tmp59__length1 = to_offer_length1;
				_tmp60_ = _tmp59_[i];
				_vala_assert (g_strcmp0 (_tmp58_, _tmp60_) == 0, "test_deque.peek_head () == to_offer[i]");
				_g_free0 (_tmp58_);
				_tmp61_ = test_deque;
				_tmp62_ = gee_deque_poll_head (_tmp61_);
				_tmp63_ = (gchar*) _tmp62_;
				_tmp64_ = to_offer;
				_tmp64__length1 = to_offer_length1;
				_tmp65_ = _tmp64_[i];
				_vala_assert (g_strcmp0 (_tmp63_, _tmp65_) == 0, "test_deque.poll_head () == to_offer[i]");
				_g_free0 (_tmp63_);
				_tmp66_ = test_deque;
				_tmp67_ = gee_collection_get_size ((GeeCollection*) _tmp66_);
				_tmp68_ = _tmp67_;
				_tmp69_ = to_offer;
				_tmp69__length1 = to_offer_length1;
				_vala_assert (_tmp68_ == ((_tmp69__length1 - i) - 1), "test_deque.size == to_offer.length - i - 1");
			}
		}
	}
	_tmp70_ = test_deque;
	_tmp71_ = gee_deque_peek_head (_tmp70_);
	_tmp72_ = (gchar*) _tmp71_;
	_vala_assert (_tmp72_ == NULL, "test_deque.peek_head () == null");
	_g_free0 (_tmp72_);
	_tmp73_ = test_deque;
	_tmp74_ = gee_deque_poll_head (_tmp73_);
	_tmp75_ = (gchar*) _tmp74_;
	_vala_assert (_tmp75_ == NULL, "test_deque.poll_head () == null");
	_g_free0 (_tmp75_);
	_tmp76_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp76_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp77_ = FALSE;
			_tmp77_ = TRUE;
			while (TRUE) {
				gchar** _tmp79_;
				gint _tmp79__length1;
				GeeDeque* _tmp80_;
				gchar** _tmp81_;
				gint _tmp81__length1;
				const gchar* _tmp82_;
				if (!_tmp77_) {
					gint _tmp78_;
					_tmp78_ = i;
					i = _tmp78_ + 1;
				}
				_tmp77_ = FALSE;
				_tmp79_ = to_offer;
				_tmp79__length1 = to_offer_length1;
				if (!(i < _tmp79__length1)) {
					break;
				}
				_tmp80_ = test_deque;
				_tmp81_ = to_offer;
				_tmp81__length1 = to_offer_length1;
				_tmp82_ = _tmp81_[i];
				_vala_assert (gee_deque_offer_tail (_tmp80_, _tmp82_), "test_deque.offer_tail (to_offer[i])");
			}
		}
	}
	_tmp83_ = test_deque;
	_tmp84_ = gee_collection_get_size ((GeeCollection*) _tmp83_);
	_tmp85_ = _tmp84_;
	_tmp86_ = to_offer;
	_tmp86__length1 = to_offer_length1;
	_vala_assert (_tmp85_ == _tmp86__length1, "test_deque.size == to_offer.length");
	_tmp87_ = test_deque;
	_tmp88_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp87_, (GeeCollection*) _tmp88_, 1) == 1, "test_deque.drain_head (recipient, 1) == 1");
	_tmp89_ = test_deque;
	_tmp90_ = gee_collection_get_size ((GeeCollection*) _tmp89_);
	_tmp91_ = _tmp90_;
	_tmp92_ = to_offer;
	_tmp92__length1 = to_offer_length1;
	_vala_assert (_tmp91_ == (_tmp92__length1 - 1), "test_deque.size == to_offer.length - 1");
	_tmp93_ = recipient;
	_tmp94_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp93_);
	_tmp95_ = _tmp94_;
	_vala_assert (_tmp95_ == 1, "recipient.size == 1");
	_tmp96_ = recipient;
	_tmp97_ = gee_abstract_list_get ((GeeAbstractList*) _tmp96_, 0);
	_tmp98_ = (gchar*) _tmp97_;
	_tmp99_ = to_offer;
	_tmp99__length1 = to_offer_length1;
	_tmp100_ = _tmp99_[0];
	_vala_assert (g_strcmp0 (_tmp98_, _tmp100_) == 0, "recipient.get (0) == to_offer[0]");
	_g_free0 (_tmp98_);
	_tmp101_ = test_deque;
	_tmp102_ = recipient;
	_tmp103_ = to_offer;
	_tmp103__length1 = to_offer_length1;
	_vala_assert (gee_deque_drain_head (_tmp101_, (GeeCollection*) _tmp102_, -1) == (_tmp103__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
	_tmp104_ = test_deque;
	_tmp105_ = gee_collection_get_size ((GeeCollection*) _tmp104_);
	_tmp106_ = _tmp105_;
	_vala_assert (_tmp106_ == 0, "test_deque.size == 0");
	_tmp107_ = recipient;
	_tmp108_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp107_);
	_tmp109_ = _tmp108_;
	_tmp110_ = to_offer;
	_tmp110__length1 = to_offer_length1;
	_vala_assert (_tmp109_ == _tmp110__length1, "recipient.size == to_offer.length");
	{
		gint i = 0;
		i = 1;
		{
			gboolean _tmp111_ = FALSE;
			_tmp111_ = TRUE;
			while (TRUE) {
				gchar** _tmp113_;
				gint _tmp113__length1;
				GeeArrayList* _tmp114_;
				gpointer _tmp115_;
				gchar* _tmp116_;
				gchar** _tmp117_;
				gint _tmp117__length1;
				const gchar* _tmp118_;
				if (!_tmp111_) {
					gint _tmp112_;
					_tmp112_ = i;
					i = _tmp112_ + 1;
				}
				_tmp111_ = FALSE;
				_tmp113_ = to_offer;
				_tmp113__length1 = to_offer_length1;
				if (!(i < _tmp113__length1)) {
					break;
				}
				_tmp114_ = recipient;
				_tmp115_ = gee_abstract_list_get ((GeeAbstractList*) _tmp114_, i);
				_tmp116_ = (gchar*) _tmp115_;
				_tmp117_ = to_offer;
				_tmp117__length1 = to_offer_length1;
				_tmp118_ = _tmp117_[i];
				_vala_assert (g_strcmp0 (_tmp116_, _tmp118_) == 0, "recipient.get (i) == to_offer[i]");
				_g_free0 (_tmp116_);
			}
		}
	}
	_tmp119_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp119_);
	_tmp120_ = test_deque;
	_tmp121_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp120_, (GeeCollection*) _tmp121_, 1) == 0, "test_deque.drain_head (recipient, 1) == 0");
	_tmp122_ = test_deque;
	_tmp123_ = gee_collection_get_size ((GeeCollection*) _tmp122_);
	_tmp124_ = _tmp123_;
	_vala_assert (_tmp124_ == 0, "test_deque.size == 0");
	_tmp125_ = recipient;
	_tmp126_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp125_);
	_tmp127_ = _tmp126_;
	_vala_assert (_tmp127_ == 0, "recipient.size == 0");
	_tmp128_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp128_);
	_tmp129_ = test_deque;
	_tmp130_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp129_, (GeeCollection*) _tmp130_, -1) == 0, "test_deque.drain_head (recipient) == 0");
	_tmp131_ = test_deque;
	_tmp132_ = gee_collection_get_size ((GeeCollection*) _tmp131_);
	_tmp133_ = _tmp132_;
	_vala_assert (_tmp133_ == 0, "test_deque.size == 0");
	_tmp134_ = recipient;
	_tmp135_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp134_);
	_tmp136_ = _tmp135_;
	_vala_assert (_tmp136_ == 0, "recipient.size == 0");
	to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (recipient);
	_g_object_unref0 (test_deque);
}

void
deque_tests_test_stack_use (DequeTests* self)
{
	GeeDeque* test_deque = NULL;
	GeeCollection* _tmp0_;
	GeeDeque* _tmp1_;
	GeeArrayList* recipient = NULL;
	GeeArrayList* _tmp2_;
	gchar** to_offer = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar** _tmp42_;
	gint to_offer_length1;
	gint _to_offer_size_;
	GeeDeque* _tmp43_;
	GeeDeque* _tmp69_;
	gpointer _tmp70_;
	gchar* _tmp71_;
	GeeDeque* _tmp72_;
	gpointer _tmp73_;
	gchar* _tmp74_;
	GeeArrayList* _tmp75_;
	GeeDeque* _tmp82_;
	gint _tmp83_;
	gint _tmp84_;
	gchar** _tmp85_;
	gint _tmp85__length1;
	GeeDeque* _tmp86_;
	GeeArrayList* _tmp87_;
	GeeDeque* _tmp88_;
	gint _tmp89_;
	gint _tmp90_;
	gchar** _tmp91_;
	gint _tmp91__length1;
	GeeArrayList* _tmp92_;
	gint _tmp93_;
	gint _tmp94_;
	GeeArrayList* _tmp95_;
	gpointer _tmp96_;
	gchar* _tmp97_;
	gchar** _tmp98_;
	gint _tmp98__length1;
	gchar** _tmp99_;
	gint _tmp99__length1;
	const gchar* _tmp100_;
	GeeDeque* _tmp101_;
	GeeArrayList* _tmp102_;
	gchar** _tmp103_;
	gint _tmp103__length1;
	GeeDeque* _tmp104_;
	gint _tmp105_;
	gint _tmp106_;
	GeeArrayList* _tmp107_;
	gint _tmp108_;
	gint _tmp109_;
	gchar** _tmp110_;
	gint _tmp110__length1;
	GeeArrayList* _tmp120_;
	GeeDeque* _tmp121_;
	GeeArrayList* _tmp122_;
	GeeDeque* _tmp123_;
	gint _tmp124_;
	gint _tmp125_;
	GeeArrayList* _tmp126_;
	gint _tmp127_;
	gint _tmp128_;
	GeeArrayList* _tmp129_;
	GeeDeque* _tmp130_;
	GeeArrayList* _tmp131_;
	GeeDeque* _tmp132_;
	gint _tmp133_;
	gint _tmp134_;
	GeeArrayList* _tmp135_;
	gint _tmp136_;
	gint _tmp137_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
	test_deque = _tmp1_;
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	recipient = _tmp2_;
	_tmp3_ = g_strdup ("one");
	_tmp4_ = g_strdup ("two");
	_tmp5_ = g_strdup ("three");
	_tmp6_ = g_strdup ("four");
	_tmp7_ = g_strdup ("five");
	_tmp8_ = g_strdup ("six");
	_tmp9_ = g_strdup ("seven");
	_tmp10_ = g_strdup ("\neight");
	_tmp11_ = g_strdup ("nine");
	_tmp12_ = g_strdup ("ten");
	_tmp13_ = g_strdup ("eleven");
	_tmp14_ = g_strdup ("twelve");
	_tmp15_ = g_strdup ("thirteen");
	_tmp16_ = g_strdup ("fourteen\n");
	_tmp17_ = g_strdup ("fifteen");
	_tmp18_ = g_strdup ("sixteen");
	_tmp19_ = g_strdup ("seventeen");
	_tmp20_ = g_strdup ("eighteen");
	_tmp21_ = g_strdup ("nineteen\n");
	_tmp22_ = g_strdup ("twenty");
	_tmp23_ = g_strdup ("twenty one");
	_tmp24_ = g_strdup ("twenty two");
	_tmp25_ = g_strdup ("twenty three");
	_tmp26_ = g_strdup ("twenty four");
	_tmp27_ = g_strdup ("twenty five");
	_tmp28_ = g_strdup ("twenty six");
	_tmp29_ = g_strdup ("twenty seven");
	_tmp30_ = g_strdup ("twenty eight");
	_tmp31_ = g_strdup ("twenty nine");
	_tmp32_ = g_strdup ("thirty");
	_tmp33_ = g_strdup ("thirty one");
	_tmp34_ = g_strdup ("thirty two");
	_tmp35_ = g_strdup ("thirty four");
	_tmp36_ = g_strdup ("thirty five");
	_tmp37_ = g_strdup ("thirty six");
	_tmp38_ = g_strdup ("thirty seven");
	_tmp39_ = g_strdup ("thirty eight");
	_tmp40_ = g_strdup ("thirty nine");
	_tmp41_ = g_strdup ("fourty");
	_tmp42_ = g_new0 (gchar*, 39 + 1);
	_tmp42_[0] = _tmp3_;
	_tmp42_[1] = _tmp4_;
	_tmp42_[2] = _tmp5_;
	_tmp42_[3] = _tmp6_;
	_tmp42_[4] = _tmp7_;
	_tmp42_[5] = _tmp8_;
	_tmp42_[6] = _tmp9_;
	_tmp42_[7] = _tmp10_;
	_tmp42_[8] = _tmp11_;
	_tmp42_[9] = _tmp12_;
	_tmp42_[10] = _tmp13_;
	_tmp42_[11] = _tmp14_;
	_tmp42_[12] = _tmp15_;
	_tmp42_[13] = _tmp16_;
	_tmp42_[14] = _tmp17_;
	_tmp42_[15] = _tmp18_;
	_tmp42_[16] = _tmp19_;
	_tmp42_[17] = _tmp20_;
	_tmp42_[18] = _tmp21_;
	_tmp42_[19] = _tmp22_;
	_tmp42_[20] = _tmp23_;
	_tmp42_[21] = _tmp24_;
	_tmp42_[22] = _tmp25_;
	_tmp42_[23] = _tmp26_;
	_tmp42_[24] = _tmp27_;
	_tmp42_[25] = _tmp28_;
	_tmp42_[26] = _tmp29_;
	_tmp42_[27] = _tmp30_;
	_tmp42_[28] = _tmp31_;
	_tmp42_[29] = _tmp32_;
	_tmp42_[30] = _tmp33_;
	_tmp42_[31] = _tmp34_;
	_tmp42_[32] = _tmp35_;
	_tmp42_[33] = _tmp36_;
	_tmp42_[34] = _tmp37_;
	_tmp42_[35] = _tmp38_;
	_tmp42_[36] = _tmp39_;
	_tmp42_[37] = _tmp40_;
	_tmp42_[38] = _tmp41_;
	to_offer = _tmp42_;
	to_offer_length1 = 39;
	_to_offer_size_ = to_offer_length1;
	_tmp43_ = test_deque;
	_vala_assert (_tmp43_ != NULL, "test_deque != null");
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp44_ = FALSE;
			_tmp44_ = TRUE;
			while (TRUE) {
				gchar** _tmp46_;
				gint _tmp46__length1;
				GeeDeque* _tmp47_;
				gchar** _tmp48_;
				gint _tmp48__length1;
				const gchar* _tmp49_;
				GeeDeque* _tmp50_;
				gint _tmp51_;
				gint _tmp52_;
				if (!_tmp44_) {
					gint _tmp45_;
					_tmp45_ = i;
					i = _tmp45_ + 1;
				}
				_tmp44_ = FALSE;
				_tmp46_ = to_offer;
				_tmp46__length1 = to_offer_length1;
				if (!(i < _tmp46__length1)) {
					break;
				}
				_tmp47_ = test_deque;
				_tmp48_ = to_offer;
				_tmp48__length1 = to_offer_length1;
				_tmp49_ = _tmp48_[i];
				_vala_assert (gee_deque_offer_head (_tmp47_, _tmp49_), "test_deque.offer_head (to_offer[i])");
				_tmp50_ = test_deque;
				_tmp51_ = gee_collection_get_size ((GeeCollection*) _tmp50_);
				_tmp52_ = _tmp51_;
				_vala_assert (_tmp52_ == (i + 1), "test_deque.size == i + 1");
			}
		}
	}
	{
		gint i = 0;
		gchar** _tmp53_;
		gint _tmp53__length1;
		_tmp53_ = to_offer;
		_tmp53__length1 = to_offer_length1;
		i = _tmp53__length1 - 1;
		{
			gboolean _tmp54_ = FALSE;
			_tmp54_ = TRUE;
			while (TRUE) {
				GeeDeque* _tmp56_;
				gpointer _tmp57_;
				gchar* _tmp58_;
				gchar** _tmp59_;
				gint _tmp59__length1;
				const gchar* _tmp60_;
				GeeDeque* _tmp61_;
				gpointer _tmp62_;
				gchar* _tmp63_;
				gchar** _tmp64_;
				gint _tmp64__length1;
				const gchar* _tmp65_;
				GeeDeque* _tmp66_;
				gint _tmp67_;
				gint _tmp68_;
				if (!_tmp54_) {
					gint _tmp55_;
					_tmp55_ = i;
					i = _tmp55_ - 1;
				}
				_tmp54_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp56_ = test_deque;
				_tmp57_ = gee_deque_peek_head (_tmp56_);
				_tmp58_ = (gchar*) _tmp57_;
				_tmp59_ = to_offer;
				_tmp59__length1 = to_offer_length1;
				_tmp60_ = _tmp59_[i];
				_vala_assert (g_strcmp0 (_tmp58_, _tmp60_) == 0, "test_deque.peek_head () == to_offer[i]");
				_g_free0 (_tmp58_);
				_tmp61_ = test_deque;
				_tmp62_ = gee_deque_poll_head (_tmp61_);
				_tmp63_ = (gchar*) _tmp62_;
				_tmp64_ = to_offer;
				_tmp64__length1 = to_offer_length1;
				_tmp65_ = _tmp64_[i];
				_vala_assert (g_strcmp0 (_tmp63_, _tmp65_) == 0, "test_deque.poll_head () == to_offer[i]");
				_g_free0 (_tmp63_);
				_tmp66_ = test_deque;
				_tmp67_ = gee_collection_get_size ((GeeCollection*) _tmp66_);
				_tmp68_ = _tmp67_;
				_vala_assert (_tmp68_ == i, "test_deque.size == i");
			}
		}
	}
	_tmp69_ = test_deque;
	_tmp70_ = gee_deque_peek_head (_tmp69_);
	_tmp71_ = (gchar*) _tmp70_;
	_vala_assert (_tmp71_ == NULL, "test_deque.peek_head () == null");
	_g_free0 (_tmp71_);
	_tmp72_ = test_deque;
	_tmp73_ = gee_deque_poll_head (_tmp72_);
	_tmp74_ = (gchar*) _tmp73_;
	_vala_assert (_tmp74_ == NULL, "test_deque.poll_head () == null");
	_g_free0 (_tmp74_);
	_tmp75_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp75_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp76_ = FALSE;
			_tmp76_ = TRUE;
			while (TRUE) {
				gchar** _tmp78_;
				gint _tmp78__length1;
				GeeDeque* _tmp79_;
				gchar** _tmp80_;
				gint _tmp80__length1;
				const gchar* _tmp81_;
				if (!_tmp76_) {
					gint _tmp77_;
					_tmp77_ = i;
					i = _tmp77_ + 1;
				}
				_tmp76_ = FALSE;
				_tmp78_ = to_offer;
				_tmp78__length1 = to_offer_length1;
				if (!(i < _tmp78__length1)) {
					break;
				}
				_tmp79_ = test_deque;
				_tmp80_ = to_offer;
				_tmp80__length1 = to_offer_length1;
				_tmp81_ = _tmp80_[i];
				_vala_assert (gee_deque_offer_head (_tmp79_, _tmp81_), "test_deque.offer_head (to_offer[i])");
			}
		}
	}
	_tmp82_ = test_deque;
	_tmp83_ = gee_collection_get_size ((GeeCollection*) _tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = to_offer;
	_tmp85__length1 = to_offer_length1;
	_vala_assert (_tmp84_ == _tmp85__length1, "test_deque.size == to_offer.length");
	_tmp86_ = test_deque;
	_tmp87_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp86_, (GeeCollection*) _tmp87_, 1) == 1, "test_deque.drain_head (recipient, 1) == 1");
	_tmp88_ = test_deque;
	_tmp89_ = gee_collection_get_size ((GeeCollection*) _tmp88_);
	_tmp90_ = _tmp89_;
	_tmp91_ = to_offer;
	_tmp91__length1 = to_offer_length1;
	_vala_assert (_tmp90_ == (_tmp91__length1 - 1), "test_deque.size == to_offer.length - 1");
	_tmp92_ = recipient;
	_tmp93_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp92_);
	_tmp94_ = _tmp93_;
	_vala_assert (_tmp94_ == 1, "recipient.size == 1");
	_tmp95_ = recipient;
	_tmp96_ = gee_abstract_list_get ((GeeAbstractList*) _tmp95_, 0);
	_tmp97_ = (gchar*) _tmp96_;
	_tmp98_ = to_offer;
	_tmp98__length1 = to_offer_length1;
	_tmp99_ = to_offer;
	_tmp99__length1 = to_offer_length1;
	_tmp100_ = _tmp98_[_tmp99__length1 - 1];
	_vala_assert (g_strcmp0 (_tmp97_, _tmp100_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
	_g_free0 (_tmp97_);
	_tmp101_ = test_deque;
	_tmp102_ = recipient;
	_tmp103_ = to_offer;
	_tmp103__length1 = to_offer_length1;
	_vala_assert (gee_deque_drain_head (_tmp101_, (GeeCollection*) _tmp102_, -1) == (_tmp103__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
	_tmp104_ = test_deque;
	_tmp105_ = gee_collection_get_size ((GeeCollection*) _tmp104_);
	_tmp106_ = _tmp105_;
	_vala_assert (_tmp106_ == 0, "test_deque.size == 0");
	_tmp107_ = recipient;
	_tmp108_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp107_);
	_tmp109_ = _tmp108_;
	_tmp110_ = to_offer;
	_tmp110__length1 = to_offer_length1;
	_vala_assert (_tmp109_ == _tmp110__length1, "recipient.size == to_offer.length");
	{
		gint i = 0;
		i = 1;
		{
			gboolean _tmp111_ = FALSE;
			_tmp111_ = TRUE;
			while (TRUE) {
				gchar** _tmp113_;
				gint _tmp113__length1;
				GeeArrayList* _tmp114_;
				gpointer _tmp115_;
				gchar* _tmp116_;
				gchar** _tmp117_;
				gint _tmp117__length1;
				gchar** _tmp118_;
				gint _tmp118__length1;
				const gchar* _tmp119_;
				if (!_tmp111_) {
					gint _tmp112_;
					_tmp112_ = i;
					i = _tmp112_ + 1;
				}
				_tmp111_ = FALSE;
				_tmp113_ = to_offer;
				_tmp113__length1 = to_offer_length1;
				if (!(i < _tmp113__length1)) {
					break;
				}
				_tmp114_ = recipient;
				_tmp115_ = gee_abstract_list_get ((GeeAbstractList*) _tmp114_, i);
				_tmp116_ = (gchar*) _tmp115_;
				_tmp117_ = to_offer;
				_tmp117__length1 = to_offer_length1;
				_tmp118_ = to_offer;
				_tmp118__length1 = to_offer_length1;
				_tmp119_ = _tmp117_[(_tmp118__length1 - i) - 1];
				_vala_assert (g_strcmp0 (_tmp116_, _tmp119_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
				_g_free0 (_tmp116_);
			}
		}
	}
	_tmp120_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp120_);
	_tmp121_ = test_deque;
	_tmp122_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp121_, (GeeCollection*) _tmp122_, 1) == 0, "test_deque.drain_head (recipient, 1) == 0");
	_tmp123_ = test_deque;
	_tmp124_ = gee_collection_get_size ((GeeCollection*) _tmp123_);
	_tmp125_ = _tmp124_;
	_vala_assert (_tmp125_ == 0, "test_deque.size == 0");
	_tmp126_ = recipient;
	_tmp127_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp126_);
	_tmp128_ = _tmp127_;
	_vala_assert (_tmp128_ == 0, "recipient.size == 0");
	_tmp129_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp129_);
	_tmp130_ = test_deque;
	_tmp131_ = recipient;
	_vala_assert (gee_deque_drain_head (_tmp130_, (GeeCollection*) _tmp131_, -1) == 0, "test_deque.drain_head (recipient) == 0");
	_tmp132_ = test_deque;
	_tmp133_ = gee_collection_get_size ((GeeCollection*) _tmp132_);
	_tmp134_ = _tmp133_;
	_vala_assert (_tmp134_ == 0, "test_deque.size == 0");
	_tmp135_ = recipient;
	_tmp136_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp135_);
	_tmp137_ = _tmp136_;
	_vala_assert (_tmp137_ == 0, "recipient.size == 0");
	to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (recipient);
	_g_object_unref0 (test_deque);
}

void
deque_tests_test_reversed_stack_use (DequeTests* self)
{
	GeeDeque* test_deque = NULL;
	GeeCollection* _tmp0_;
	GeeDeque* _tmp1_;
	GeeArrayList* recipient = NULL;
	GeeArrayList* _tmp2_;
	gchar** to_offer = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar** _tmp42_;
	gint to_offer_length1;
	gint _to_offer_size_;
	GeeDeque* _tmp43_;
	GeeDeque* _tmp72_;
	gpointer _tmp73_;
	gchar* _tmp74_;
	GeeDeque* _tmp75_;
	gpointer _tmp76_;
	gchar* _tmp77_;
	GeeArrayList* _tmp78_;
	GeeDeque* _tmp85_;
	gint _tmp86_;
	gint _tmp87_;
	gchar** _tmp88_;
	gint _tmp88__length1;
	GeeDeque* _tmp89_;
	GeeArrayList* _tmp90_;
	GeeDeque* _tmp91_;
	gint _tmp92_;
	gint _tmp93_;
	gchar** _tmp94_;
	gint _tmp94__length1;
	GeeArrayList* _tmp95_;
	gint _tmp96_;
	gint _tmp97_;
	GeeArrayList* _tmp98_;
	gpointer _tmp99_;
	gchar* _tmp100_;
	gchar** _tmp101_;
	gint _tmp101__length1;
	gchar** _tmp102_;
	gint _tmp102__length1;
	const gchar* _tmp103_;
	GeeDeque* _tmp104_;
	GeeArrayList* _tmp105_;
	gchar** _tmp106_;
	gint _tmp106__length1;
	GeeDeque* _tmp107_;
	gint _tmp108_;
	gint _tmp109_;
	GeeArrayList* _tmp110_;
	gint _tmp111_;
	gint _tmp112_;
	gchar** _tmp113_;
	gint _tmp113__length1;
	GeeArrayList* _tmp123_;
	GeeDeque* _tmp124_;
	GeeArrayList* _tmp125_;
	GeeDeque* _tmp126_;
	gint _tmp127_;
	gint _tmp128_;
	GeeArrayList* _tmp129_;
	gint _tmp130_;
	gint _tmp131_;
	GeeArrayList* _tmp132_;
	GeeDeque* _tmp133_;
	GeeArrayList* _tmp134_;
	GeeDeque* _tmp135_;
	gint _tmp136_;
	gint _tmp137_;
	GeeArrayList* _tmp138_;
	gint _tmp139_;
	gint _tmp140_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
	test_deque = _tmp1_;
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	recipient = _tmp2_;
	_tmp3_ = g_strdup ("one");
	_tmp4_ = g_strdup ("two");
	_tmp5_ = g_strdup ("three");
	_tmp6_ = g_strdup ("four");
	_tmp7_ = g_strdup ("five");
	_tmp8_ = g_strdup ("six");
	_tmp9_ = g_strdup ("seven");
	_tmp10_ = g_strdup ("\neight");
	_tmp11_ = g_strdup ("nine");
	_tmp12_ = g_strdup ("ten");
	_tmp13_ = g_strdup ("eleven");
	_tmp14_ = g_strdup ("twelve");
	_tmp15_ = g_strdup ("thirteen");
	_tmp16_ = g_strdup ("fourteen\n");
	_tmp17_ = g_strdup ("fifteen");
	_tmp18_ = g_strdup ("sixteen");
	_tmp19_ = g_strdup ("seventeen");
	_tmp20_ = g_strdup ("eighteen");
	_tmp21_ = g_strdup ("nineteen\n");
	_tmp22_ = g_strdup ("twenty");
	_tmp23_ = g_strdup ("twenty one");
	_tmp24_ = g_strdup ("twenty two");
	_tmp25_ = g_strdup ("twenty three");
	_tmp26_ = g_strdup ("twenty four");
	_tmp27_ = g_strdup ("twenty five");
	_tmp28_ = g_strdup ("twenty six");
	_tmp29_ = g_strdup ("twenty seven");
	_tmp30_ = g_strdup ("twenty eight");
	_tmp31_ = g_strdup ("twenty nine");
	_tmp32_ = g_strdup ("thirty");
	_tmp33_ = g_strdup ("thirty one");
	_tmp34_ = g_strdup ("thirty two");
	_tmp35_ = g_strdup ("thirty four");
	_tmp36_ = g_strdup ("thirty five");
	_tmp37_ = g_strdup ("thirty six");
	_tmp38_ = g_strdup ("thirty seven");
	_tmp39_ = g_strdup ("thirty eight");
	_tmp40_ = g_strdup ("thirty nine");
	_tmp41_ = g_strdup ("fourty");
	_tmp42_ = g_new0 (gchar*, 39 + 1);
	_tmp42_[0] = _tmp3_;
	_tmp42_[1] = _tmp4_;
	_tmp42_[2] = _tmp5_;
	_tmp42_[3] = _tmp6_;
	_tmp42_[4] = _tmp7_;
	_tmp42_[5] = _tmp8_;
	_tmp42_[6] = _tmp9_;
	_tmp42_[7] = _tmp10_;
	_tmp42_[8] = _tmp11_;
	_tmp42_[9] = _tmp12_;
	_tmp42_[10] = _tmp13_;
	_tmp42_[11] = _tmp14_;
	_tmp42_[12] = _tmp15_;
	_tmp42_[13] = _tmp16_;
	_tmp42_[14] = _tmp17_;
	_tmp42_[15] = _tmp18_;
	_tmp42_[16] = _tmp19_;
	_tmp42_[17] = _tmp20_;
	_tmp42_[18] = _tmp21_;
	_tmp42_[19] = _tmp22_;
	_tmp42_[20] = _tmp23_;
	_tmp42_[21] = _tmp24_;
	_tmp42_[22] = _tmp25_;
	_tmp42_[23] = _tmp26_;
	_tmp42_[24] = _tmp27_;
	_tmp42_[25] = _tmp28_;
	_tmp42_[26] = _tmp29_;
	_tmp42_[27] = _tmp30_;
	_tmp42_[28] = _tmp31_;
	_tmp42_[29] = _tmp32_;
	_tmp42_[30] = _tmp33_;
	_tmp42_[31] = _tmp34_;
	_tmp42_[32] = _tmp35_;
	_tmp42_[33] = _tmp36_;
	_tmp42_[34] = _tmp37_;
	_tmp42_[35] = _tmp38_;
	_tmp42_[36] = _tmp39_;
	_tmp42_[37] = _tmp40_;
	_tmp42_[38] = _tmp41_;
	to_offer = _tmp42_;
	to_offer_length1 = 39;
	_to_offer_size_ = to_offer_length1;
	_tmp43_ = test_deque;
	_vala_assert (_tmp43_ != NULL, "test_deque != null");
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp44_ = FALSE;
			_tmp44_ = TRUE;
			while (TRUE) {
				gchar** _tmp46_;
				gint _tmp46__length1;
				GeeDeque* _tmp47_;
				gchar** _tmp48_;
				gint _tmp48__length1;
				const gchar* _tmp49_;
				GeeDeque* _tmp50_;
				gint _tmp51_;
				gint _tmp52_;
				if (!_tmp44_) {
					gint _tmp45_;
					_tmp45_ = i;
					i = _tmp45_ + 1;
				}
				_tmp44_ = FALSE;
				_tmp46_ = to_offer;
				_tmp46__length1 = to_offer_length1;
				if (!(i < _tmp46__length1)) {
					break;
				}
				_tmp47_ = test_deque;
				_tmp48_ = to_offer;
				_tmp48__length1 = to_offer_length1;
				_tmp49_ = _tmp48_[i];
				_vala_assert (gee_deque_offer_tail (_tmp47_, _tmp49_), "test_deque.offer_tail (to_offer[i])");
				_tmp50_ = test_deque;
				_tmp51_ = gee_collection_get_size ((GeeCollection*) _tmp50_);
				_tmp52_ = _tmp51_;
				_vala_assert (_tmp52_ == (i + 1), "test_deque.size == i + 1");
			}
		}
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp53_ = FALSE;
			_tmp53_ = TRUE;
			while (TRUE) {
				gchar** _tmp55_;
				gint _tmp55__length1;
				GeeDeque* _tmp56_;
				gpointer _tmp57_;
				gchar* _tmp58_;
				gchar** _tmp59_;
				gint _tmp59__length1;
				gchar** _tmp60_;
				gint _tmp60__length1;
				const gchar* _tmp61_;
				GeeDeque* _tmp62_;
				gpointer _tmp63_;
				gchar* _tmp64_;
				gchar** _tmp65_;
				gint _tmp65__length1;
				gchar** _tmp66_;
				gint _tmp66__length1;
				const gchar* _tmp67_;
				GeeDeque* _tmp68_;
				gint _tmp69_;
				gint _tmp70_;
				gchar** _tmp71_;
				gint _tmp71__length1;
				if (!_tmp53_) {
					gint _tmp54_;
					_tmp54_ = i;
					i = _tmp54_ + 1;
				}
				_tmp53_ = FALSE;
				_tmp55_ = to_offer;
				_tmp55__length1 = to_offer_length1;
				if (!(i < _tmp55__length1)) {
					break;
				}
				_tmp56_ = test_deque;
				_tmp57_ = gee_deque_peek_tail (_tmp56_);
				_tmp58_ = (gchar*) _tmp57_;
				_tmp59_ = to_offer;
				_tmp59__length1 = to_offer_length1;
				_tmp60_ = to_offer;
				_tmp60__length1 = to_offer_length1;
				_tmp61_ = _tmp59_[(_tmp60__length1 - i) - 1];
				_vala_assert (g_strcmp0 (_tmp58_, _tmp61_) == 0, "test_deque.peek_tail () == to_offer[to_offer.length - i - 1]");
				_g_free0 (_tmp58_);
				_tmp62_ = test_deque;
				_tmp63_ = gee_deque_poll_tail (_tmp62_);
				_tmp64_ = (gchar*) _tmp63_;
				_tmp65_ = to_offer;
				_tmp65__length1 = to_offer_length1;
				_tmp66_ = to_offer;
				_tmp66__length1 = to_offer_length1;
				_tmp67_ = _tmp65_[(_tmp66__length1 - i) - 1];
				_vala_assert (g_strcmp0 (_tmp64_, _tmp67_) == 0, "test_deque.poll_tail () == to_offer[to_offer.length - i - 1]");
				_g_free0 (_tmp64_);
				_tmp68_ = test_deque;
				_tmp69_ = gee_collection_get_size ((GeeCollection*) _tmp68_);
				_tmp70_ = _tmp69_;
				_tmp71_ = to_offer;
				_tmp71__length1 = to_offer_length1;
				_vala_assert (_tmp70_ == ((_tmp71__length1 - i) - 1), "test_deque.size == to_offer.length - i - 1");
			}
		}
	}
	_tmp72_ = test_deque;
	_tmp73_ = gee_deque_peek_tail (_tmp72_);
	_tmp74_ = (gchar*) _tmp73_;
	_vala_assert (_tmp74_ == NULL, "test_deque.peek_tail () == null");
	_g_free0 (_tmp74_);
	_tmp75_ = test_deque;
	_tmp76_ = gee_deque_poll_tail (_tmp75_);
	_tmp77_ = (gchar*) _tmp76_;
	_vala_assert (_tmp77_ == NULL, "test_deque.poll_tail () == null");
	_g_free0 (_tmp77_);
	_tmp78_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp78_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp79_ = FALSE;
			_tmp79_ = TRUE;
			while (TRUE) {
				gchar** _tmp81_;
				gint _tmp81__length1;
				GeeDeque* _tmp82_;
				gchar** _tmp83_;
				gint _tmp83__length1;
				const gchar* _tmp84_;
				if (!_tmp79_) {
					gint _tmp80_;
					_tmp80_ = i;
					i = _tmp80_ + 1;
				}
				_tmp79_ = FALSE;
				_tmp81_ = to_offer;
				_tmp81__length1 = to_offer_length1;
				if (!(i < _tmp81__length1)) {
					break;
				}
				_tmp82_ = test_deque;
				_tmp83_ = to_offer;
				_tmp83__length1 = to_offer_length1;
				_tmp84_ = _tmp83_[i];
				_vala_assert (gee_deque_offer_tail (_tmp82_, _tmp84_), "test_deque.offer_tail (to_offer[i])");
			}
		}
	}
	_tmp85_ = test_deque;
	_tmp86_ = gee_collection_get_size ((GeeCollection*) _tmp85_);
	_tmp87_ = _tmp86_;
	_tmp88_ = to_offer;
	_tmp88__length1 = to_offer_length1;
	_vala_assert (_tmp87_ == _tmp88__length1, "test_deque.size == to_offer.length");
	_tmp89_ = test_deque;
	_tmp90_ = recipient;
	_vala_assert (gee_deque_drain_tail (_tmp89_, (GeeCollection*) _tmp90_, 1) == 1, "test_deque.drain_tail (recipient, 1) == 1");
	_tmp91_ = test_deque;
	_tmp92_ = gee_collection_get_size ((GeeCollection*) _tmp91_);
	_tmp93_ = _tmp92_;
	_tmp94_ = to_offer;
	_tmp94__length1 = to_offer_length1;
	_vala_assert (_tmp93_ == (_tmp94__length1 - 1), "test_deque.size == to_offer.length - 1");
	_tmp95_ = recipient;
	_tmp96_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp95_);
	_tmp97_ = _tmp96_;
	_vala_assert (_tmp97_ == 1, "recipient.size == 1");
	_tmp98_ = recipient;
	_tmp99_ = gee_abstract_list_get ((GeeAbstractList*) _tmp98_, 0);
	_tmp100_ = (gchar*) _tmp99_;
	_tmp101_ = to_offer;
	_tmp101__length1 = to_offer_length1;
	_tmp102_ = to_offer;
	_tmp102__length1 = to_offer_length1;
	_tmp103_ = _tmp101_[_tmp102__length1 - 1];
	_vala_assert (g_strcmp0 (_tmp100_, _tmp103_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
	_g_free0 (_tmp100_);
	_tmp104_ = test_deque;
	_tmp105_ = recipient;
	_tmp106_ = to_offer;
	_tmp106__length1 = to_offer_length1;
	_vala_assert (gee_deque_drain_tail (_tmp104_, (GeeCollection*) _tmp105_, -1) == (_tmp106__length1 - 1), "test_deque.drain_tail (recipient) == to_offer.length - 1");
	_tmp107_ = test_deque;
	_tmp108_ = gee_collection_get_size ((GeeCollection*) _tmp107_);
	_tmp109_ = _tmp108_;
	_vala_assert (_tmp109_ == 0, "test_deque.size == 0");
	_tmp110_ = recipient;
	_tmp111_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp110_);
	_tmp112_ = _tmp111_;
	_tmp113_ = to_offer;
	_tmp113__length1 = to_offer_length1;
	_vala_assert (_tmp112_ == _tmp113__length1, "recipient.size == to_offer.length");
	{
		gint i = 0;
		i = 1;
		{
			gboolean _tmp114_ = FALSE;
			_tmp114_ = TRUE;
			while (TRUE) {
				gchar** _tmp116_;
				gint _tmp116__length1;
				GeeArrayList* _tmp117_;
				gpointer _tmp118_;
				gchar* _tmp119_;
				gchar** _tmp120_;
				gint _tmp120__length1;
				gchar** _tmp121_;
				gint _tmp121__length1;
				const gchar* _tmp122_;
				if (!_tmp114_) {
					gint _tmp115_;
					_tmp115_ = i;
					i = _tmp115_ + 1;
				}
				_tmp114_ = FALSE;
				_tmp116_ = to_offer;
				_tmp116__length1 = to_offer_length1;
				if (!(i < _tmp116__length1)) {
					break;
				}
				_tmp117_ = recipient;
				_tmp118_ = gee_abstract_list_get ((GeeAbstractList*) _tmp117_, i);
				_tmp119_ = (gchar*) _tmp118_;
				_tmp120_ = to_offer;
				_tmp120__length1 = to_offer_length1;
				_tmp121_ = to_offer;
				_tmp121__length1 = to_offer_length1;
				_tmp122_ = _tmp120_[(_tmp121__length1 - i) - 1];
				_vala_assert (g_strcmp0 (_tmp119_, _tmp122_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
				_g_free0 (_tmp119_);
			}
		}
	}
	_tmp123_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp123_);
	_tmp124_ = test_deque;
	_tmp125_ = recipient;
	_vala_assert (gee_deque_drain_tail (_tmp124_, (GeeCollection*) _tmp125_, 1) == 0, "test_deque.drain_tail (recipient, 1) == 0");
	_tmp126_ = test_deque;
	_tmp127_ = gee_collection_get_size ((GeeCollection*) _tmp126_);
	_tmp128_ = _tmp127_;
	_vala_assert (_tmp128_ == 0, "test_deque.size == 0");
	_tmp129_ = recipient;
	_tmp130_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp129_);
	_tmp131_ = _tmp130_;
	_vala_assert (_tmp131_ == 0, "recipient.size == 0");
	_tmp132_ = recipient;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp132_);
	_tmp133_ = test_deque;
	_tmp134_ = recipient;
	_vala_assert (gee_deque_drain_tail (_tmp133_, (GeeCollection*) _tmp134_, -1) == 0, "test_deque.drain_tail (recipient) == 0");
	_tmp135_ = test_deque;
	_tmp136_ = gee_collection_get_size ((GeeCollection*) _tmp135_);
	_tmp137_ = _tmp136_;
	_vala_assert (_tmp137_ == 0, "test_deque.size == 0");
	_tmp138_ = recipient;
	_tmp139_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp138_);
	_tmp140_ = _tmp139_;
	_vala_assert (_tmp140_ == 0, "recipient.size == 0");
	to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (recipient);
	_g_object_unref0 (test_deque);
}

static void
deque_tests_class_init (DequeTestsClass * klass,
                        gpointer klass_data)
{
	deque_tests_parent_class = g_type_class_peek_parent (klass);
}

static void
deque_tests_instance_init (DequeTests * self,
                           gpointer klass)
{
}

static GType
deque_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DequeTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deque_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DequeTests), 0, (GInstanceInitFunc) deque_tests_instance_init, NULL };
	GType deque_tests_type_id;
	deque_tests_type_id = g_type_register_static (TYPE_QUEUE_TESTS, "DequeTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return deque_tests_type_id;
}

GType
deque_tests_get_type (void)
{
	static volatile gsize deque_tests_type_id__once = 0;
	if (g_once_init_enter (&deque_tests_type_id__once)) {
		GType deque_tests_type_id;
		deque_tests_type_id = deque_tests_get_type_once ();
		g_once_init_leave (&deque_tests_type_id__once, deque_tests_type_id);
	}
	return deque_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);
}

