Update libgee to 0.9.92 (3462b25)
[profile/ivi/libgee.git] / tests / testdeque.c
1 /* testdeque.c generated by valac 0.18.0, the Vala compiler
2  * generated from testdeque.vala, do not modify */
3
4 /* testdeque.vala
5  *
6  * Copyright (C) 2009  Didier Villevalois
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  *      Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
24  */
25
26 #include <glib.h>
27 #include <glib-object.h>
28 #include <gee.h>
29 #include <stdlib.h>
30 #include <string.h>
31
32
33 #define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
34 #define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
35 #define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
36 #define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
37 #define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
38 #define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
39
40 typedef struct _GeeTestCase GeeTestCase;
41 typedef struct _GeeTestCaseClass GeeTestCaseClass;
42 typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
43
44 #define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
45 #define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
46 #define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
47 #define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
48 #define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
49 #define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
50
51 typedef struct _CollectionTests CollectionTests;
52 typedef struct _CollectionTestsClass CollectionTestsClass;
53 typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
54
55 #define TYPE_QUEUE_TESTS (queue_tests_get_type ())
56 #define QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUEUE_TESTS, QueueTests))
57 #define QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUEUE_TESTS, QueueTestsClass))
58 #define IS_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUEUE_TESTS))
59 #define IS_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUEUE_TESTS))
60 #define QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUEUE_TESTS, QueueTestsClass))
61
62 typedef struct _QueueTests QueueTests;
63 typedef struct _QueueTestsClass QueueTestsClass;
64 typedef struct _QueueTestsPrivate QueueTestsPrivate;
65
66 #define TYPE_DEQUE_TESTS (deque_tests_get_type ())
67 #define DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEQUE_TESTS, DequeTests))
68 #define DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEQUE_TESTS, DequeTestsClass))
69 #define IS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEQUE_TESTS))
70 #define IS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEQUE_TESTS))
71 #define DEQUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEQUE_TESTS, DequeTestsClass))
72
73 typedef struct _DequeTests DequeTests;
74 typedef struct _DequeTestsClass DequeTestsClass;
75 typedef struct _DequeTestsPrivate DequeTestsPrivate;
76 #define _g_free0(var) (var = (g_free (var), NULL))
77 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
78 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
79
80 struct _GeeTestCase {
81         GObject parent_instance;
82         GeeTestCasePrivate * priv;
83 };
84
85 struct _GeeTestCaseClass {
86         GObjectClass parent_class;
87         void (*set_up) (GeeTestCase* self);
88         void (*tear_down) (GeeTestCase* self);
89 };
90
91 struct _CollectionTests {
92         GeeTestCase parent_instance;
93         CollectionTestsPrivate * priv;
94         GeeCollection* test_collection;
95 };
96
97 struct _CollectionTestsClass {
98         GeeTestCaseClass parent_class;
99 };
100
101 struct _QueueTests {
102         CollectionTests parent_instance;
103         QueueTestsPrivate * priv;
104 };
105
106 struct _QueueTestsClass {
107         CollectionTestsClass parent_class;
108 };
109
110 struct _DequeTests {
111         QueueTests parent_instance;
112         DequeTestsPrivate * priv;
113 };
114
115 struct _DequeTestsClass {
116         QueueTestsClass parent_class;
117 };
118
119 typedef void (*GeeTestCaseTestMethod) (void* user_data);
120
121 static gpointer deque_tests_parent_class = NULL;
122
123 GType gee_test_case_get_type (void) G_GNUC_CONST;
124 GType collection_tests_get_type (void) G_GNUC_CONST;
125 GType queue_tests_get_type (void) G_GNUC_CONST;
126 GType deque_tests_get_type (void) G_GNUC_CONST;
127 enum  {
128         DEQUE_TESTS_DUMMY_PROPERTY
129 };
130 DequeTests* deque_tests_construct (GType object_type, const gchar* name);
131 QueueTests* queue_tests_construct (GType object_type, const gchar* name);
132 void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
133 void deque_tests_test_queue_use (DequeTests* self);
134 static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self);
135 void deque_tests_test_stack_use (DequeTests* self);
136 static void _deque_tests_test_stack_use_gee_test_case_test_method (gpointer self);
137 void deque_tests_test_reversed_stack_use (DequeTests* self);
138 static void _deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self);
139 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
140 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
141
142
143 static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self) {
144         deque_tests_test_queue_use (self);
145 }
146
147
148 static void _deque_tests_test_stack_use_gee_test_case_test_method (gpointer self) {
149         deque_tests_test_stack_use (self);
150 }
151
152
153 static void _deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self) {
154         deque_tests_test_reversed_stack_use (self);
155 }
156
157
158 DequeTests* deque_tests_construct (GType object_type, const gchar* name) {
159         DequeTests * self = NULL;
160         const gchar* _tmp0_;
161         g_return_val_if_fail (name != NULL, NULL);
162         _tmp0_ = name;
163         self = (DequeTests*) queue_tests_construct (object_type, _tmp0_);
164         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);
165         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);
166         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);
167         return self;
168 }
169
170
171 static gpointer _g_object_ref0 (gpointer self) {
172         return self ? g_object_ref (self) : NULL;
173 }
174
175
176 void deque_tests_test_queue_use (DequeTests* self) {
177         GeeCollection* _tmp0_;
178         GeeDeque* _tmp1_;
179         GeeDeque* test_deque;
180         GeeArrayList* _tmp2_;
181         GeeArrayList* recipient;
182         GeeDeque* _tmp3_;
183         gchar* _tmp4_;
184         gchar* _tmp5_;
185         gchar* _tmp6_;
186         gchar* _tmp7_;
187         gchar* _tmp8_;
188         gchar* _tmp9_;
189         gchar* _tmp10_;
190         gchar* _tmp11_;
191         gchar* _tmp12_;
192         gchar* _tmp13_;
193         gchar* _tmp14_;
194         gchar* _tmp15_;
195         gchar* _tmp16_;
196         gchar* _tmp17_;
197         gchar* _tmp18_;
198         gchar* _tmp19_;
199         gchar* _tmp20_;
200         gchar* _tmp21_;
201         gchar* _tmp22_;
202         gchar* _tmp23_;
203         gchar* _tmp24_;
204         gchar* _tmp25_;
205         gchar* _tmp26_;
206         gchar* _tmp27_;
207         gchar* _tmp28_;
208         gchar* _tmp29_;
209         gchar* _tmp30_;
210         gchar* _tmp31_;
211         gchar* _tmp32_;
212         gchar* _tmp33_;
213         gchar* _tmp34_;
214         gchar* _tmp35_;
215         gchar* _tmp36_;
216         gchar* _tmp37_;
217         gchar* _tmp38_;
218         gchar* _tmp39_;
219         gchar* _tmp40_;
220         gchar* _tmp41_;
221         gchar* _tmp42_;
222         gchar** _tmp43_ = NULL;
223         gchar** to_offer;
224         gint to_offer_length1;
225         gint _to_offer_size_;
226         GeeDeque* _tmp80_;
227         gpointer _tmp81_ = NULL;
228         gchar* _tmp82_;
229         GeeDeque* _tmp83_;
230         gpointer _tmp84_ = NULL;
231         gchar* _tmp85_;
232         GeeArrayList* _tmp86_;
233         GeeDeque* _tmp97_;
234         gint _tmp98_;
235         gint _tmp99_;
236         gchar** _tmp100_;
237         gint _tmp100__length1;
238         GeeDeque* _tmp101_;
239         GeeArrayList* _tmp102_;
240         gint _tmp103_ = 0;
241         GeeDeque* _tmp104_;
242         gint _tmp105_;
243         gint _tmp106_;
244         gchar** _tmp107_;
245         gint _tmp107__length1;
246         GeeArrayList* _tmp108_;
247         gint _tmp109_;
248         gint _tmp110_;
249         GeeArrayList* _tmp111_;
250         gpointer _tmp112_ = NULL;
251         gchar* _tmp113_;
252         gchar** _tmp114_;
253         gint _tmp114__length1;
254         const gchar* _tmp115_;
255         GeeDeque* _tmp116_;
256         GeeArrayList* _tmp117_;
257         gint _tmp118_ = 0;
258         gchar** _tmp119_;
259         gint _tmp119__length1;
260         GeeDeque* _tmp120_;
261         gint _tmp121_;
262         gint _tmp122_;
263         GeeArrayList* _tmp123_;
264         gint _tmp124_;
265         gint _tmp125_;
266         gchar** _tmp126_;
267         gint _tmp126__length1;
268         GeeArrayList* _tmp139_;
269         GeeDeque* _tmp140_;
270         GeeArrayList* _tmp141_;
271         gint _tmp142_ = 0;
272         GeeDeque* _tmp143_;
273         gint _tmp144_;
274         gint _tmp145_;
275         GeeArrayList* _tmp146_;
276         gint _tmp147_;
277         gint _tmp148_;
278         GeeArrayList* _tmp149_;
279         GeeDeque* _tmp150_;
280         GeeArrayList* _tmp151_;
281         gint _tmp152_ = 0;
282         GeeDeque* _tmp153_;
283         gint _tmp154_;
284         gint _tmp155_;
285         GeeArrayList* _tmp156_;
286         gint _tmp157_;
287         gint _tmp158_;
288         g_return_if_fail (self != NULL);
289         _tmp0_ = ((CollectionTests*) self)->test_collection;
290         _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
291         test_deque = _tmp1_;
292         _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
293         recipient = _tmp2_;
294         _tmp3_ = test_deque;
295         _vala_assert (_tmp3_ != NULL, "test_deque != null");
296         _tmp4_ = g_strdup ("one");
297         _tmp5_ = g_strdup ("two");
298         _tmp6_ = g_strdup ("three");
299         _tmp7_ = g_strdup ("four");
300         _tmp8_ = g_strdup ("five");
301         _tmp9_ = g_strdup ("six");
302         _tmp10_ = g_strdup ("seven");
303         _tmp11_ = g_strdup ("\neight");
304         _tmp12_ = g_strdup ("nine");
305         _tmp13_ = g_strdup ("ten");
306         _tmp14_ = g_strdup ("eleven");
307         _tmp15_ = g_strdup ("twelve");
308         _tmp16_ = g_strdup ("thirteen");
309         _tmp17_ = g_strdup ("fourteen\n");
310         _tmp18_ = g_strdup ("fifteen");
311         _tmp19_ = g_strdup ("sixteen");
312         _tmp20_ = g_strdup ("seventeen");
313         _tmp21_ = g_strdup ("eighteen");
314         _tmp22_ = g_strdup ("nineteen\n");
315         _tmp23_ = g_strdup ("twenty");
316         _tmp24_ = g_strdup ("twenty one");
317         _tmp25_ = g_strdup ("twenty two");
318         _tmp26_ = g_strdup ("twenty three");
319         _tmp27_ = g_strdup ("twenty four");
320         _tmp28_ = g_strdup ("twenty five");
321         _tmp29_ = g_strdup ("twenty six");
322         _tmp30_ = g_strdup ("twenty seven");
323         _tmp31_ = g_strdup ("twenty eight");
324         _tmp32_ = g_strdup ("twenty nine");
325         _tmp33_ = g_strdup ("thirty");
326         _tmp34_ = g_strdup ("thirty one");
327         _tmp35_ = g_strdup ("thirty two");
328         _tmp36_ = g_strdup ("thirty four");
329         _tmp37_ = g_strdup ("thirty five");
330         _tmp38_ = g_strdup ("thirty six");
331         _tmp39_ = g_strdup ("thirty seven");
332         _tmp40_ = g_strdup ("thirty eight");
333         _tmp41_ = g_strdup ("thirty nine");
334         _tmp42_ = g_strdup ("fourty");
335         _tmp43_ = g_new0 (gchar*, 39 + 1);
336         _tmp43_[0] = _tmp4_;
337         _tmp43_[1] = _tmp5_;
338         _tmp43_[2] = _tmp6_;
339         _tmp43_[3] = _tmp7_;
340         _tmp43_[4] = _tmp8_;
341         _tmp43_[5] = _tmp9_;
342         _tmp43_[6] = _tmp10_;
343         _tmp43_[7] = _tmp11_;
344         _tmp43_[8] = _tmp12_;
345         _tmp43_[9] = _tmp13_;
346         _tmp43_[10] = _tmp14_;
347         _tmp43_[11] = _tmp15_;
348         _tmp43_[12] = _tmp16_;
349         _tmp43_[13] = _tmp17_;
350         _tmp43_[14] = _tmp18_;
351         _tmp43_[15] = _tmp19_;
352         _tmp43_[16] = _tmp20_;
353         _tmp43_[17] = _tmp21_;
354         _tmp43_[18] = _tmp22_;
355         _tmp43_[19] = _tmp23_;
356         _tmp43_[20] = _tmp24_;
357         _tmp43_[21] = _tmp25_;
358         _tmp43_[22] = _tmp26_;
359         _tmp43_[23] = _tmp27_;
360         _tmp43_[24] = _tmp28_;
361         _tmp43_[25] = _tmp29_;
362         _tmp43_[26] = _tmp30_;
363         _tmp43_[27] = _tmp31_;
364         _tmp43_[28] = _tmp32_;
365         _tmp43_[29] = _tmp33_;
366         _tmp43_[30] = _tmp34_;
367         _tmp43_[31] = _tmp35_;
368         _tmp43_[32] = _tmp36_;
369         _tmp43_[33] = _tmp37_;
370         _tmp43_[34] = _tmp38_;
371         _tmp43_[35] = _tmp39_;
372         _tmp43_[36] = _tmp40_;
373         _tmp43_[37] = _tmp41_;
374         _tmp43_[38] = _tmp42_;
375         to_offer = _tmp43_;
376         to_offer_length1 = 39;
377         _to_offer_size_ = to_offer_length1;
378         {
379                 gint i;
380                 i = 0;
381                 {
382                         gboolean _tmp44_;
383                         _tmp44_ = TRUE;
384                         while (TRUE) {
385                                 gboolean _tmp45_;
386                                 gint _tmp47_;
387                                 gchar** _tmp48_;
388                                 gint _tmp48__length1;
389                                 GeeDeque* _tmp49_;
390                                 gchar** _tmp50_;
391                                 gint _tmp50__length1;
392                                 gint _tmp51_;
393                                 const gchar* _tmp52_;
394                                 gboolean _tmp53_ = FALSE;
395                                 GeeDeque* _tmp54_;
396                                 gint _tmp55_;
397                                 gint _tmp56_;
398                                 gint _tmp57_;
399                                 _tmp45_ = _tmp44_;
400                                 if (!_tmp45_) {
401                                         gint _tmp46_;
402                                         _tmp46_ = i;
403                                         i = _tmp46_ + 1;
404                                 }
405                                 _tmp44_ = FALSE;
406                                 _tmp47_ = i;
407                                 _tmp48_ = to_offer;
408                                 _tmp48__length1 = to_offer_length1;
409                                 if (!(_tmp47_ < _tmp48__length1)) {
410                                         break;
411                                 }
412                                 _tmp49_ = test_deque;
413                                 _tmp50_ = to_offer;
414                                 _tmp50__length1 = to_offer_length1;
415                                 _tmp51_ = i;
416                                 _tmp52_ = _tmp50_[_tmp51_];
417                                 _tmp53_ = gee_deque_offer_tail (_tmp49_, _tmp52_);
418                                 _vala_assert (_tmp53_, "test_deque.offer_tail (to_offer[i])");
419                                 _tmp54_ = test_deque;
420                                 _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
421                                 _tmp56_ = _tmp55_;
422                                 _tmp57_ = i;
423                                 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
424                         }
425                 }
426         }
427         {
428                 gint i;
429                 i = 0;
430                 {
431                         gboolean _tmp58_;
432                         _tmp58_ = TRUE;
433                         while (TRUE) {
434                                 gboolean _tmp59_;
435                                 gint _tmp61_;
436                                 gchar** _tmp62_;
437                                 gint _tmp62__length1;
438                                 GeeDeque* _tmp63_;
439                                 gpointer _tmp64_ = NULL;
440                                 gchar* _tmp65_;
441                                 gchar** _tmp66_;
442                                 gint _tmp66__length1;
443                                 gint _tmp67_;
444                                 const gchar* _tmp68_;
445                                 GeeDeque* _tmp69_;
446                                 gpointer _tmp70_ = NULL;
447                                 gchar* _tmp71_;
448                                 gchar** _tmp72_;
449                                 gint _tmp72__length1;
450                                 gint _tmp73_;
451                                 const gchar* _tmp74_;
452                                 GeeDeque* _tmp75_;
453                                 gint _tmp76_;
454                                 gint _tmp77_;
455                                 gchar** _tmp78_;
456                                 gint _tmp78__length1;
457                                 gint _tmp79_;
458                                 _tmp59_ = _tmp58_;
459                                 if (!_tmp59_) {
460                                         gint _tmp60_;
461                                         _tmp60_ = i;
462                                         i = _tmp60_ + 1;
463                                 }
464                                 _tmp58_ = FALSE;
465                                 _tmp61_ = i;
466                                 _tmp62_ = to_offer;
467                                 _tmp62__length1 = to_offer_length1;
468                                 if (!(_tmp61_ < _tmp62__length1)) {
469                                         break;
470                                 }
471                                 _tmp63_ = test_deque;
472                                 _tmp64_ = gee_deque_peek_head (_tmp63_);
473                                 _tmp65_ = (gchar*) _tmp64_;
474                                 _tmp66_ = to_offer;
475                                 _tmp66__length1 = to_offer_length1;
476                                 _tmp67_ = i;
477                                 _tmp68_ = _tmp66_[_tmp67_];
478                                 _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
479                                 _g_free0 (_tmp65_);
480                                 _tmp69_ = test_deque;
481                                 _tmp70_ = gee_deque_poll_head (_tmp69_);
482                                 _tmp71_ = (gchar*) _tmp70_;
483                                 _tmp72_ = to_offer;
484                                 _tmp72__length1 = to_offer_length1;
485                                 _tmp73_ = i;
486                                 _tmp74_ = _tmp72_[_tmp73_];
487                                 _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
488                                 _g_free0 (_tmp71_);
489                                 _tmp75_ = test_deque;
490                                 _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
491                                 _tmp77_ = _tmp76_;
492                                 _tmp78_ = to_offer;
493                                 _tmp78__length1 = to_offer_length1;
494                                 _tmp79_ = i;
495                                 _vala_assert (_tmp77_ == ((_tmp78__length1 - _tmp79_) - 1), "test_deque.size == to_offer.length - i - 1");
496                         }
497                 }
498         }
499         _tmp80_ = test_deque;
500         _tmp81_ = gee_deque_peek_head (_tmp80_);
501         _tmp82_ = (gchar*) _tmp81_;
502         _vala_assert (_tmp82_ == NULL, "test_deque.peek_head () == null");
503         _g_free0 (_tmp82_);
504         _tmp83_ = test_deque;
505         _tmp84_ = gee_deque_poll_head (_tmp83_);
506         _tmp85_ = (gchar*) _tmp84_;
507         _vala_assert (_tmp85_ == NULL, "test_deque.poll_head () == null");
508         _g_free0 (_tmp85_);
509         _tmp86_ = recipient;
510         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp86_);
511         {
512                 gint i;
513                 i = 0;
514                 {
515                         gboolean _tmp87_;
516                         _tmp87_ = TRUE;
517                         while (TRUE) {
518                                 gboolean _tmp88_;
519                                 gint _tmp90_;
520                                 gchar** _tmp91_;
521                                 gint _tmp91__length1;
522                                 GeeDeque* _tmp92_;
523                                 gchar** _tmp93_;
524                                 gint _tmp93__length1;
525                                 gint _tmp94_;
526                                 const gchar* _tmp95_;
527                                 gboolean _tmp96_ = FALSE;
528                                 _tmp88_ = _tmp87_;
529                                 if (!_tmp88_) {
530                                         gint _tmp89_;
531                                         _tmp89_ = i;
532                                         i = _tmp89_ + 1;
533                                 }
534                                 _tmp87_ = FALSE;
535                                 _tmp90_ = i;
536                                 _tmp91_ = to_offer;
537                                 _tmp91__length1 = to_offer_length1;
538                                 if (!(_tmp90_ < _tmp91__length1)) {
539                                         break;
540                                 }
541                                 _tmp92_ = test_deque;
542                                 _tmp93_ = to_offer;
543                                 _tmp93__length1 = to_offer_length1;
544                                 _tmp94_ = i;
545                                 _tmp95_ = _tmp93_[_tmp94_];
546                                 _tmp96_ = gee_deque_offer_tail (_tmp92_, _tmp95_);
547                                 _vala_assert (_tmp96_, "test_deque.offer_tail (to_offer[i])");
548                         }
549                 }
550         }
551         _tmp97_ = test_deque;
552         _tmp98_ = gee_collection_get_size ((GeeCollection*) _tmp97_);
553         _tmp99_ = _tmp98_;
554         _tmp100_ = to_offer;
555         _tmp100__length1 = to_offer_length1;
556         _vala_assert (_tmp99_ == _tmp100__length1, "test_deque.size == to_offer.length");
557         _tmp101_ = test_deque;
558         _tmp102_ = recipient;
559         _tmp103_ = gee_deque_drain_head (_tmp101_, (GeeCollection*) _tmp102_, 1);
560         _vala_assert (_tmp103_ == 1, "test_deque.drain_head (recipient, 1) == 1");
561         _tmp104_ = test_deque;
562         _tmp105_ = gee_collection_get_size ((GeeCollection*) _tmp104_);
563         _tmp106_ = _tmp105_;
564         _tmp107_ = to_offer;
565         _tmp107__length1 = to_offer_length1;
566         _vala_assert (_tmp106_ == (_tmp107__length1 - 1), "test_deque.size == to_offer.length - 1");
567         _tmp108_ = recipient;
568         _tmp109_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp108_);
569         _tmp110_ = _tmp109_;
570         _vala_assert (_tmp110_ == 1, "recipient.size == 1");
571         _tmp111_ = recipient;
572         _tmp112_ = gee_abstract_list_get ((GeeAbstractList*) _tmp111_, 0);
573         _tmp113_ = (gchar*) _tmp112_;
574         _tmp114_ = to_offer;
575         _tmp114__length1 = to_offer_length1;
576         _tmp115_ = _tmp114_[0];
577         _vala_assert (g_strcmp0 (_tmp113_, _tmp115_) == 0, "recipient.get (0) == to_offer[0]");
578         _g_free0 (_tmp113_);
579         _tmp116_ = test_deque;
580         _tmp117_ = recipient;
581         _tmp118_ = gee_deque_drain_head (_tmp116_, (GeeCollection*) _tmp117_, -1);
582         _tmp119_ = to_offer;
583         _tmp119__length1 = to_offer_length1;
584         _vala_assert (_tmp118_ == (_tmp119__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
585         _tmp120_ = test_deque;
586         _tmp121_ = gee_collection_get_size ((GeeCollection*) _tmp120_);
587         _tmp122_ = _tmp121_;
588         _vala_assert (_tmp122_ == 0, "test_deque.size == 0");
589         _tmp123_ = recipient;
590         _tmp124_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp123_);
591         _tmp125_ = _tmp124_;
592         _tmp126_ = to_offer;
593         _tmp126__length1 = to_offer_length1;
594         _vala_assert (_tmp125_ == _tmp126__length1, "recipient.size == to_offer.length");
595         {
596                 gint i;
597                 i = 1;
598                 {
599                         gboolean _tmp127_;
600                         _tmp127_ = TRUE;
601                         while (TRUE) {
602                                 gboolean _tmp128_;
603                                 gint _tmp130_;
604                                 gchar** _tmp131_;
605                                 gint _tmp131__length1;
606                                 GeeArrayList* _tmp132_;
607                                 gint _tmp133_;
608                                 gpointer _tmp134_ = NULL;
609                                 gchar* _tmp135_;
610                                 gchar** _tmp136_;
611                                 gint _tmp136__length1;
612                                 gint _tmp137_;
613                                 const gchar* _tmp138_;
614                                 _tmp128_ = _tmp127_;
615                                 if (!_tmp128_) {
616                                         gint _tmp129_;
617                                         _tmp129_ = i;
618                                         i = _tmp129_ + 1;
619                                 }
620                                 _tmp127_ = FALSE;
621                                 _tmp130_ = i;
622                                 _tmp131_ = to_offer;
623                                 _tmp131__length1 = to_offer_length1;
624                                 if (!(_tmp130_ < _tmp131__length1)) {
625                                         break;
626                                 }
627                                 _tmp132_ = recipient;
628                                 _tmp133_ = i;
629                                 _tmp134_ = gee_abstract_list_get ((GeeAbstractList*) _tmp132_, _tmp133_);
630                                 _tmp135_ = (gchar*) _tmp134_;
631                                 _tmp136_ = to_offer;
632                                 _tmp136__length1 = to_offer_length1;
633                                 _tmp137_ = i;
634                                 _tmp138_ = _tmp136_[_tmp137_];
635                                 _vala_assert (g_strcmp0 (_tmp135_, _tmp138_) == 0, "recipient.get (i) == to_offer[i]");
636                                 _g_free0 (_tmp135_);
637                         }
638                 }
639         }
640         _tmp139_ = recipient;
641         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp139_);
642         _tmp140_ = test_deque;
643         _tmp141_ = recipient;
644         _tmp142_ = gee_deque_drain_head (_tmp140_, (GeeCollection*) _tmp141_, 1);
645         _vala_assert (_tmp142_ == 0, "test_deque.drain_head (recipient, 1) == 0");
646         _tmp143_ = test_deque;
647         _tmp144_ = gee_collection_get_size ((GeeCollection*) _tmp143_);
648         _tmp145_ = _tmp144_;
649         _vala_assert (_tmp145_ == 0, "test_deque.size == 0");
650         _tmp146_ = recipient;
651         _tmp147_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp146_);
652         _tmp148_ = _tmp147_;
653         _vala_assert (_tmp148_ == 0, "recipient.size == 0");
654         _tmp149_ = recipient;
655         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp149_);
656         _tmp150_ = test_deque;
657         _tmp151_ = recipient;
658         _tmp152_ = gee_deque_drain_head (_tmp150_, (GeeCollection*) _tmp151_, -1);
659         _vala_assert (_tmp152_ == 0, "test_deque.drain_head (recipient) == 0");
660         _tmp153_ = test_deque;
661         _tmp154_ = gee_collection_get_size ((GeeCollection*) _tmp153_);
662         _tmp155_ = _tmp154_;
663         _vala_assert (_tmp155_ == 0, "test_deque.size == 0");
664         _tmp156_ = recipient;
665         _tmp157_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp156_);
666         _tmp158_ = _tmp157_;
667         _vala_assert (_tmp158_ == 0, "recipient.size == 0");
668         to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
669         _g_object_unref0 (recipient);
670         _g_object_unref0 (test_deque);
671 }
672
673
674 void deque_tests_test_stack_use (DequeTests* self) {
675         GeeCollection* _tmp0_;
676         GeeDeque* _tmp1_;
677         GeeDeque* test_deque;
678         GeeArrayList* _tmp2_;
679         GeeArrayList* recipient;
680         gchar* _tmp3_;
681         gchar* _tmp4_;
682         gchar* _tmp5_;
683         gchar* _tmp6_;
684         gchar* _tmp7_;
685         gchar* _tmp8_;
686         gchar* _tmp9_;
687         gchar* _tmp10_;
688         gchar* _tmp11_;
689         gchar* _tmp12_;
690         gchar* _tmp13_;
691         gchar* _tmp14_;
692         gchar* _tmp15_;
693         gchar* _tmp16_;
694         gchar* _tmp17_;
695         gchar* _tmp18_;
696         gchar* _tmp19_;
697         gchar* _tmp20_;
698         gchar* _tmp21_;
699         gchar* _tmp22_;
700         gchar* _tmp23_;
701         gchar* _tmp24_;
702         gchar* _tmp25_;
703         gchar* _tmp26_;
704         gchar* _tmp27_;
705         gchar* _tmp28_;
706         gchar* _tmp29_;
707         gchar* _tmp30_;
708         gchar* _tmp31_;
709         gchar* _tmp32_;
710         gchar* _tmp33_;
711         gchar* _tmp34_;
712         gchar* _tmp35_;
713         gchar* _tmp36_;
714         gchar* _tmp37_;
715         gchar* _tmp38_;
716         gchar* _tmp39_;
717         gchar* _tmp40_;
718         gchar* _tmp41_;
719         gchar** _tmp42_ = NULL;
720         gchar** to_offer;
721         gint to_offer_length1;
722         gint _to_offer_size_;
723         GeeDeque* _tmp43_;
724         GeeDeque* _tmp79_;
725         gpointer _tmp80_ = NULL;
726         gchar* _tmp81_;
727         GeeDeque* _tmp82_;
728         gpointer _tmp83_ = NULL;
729         gchar* _tmp84_;
730         GeeArrayList* _tmp85_;
731         GeeDeque* _tmp96_;
732         gint _tmp97_;
733         gint _tmp98_;
734         gchar** _tmp99_;
735         gint _tmp99__length1;
736         GeeDeque* _tmp100_;
737         GeeArrayList* _tmp101_;
738         gint _tmp102_ = 0;
739         GeeDeque* _tmp103_;
740         gint _tmp104_;
741         gint _tmp105_;
742         gchar** _tmp106_;
743         gint _tmp106__length1;
744         GeeArrayList* _tmp107_;
745         gint _tmp108_;
746         gint _tmp109_;
747         GeeArrayList* _tmp110_;
748         gpointer _tmp111_ = NULL;
749         gchar* _tmp112_;
750         gchar** _tmp113_;
751         gint _tmp113__length1;
752         gchar** _tmp114_;
753         gint _tmp114__length1;
754         const gchar* _tmp115_;
755         GeeDeque* _tmp116_;
756         GeeArrayList* _tmp117_;
757         gint _tmp118_ = 0;
758         gchar** _tmp119_;
759         gint _tmp119__length1;
760         GeeDeque* _tmp120_;
761         gint _tmp121_;
762         gint _tmp122_;
763         GeeArrayList* _tmp123_;
764         gint _tmp124_;
765         gint _tmp125_;
766         gchar** _tmp126_;
767         gint _tmp126__length1;
768         GeeArrayList* _tmp140_;
769         GeeDeque* _tmp141_;
770         GeeArrayList* _tmp142_;
771         gint _tmp143_ = 0;
772         GeeDeque* _tmp144_;
773         gint _tmp145_;
774         gint _tmp146_;
775         GeeArrayList* _tmp147_;
776         gint _tmp148_;
777         gint _tmp149_;
778         GeeArrayList* _tmp150_;
779         GeeDeque* _tmp151_;
780         GeeArrayList* _tmp152_;
781         gint _tmp153_ = 0;
782         GeeDeque* _tmp154_;
783         gint _tmp155_;
784         gint _tmp156_;
785         GeeArrayList* _tmp157_;
786         gint _tmp158_;
787         gint _tmp159_;
788         g_return_if_fail (self != NULL);
789         _tmp0_ = ((CollectionTests*) self)->test_collection;
790         _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
791         test_deque = _tmp1_;
792         _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
793         recipient = _tmp2_;
794         _tmp3_ = g_strdup ("one");
795         _tmp4_ = g_strdup ("two");
796         _tmp5_ = g_strdup ("three");
797         _tmp6_ = g_strdup ("four");
798         _tmp7_ = g_strdup ("five");
799         _tmp8_ = g_strdup ("six");
800         _tmp9_ = g_strdup ("seven");
801         _tmp10_ = g_strdup ("\neight");
802         _tmp11_ = g_strdup ("nine");
803         _tmp12_ = g_strdup ("ten");
804         _tmp13_ = g_strdup ("eleven");
805         _tmp14_ = g_strdup ("twelve");
806         _tmp15_ = g_strdup ("thirteen");
807         _tmp16_ = g_strdup ("fourteen\n");
808         _tmp17_ = g_strdup ("fifteen");
809         _tmp18_ = g_strdup ("sixteen");
810         _tmp19_ = g_strdup ("seventeen");
811         _tmp20_ = g_strdup ("eighteen");
812         _tmp21_ = g_strdup ("nineteen\n");
813         _tmp22_ = g_strdup ("twenty");
814         _tmp23_ = g_strdup ("twenty one");
815         _tmp24_ = g_strdup ("twenty two");
816         _tmp25_ = g_strdup ("twenty three");
817         _tmp26_ = g_strdup ("twenty four");
818         _tmp27_ = g_strdup ("twenty five");
819         _tmp28_ = g_strdup ("twenty six");
820         _tmp29_ = g_strdup ("twenty seven");
821         _tmp30_ = g_strdup ("twenty eight");
822         _tmp31_ = g_strdup ("twenty nine");
823         _tmp32_ = g_strdup ("thirty");
824         _tmp33_ = g_strdup ("thirty one");
825         _tmp34_ = g_strdup ("thirty two");
826         _tmp35_ = g_strdup ("thirty four");
827         _tmp36_ = g_strdup ("thirty five");
828         _tmp37_ = g_strdup ("thirty six");
829         _tmp38_ = g_strdup ("thirty seven");
830         _tmp39_ = g_strdup ("thirty eight");
831         _tmp40_ = g_strdup ("thirty nine");
832         _tmp41_ = g_strdup ("fourty");
833         _tmp42_ = g_new0 (gchar*, 39 + 1);
834         _tmp42_[0] = _tmp3_;
835         _tmp42_[1] = _tmp4_;
836         _tmp42_[2] = _tmp5_;
837         _tmp42_[3] = _tmp6_;
838         _tmp42_[4] = _tmp7_;
839         _tmp42_[5] = _tmp8_;
840         _tmp42_[6] = _tmp9_;
841         _tmp42_[7] = _tmp10_;
842         _tmp42_[8] = _tmp11_;
843         _tmp42_[9] = _tmp12_;
844         _tmp42_[10] = _tmp13_;
845         _tmp42_[11] = _tmp14_;
846         _tmp42_[12] = _tmp15_;
847         _tmp42_[13] = _tmp16_;
848         _tmp42_[14] = _tmp17_;
849         _tmp42_[15] = _tmp18_;
850         _tmp42_[16] = _tmp19_;
851         _tmp42_[17] = _tmp20_;
852         _tmp42_[18] = _tmp21_;
853         _tmp42_[19] = _tmp22_;
854         _tmp42_[20] = _tmp23_;
855         _tmp42_[21] = _tmp24_;
856         _tmp42_[22] = _tmp25_;
857         _tmp42_[23] = _tmp26_;
858         _tmp42_[24] = _tmp27_;
859         _tmp42_[25] = _tmp28_;
860         _tmp42_[26] = _tmp29_;
861         _tmp42_[27] = _tmp30_;
862         _tmp42_[28] = _tmp31_;
863         _tmp42_[29] = _tmp32_;
864         _tmp42_[30] = _tmp33_;
865         _tmp42_[31] = _tmp34_;
866         _tmp42_[32] = _tmp35_;
867         _tmp42_[33] = _tmp36_;
868         _tmp42_[34] = _tmp37_;
869         _tmp42_[35] = _tmp38_;
870         _tmp42_[36] = _tmp39_;
871         _tmp42_[37] = _tmp40_;
872         _tmp42_[38] = _tmp41_;
873         to_offer = _tmp42_;
874         to_offer_length1 = 39;
875         _to_offer_size_ = to_offer_length1;
876         _tmp43_ = test_deque;
877         _vala_assert (_tmp43_ != NULL, "test_deque != null");
878         {
879                 gint i;
880                 i = 0;
881                 {
882                         gboolean _tmp44_;
883                         _tmp44_ = TRUE;
884                         while (TRUE) {
885                                 gboolean _tmp45_;
886                                 gint _tmp47_;
887                                 gchar** _tmp48_;
888                                 gint _tmp48__length1;
889                                 GeeDeque* _tmp49_;
890                                 gchar** _tmp50_;
891                                 gint _tmp50__length1;
892                                 gint _tmp51_;
893                                 const gchar* _tmp52_;
894                                 gboolean _tmp53_ = FALSE;
895                                 GeeDeque* _tmp54_;
896                                 gint _tmp55_;
897                                 gint _tmp56_;
898                                 gint _tmp57_;
899                                 _tmp45_ = _tmp44_;
900                                 if (!_tmp45_) {
901                                         gint _tmp46_;
902                                         _tmp46_ = i;
903                                         i = _tmp46_ + 1;
904                                 }
905                                 _tmp44_ = FALSE;
906                                 _tmp47_ = i;
907                                 _tmp48_ = to_offer;
908                                 _tmp48__length1 = to_offer_length1;
909                                 if (!(_tmp47_ < _tmp48__length1)) {
910                                         break;
911                                 }
912                                 _tmp49_ = test_deque;
913                                 _tmp50_ = to_offer;
914                                 _tmp50__length1 = to_offer_length1;
915                                 _tmp51_ = i;
916                                 _tmp52_ = _tmp50_[_tmp51_];
917                                 _tmp53_ = gee_deque_offer_head (_tmp49_, _tmp52_);
918                                 _vala_assert (_tmp53_, "test_deque.offer_head (to_offer[i])");
919                                 _tmp54_ = test_deque;
920                                 _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
921                                 _tmp56_ = _tmp55_;
922                                 _tmp57_ = i;
923                                 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
924                         }
925                 }
926         }
927         {
928                 gchar** _tmp58_;
929                 gint _tmp58__length1;
930                 gint i;
931                 _tmp58_ = to_offer;
932                 _tmp58__length1 = to_offer_length1;
933                 i = _tmp58__length1 - 1;
934                 {
935                         gboolean _tmp59_;
936                         _tmp59_ = TRUE;
937                         while (TRUE) {
938                                 gboolean _tmp60_;
939                                 gint _tmp62_;
940                                 GeeDeque* _tmp63_;
941                                 gpointer _tmp64_ = NULL;
942                                 gchar* _tmp65_;
943                                 gchar** _tmp66_;
944                                 gint _tmp66__length1;
945                                 gint _tmp67_;
946                                 const gchar* _tmp68_;
947                                 GeeDeque* _tmp69_;
948                                 gpointer _tmp70_ = NULL;
949                                 gchar* _tmp71_;
950                                 gchar** _tmp72_;
951                                 gint _tmp72__length1;
952                                 gint _tmp73_;
953                                 const gchar* _tmp74_;
954                                 GeeDeque* _tmp75_;
955                                 gint _tmp76_;
956                                 gint _tmp77_;
957                                 gint _tmp78_;
958                                 _tmp60_ = _tmp59_;
959                                 if (!_tmp60_) {
960                                         gint _tmp61_;
961                                         _tmp61_ = i;
962                                         i = _tmp61_ - 1;
963                                 }
964                                 _tmp59_ = FALSE;
965                                 _tmp62_ = i;
966                                 if (!(_tmp62_ >= 0)) {
967                                         break;
968                                 }
969                                 _tmp63_ = test_deque;
970                                 _tmp64_ = gee_deque_peek_head (_tmp63_);
971                                 _tmp65_ = (gchar*) _tmp64_;
972                                 _tmp66_ = to_offer;
973                                 _tmp66__length1 = to_offer_length1;
974                                 _tmp67_ = i;
975                                 _tmp68_ = _tmp66_[_tmp67_];
976                                 _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
977                                 _g_free0 (_tmp65_);
978                                 _tmp69_ = test_deque;
979                                 _tmp70_ = gee_deque_poll_head (_tmp69_);
980                                 _tmp71_ = (gchar*) _tmp70_;
981                                 _tmp72_ = to_offer;
982                                 _tmp72__length1 = to_offer_length1;
983                                 _tmp73_ = i;
984                                 _tmp74_ = _tmp72_[_tmp73_];
985                                 _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
986                                 _g_free0 (_tmp71_);
987                                 _tmp75_ = test_deque;
988                                 _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
989                                 _tmp77_ = _tmp76_;
990                                 _tmp78_ = i;
991                                 _vala_assert (_tmp77_ == _tmp78_, "test_deque.size == i");
992                         }
993                 }
994         }
995         _tmp79_ = test_deque;
996         _tmp80_ = gee_deque_peek_head (_tmp79_);
997         _tmp81_ = (gchar*) _tmp80_;
998         _vala_assert (_tmp81_ == NULL, "test_deque.peek_head () == null");
999         _g_free0 (_tmp81_);
1000         _tmp82_ = test_deque;
1001         _tmp83_ = gee_deque_poll_head (_tmp82_);
1002         _tmp84_ = (gchar*) _tmp83_;
1003         _vala_assert (_tmp84_ == NULL, "test_deque.poll_head () == null");
1004         _g_free0 (_tmp84_);
1005         _tmp85_ = recipient;
1006         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp85_);
1007         {
1008                 gint i;
1009                 i = 0;
1010                 {
1011                         gboolean _tmp86_;
1012                         _tmp86_ = TRUE;
1013                         while (TRUE) {
1014                                 gboolean _tmp87_;
1015                                 gint _tmp89_;
1016                                 gchar** _tmp90_;
1017                                 gint _tmp90__length1;
1018                                 GeeDeque* _tmp91_;
1019                                 gchar** _tmp92_;
1020                                 gint _tmp92__length1;
1021                                 gint _tmp93_;
1022                                 const gchar* _tmp94_;
1023                                 gboolean _tmp95_ = FALSE;
1024                                 _tmp87_ = _tmp86_;
1025                                 if (!_tmp87_) {
1026                                         gint _tmp88_;
1027                                         _tmp88_ = i;
1028                                         i = _tmp88_ + 1;
1029                                 }
1030                                 _tmp86_ = FALSE;
1031                                 _tmp89_ = i;
1032                                 _tmp90_ = to_offer;
1033                                 _tmp90__length1 = to_offer_length1;
1034                                 if (!(_tmp89_ < _tmp90__length1)) {
1035                                         break;
1036                                 }
1037                                 _tmp91_ = test_deque;
1038                                 _tmp92_ = to_offer;
1039                                 _tmp92__length1 = to_offer_length1;
1040                                 _tmp93_ = i;
1041                                 _tmp94_ = _tmp92_[_tmp93_];
1042                                 _tmp95_ = gee_deque_offer_head (_tmp91_, _tmp94_);
1043                                 _vala_assert (_tmp95_, "test_deque.offer_head (to_offer[i])");
1044                         }
1045                 }
1046         }
1047         _tmp96_ = test_deque;
1048         _tmp97_ = gee_collection_get_size ((GeeCollection*) _tmp96_);
1049         _tmp98_ = _tmp97_;
1050         _tmp99_ = to_offer;
1051         _tmp99__length1 = to_offer_length1;
1052         _vala_assert (_tmp98_ == _tmp99__length1, "test_deque.size == to_offer.length");
1053         _tmp100_ = test_deque;
1054         _tmp101_ = recipient;
1055         _tmp102_ = gee_deque_drain_head (_tmp100_, (GeeCollection*) _tmp101_, 1);
1056         _vala_assert (_tmp102_ == 1, "test_deque.drain_head (recipient, 1) == 1");
1057         _tmp103_ = test_deque;
1058         _tmp104_ = gee_collection_get_size ((GeeCollection*) _tmp103_);
1059         _tmp105_ = _tmp104_;
1060         _tmp106_ = to_offer;
1061         _tmp106__length1 = to_offer_length1;
1062         _vala_assert (_tmp105_ == (_tmp106__length1 - 1), "test_deque.size == to_offer.length - 1");
1063         _tmp107_ = recipient;
1064         _tmp108_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp107_);
1065         _tmp109_ = _tmp108_;
1066         _vala_assert (_tmp109_ == 1, "recipient.size == 1");
1067         _tmp110_ = recipient;
1068         _tmp111_ = gee_abstract_list_get ((GeeAbstractList*) _tmp110_, 0);
1069         _tmp112_ = (gchar*) _tmp111_;
1070         _tmp113_ = to_offer;
1071         _tmp113__length1 = to_offer_length1;
1072         _tmp114_ = to_offer;
1073         _tmp114__length1 = to_offer_length1;
1074         _tmp115_ = _tmp113_[_tmp114__length1 - 1];
1075         _vala_assert (g_strcmp0 (_tmp112_, _tmp115_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
1076         _g_free0 (_tmp112_);
1077         _tmp116_ = test_deque;
1078         _tmp117_ = recipient;
1079         _tmp118_ = gee_deque_drain_head (_tmp116_, (GeeCollection*) _tmp117_, -1);
1080         _tmp119_ = to_offer;
1081         _tmp119__length1 = to_offer_length1;
1082         _vala_assert (_tmp118_ == (_tmp119__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
1083         _tmp120_ = test_deque;
1084         _tmp121_ = gee_collection_get_size ((GeeCollection*) _tmp120_);
1085         _tmp122_ = _tmp121_;
1086         _vala_assert (_tmp122_ == 0, "test_deque.size == 0");
1087         _tmp123_ = recipient;
1088         _tmp124_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp123_);
1089         _tmp125_ = _tmp124_;
1090         _tmp126_ = to_offer;
1091         _tmp126__length1 = to_offer_length1;
1092         _vala_assert (_tmp125_ == _tmp126__length1, "recipient.size == to_offer.length");
1093         {
1094                 gint i;
1095                 i = 1;
1096                 {
1097                         gboolean _tmp127_;
1098                         _tmp127_ = TRUE;
1099                         while (TRUE) {
1100                                 gboolean _tmp128_;
1101                                 gint _tmp130_;
1102                                 gchar** _tmp131_;
1103                                 gint _tmp131__length1;
1104                                 GeeArrayList* _tmp132_;
1105                                 gint _tmp133_;
1106                                 gpointer _tmp134_ = NULL;
1107                                 gchar* _tmp135_;
1108                                 gchar** _tmp136_;
1109                                 gint _tmp136__length1;
1110                                 gchar** _tmp137_;
1111                                 gint _tmp137__length1;
1112                                 gint _tmp138_;
1113                                 const gchar* _tmp139_;
1114                                 _tmp128_ = _tmp127_;
1115                                 if (!_tmp128_) {
1116                                         gint _tmp129_;
1117                                         _tmp129_ = i;
1118                                         i = _tmp129_ + 1;
1119                                 }
1120                                 _tmp127_ = FALSE;
1121                                 _tmp130_ = i;
1122                                 _tmp131_ = to_offer;
1123                                 _tmp131__length1 = to_offer_length1;
1124                                 if (!(_tmp130_ < _tmp131__length1)) {
1125                                         break;
1126                                 }
1127                                 _tmp132_ = recipient;
1128                                 _tmp133_ = i;
1129                                 _tmp134_ = gee_abstract_list_get ((GeeAbstractList*) _tmp132_, _tmp133_);
1130                                 _tmp135_ = (gchar*) _tmp134_;
1131                                 _tmp136_ = to_offer;
1132                                 _tmp136__length1 = to_offer_length1;
1133                                 _tmp137_ = to_offer;
1134                                 _tmp137__length1 = to_offer_length1;
1135                                 _tmp138_ = i;
1136                                 _tmp139_ = _tmp136_[(_tmp137__length1 - _tmp138_) - 1];
1137                                 _vala_assert (g_strcmp0 (_tmp135_, _tmp139_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
1138                                 _g_free0 (_tmp135_);
1139                         }
1140                 }
1141         }
1142         _tmp140_ = recipient;
1143         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp140_);
1144         _tmp141_ = test_deque;
1145         _tmp142_ = recipient;
1146         _tmp143_ = gee_deque_drain_head (_tmp141_, (GeeCollection*) _tmp142_, 1);
1147         _vala_assert (_tmp143_ == 0, "test_deque.drain_head (recipient, 1) == 0");
1148         _tmp144_ = test_deque;
1149         _tmp145_ = gee_collection_get_size ((GeeCollection*) _tmp144_);
1150         _tmp146_ = _tmp145_;
1151         _vala_assert (_tmp146_ == 0, "test_deque.size == 0");
1152         _tmp147_ = recipient;
1153         _tmp148_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp147_);
1154         _tmp149_ = _tmp148_;
1155         _vala_assert (_tmp149_ == 0, "recipient.size == 0");
1156         _tmp150_ = recipient;
1157         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp150_);
1158         _tmp151_ = test_deque;
1159         _tmp152_ = recipient;
1160         _tmp153_ = gee_deque_drain_head (_tmp151_, (GeeCollection*) _tmp152_, -1);
1161         _vala_assert (_tmp153_ == 0, "test_deque.drain_head (recipient) == 0");
1162         _tmp154_ = test_deque;
1163         _tmp155_ = gee_collection_get_size ((GeeCollection*) _tmp154_);
1164         _tmp156_ = _tmp155_;
1165         _vala_assert (_tmp156_ == 0, "test_deque.size == 0");
1166         _tmp157_ = recipient;
1167         _tmp158_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp157_);
1168         _tmp159_ = _tmp158_;
1169         _vala_assert (_tmp159_ == 0, "recipient.size == 0");
1170         to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
1171         _g_object_unref0 (recipient);
1172         _g_object_unref0 (test_deque);
1173 }
1174
1175
1176 void deque_tests_test_reversed_stack_use (DequeTests* self) {
1177         GeeCollection* _tmp0_;
1178         GeeDeque* _tmp1_;
1179         GeeDeque* test_deque;
1180         GeeArrayList* _tmp2_;
1181         GeeArrayList* recipient;
1182         gchar* _tmp3_;
1183         gchar* _tmp4_;
1184         gchar* _tmp5_;
1185         gchar* _tmp6_;
1186         gchar* _tmp7_;
1187         gchar* _tmp8_;
1188         gchar* _tmp9_;
1189         gchar* _tmp10_;
1190         gchar* _tmp11_;
1191         gchar* _tmp12_;
1192         gchar* _tmp13_;
1193         gchar* _tmp14_;
1194         gchar* _tmp15_;
1195         gchar* _tmp16_;
1196         gchar* _tmp17_;
1197         gchar* _tmp18_;
1198         gchar* _tmp19_;
1199         gchar* _tmp20_;
1200         gchar* _tmp21_;
1201         gchar* _tmp22_;
1202         gchar* _tmp23_;
1203         gchar* _tmp24_;
1204         gchar* _tmp25_;
1205         gchar* _tmp26_;
1206         gchar* _tmp27_;
1207         gchar* _tmp28_;
1208         gchar* _tmp29_;
1209         gchar* _tmp30_;
1210         gchar* _tmp31_;
1211         gchar* _tmp32_;
1212         gchar* _tmp33_;
1213         gchar* _tmp34_;
1214         gchar* _tmp35_;
1215         gchar* _tmp36_;
1216         gchar* _tmp37_;
1217         gchar* _tmp38_;
1218         gchar* _tmp39_;
1219         gchar* _tmp40_;
1220         gchar* _tmp41_;
1221         gchar** _tmp42_ = NULL;
1222         gchar** to_offer;
1223         gint to_offer_length1;
1224         gint _to_offer_size_;
1225         GeeDeque* _tmp43_;
1226         GeeDeque* _tmp82_;
1227         gpointer _tmp83_ = NULL;
1228         gchar* _tmp84_;
1229         GeeDeque* _tmp85_;
1230         gpointer _tmp86_ = NULL;
1231         gchar* _tmp87_;
1232         GeeArrayList* _tmp88_;
1233         GeeDeque* _tmp99_;
1234         gint _tmp100_;
1235         gint _tmp101_;
1236         gchar** _tmp102_;
1237         gint _tmp102__length1;
1238         GeeDeque* _tmp103_;
1239         GeeArrayList* _tmp104_;
1240         gint _tmp105_ = 0;
1241         GeeDeque* _tmp106_;
1242         gint _tmp107_;
1243         gint _tmp108_;
1244         gchar** _tmp109_;
1245         gint _tmp109__length1;
1246         GeeArrayList* _tmp110_;
1247         gint _tmp111_;
1248         gint _tmp112_;
1249         GeeArrayList* _tmp113_;
1250         gpointer _tmp114_ = NULL;
1251         gchar* _tmp115_;
1252         gchar** _tmp116_;
1253         gint _tmp116__length1;
1254         gchar** _tmp117_;
1255         gint _tmp117__length1;
1256         const gchar* _tmp118_;
1257         GeeDeque* _tmp119_;
1258         GeeArrayList* _tmp120_;
1259         gint _tmp121_ = 0;
1260         gchar** _tmp122_;
1261         gint _tmp122__length1;
1262         GeeDeque* _tmp123_;
1263         gint _tmp124_;
1264         gint _tmp125_;
1265         GeeArrayList* _tmp126_;
1266         gint _tmp127_;
1267         gint _tmp128_;
1268         gchar** _tmp129_;
1269         gint _tmp129__length1;
1270         GeeArrayList* _tmp143_;
1271         GeeDeque* _tmp144_;
1272         GeeArrayList* _tmp145_;
1273         gint _tmp146_ = 0;
1274         GeeDeque* _tmp147_;
1275         gint _tmp148_;
1276         gint _tmp149_;
1277         GeeArrayList* _tmp150_;
1278         gint _tmp151_;
1279         gint _tmp152_;
1280         GeeArrayList* _tmp153_;
1281         GeeDeque* _tmp154_;
1282         GeeArrayList* _tmp155_;
1283         gint _tmp156_ = 0;
1284         GeeDeque* _tmp157_;
1285         gint _tmp158_;
1286         gint _tmp159_;
1287         GeeArrayList* _tmp160_;
1288         gint _tmp161_;
1289         gint _tmp162_;
1290         g_return_if_fail (self != NULL);
1291         _tmp0_ = ((CollectionTests*) self)->test_collection;
1292         _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
1293         test_deque = _tmp1_;
1294         _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
1295         recipient = _tmp2_;
1296         _tmp3_ = g_strdup ("one");
1297         _tmp4_ = g_strdup ("two");
1298         _tmp5_ = g_strdup ("three");
1299         _tmp6_ = g_strdup ("four");
1300         _tmp7_ = g_strdup ("five");
1301         _tmp8_ = g_strdup ("six");
1302         _tmp9_ = g_strdup ("seven");
1303         _tmp10_ = g_strdup ("\neight");
1304         _tmp11_ = g_strdup ("nine");
1305         _tmp12_ = g_strdup ("ten");
1306         _tmp13_ = g_strdup ("eleven");
1307         _tmp14_ = g_strdup ("twelve");
1308         _tmp15_ = g_strdup ("thirteen");
1309         _tmp16_ = g_strdup ("fourteen\n");
1310         _tmp17_ = g_strdup ("fifteen");
1311         _tmp18_ = g_strdup ("sixteen");
1312         _tmp19_ = g_strdup ("seventeen");
1313         _tmp20_ = g_strdup ("eighteen");
1314         _tmp21_ = g_strdup ("nineteen\n");
1315         _tmp22_ = g_strdup ("twenty");
1316         _tmp23_ = g_strdup ("twenty one");
1317         _tmp24_ = g_strdup ("twenty two");
1318         _tmp25_ = g_strdup ("twenty three");
1319         _tmp26_ = g_strdup ("twenty four");
1320         _tmp27_ = g_strdup ("twenty five");
1321         _tmp28_ = g_strdup ("twenty six");
1322         _tmp29_ = g_strdup ("twenty seven");
1323         _tmp30_ = g_strdup ("twenty eight");
1324         _tmp31_ = g_strdup ("twenty nine");
1325         _tmp32_ = g_strdup ("thirty");
1326         _tmp33_ = g_strdup ("thirty one");
1327         _tmp34_ = g_strdup ("thirty two");
1328         _tmp35_ = g_strdup ("thirty four");
1329         _tmp36_ = g_strdup ("thirty five");
1330         _tmp37_ = g_strdup ("thirty six");
1331         _tmp38_ = g_strdup ("thirty seven");
1332         _tmp39_ = g_strdup ("thirty eight");
1333         _tmp40_ = g_strdup ("thirty nine");
1334         _tmp41_ = g_strdup ("fourty");
1335         _tmp42_ = g_new0 (gchar*, 39 + 1);
1336         _tmp42_[0] = _tmp3_;
1337         _tmp42_[1] = _tmp4_;
1338         _tmp42_[2] = _tmp5_;
1339         _tmp42_[3] = _tmp6_;
1340         _tmp42_[4] = _tmp7_;
1341         _tmp42_[5] = _tmp8_;
1342         _tmp42_[6] = _tmp9_;
1343         _tmp42_[7] = _tmp10_;
1344         _tmp42_[8] = _tmp11_;
1345         _tmp42_[9] = _tmp12_;
1346         _tmp42_[10] = _tmp13_;
1347         _tmp42_[11] = _tmp14_;
1348         _tmp42_[12] = _tmp15_;
1349         _tmp42_[13] = _tmp16_;
1350         _tmp42_[14] = _tmp17_;
1351         _tmp42_[15] = _tmp18_;
1352         _tmp42_[16] = _tmp19_;
1353         _tmp42_[17] = _tmp20_;
1354         _tmp42_[18] = _tmp21_;
1355         _tmp42_[19] = _tmp22_;
1356         _tmp42_[20] = _tmp23_;
1357         _tmp42_[21] = _tmp24_;
1358         _tmp42_[22] = _tmp25_;
1359         _tmp42_[23] = _tmp26_;
1360         _tmp42_[24] = _tmp27_;
1361         _tmp42_[25] = _tmp28_;
1362         _tmp42_[26] = _tmp29_;
1363         _tmp42_[27] = _tmp30_;
1364         _tmp42_[28] = _tmp31_;
1365         _tmp42_[29] = _tmp32_;
1366         _tmp42_[30] = _tmp33_;
1367         _tmp42_[31] = _tmp34_;
1368         _tmp42_[32] = _tmp35_;
1369         _tmp42_[33] = _tmp36_;
1370         _tmp42_[34] = _tmp37_;
1371         _tmp42_[35] = _tmp38_;
1372         _tmp42_[36] = _tmp39_;
1373         _tmp42_[37] = _tmp40_;
1374         _tmp42_[38] = _tmp41_;
1375         to_offer = _tmp42_;
1376         to_offer_length1 = 39;
1377         _to_offer_size_ = to_offer_length1;
1378         _tmp43_ = test_deque;
1379         _vala_assert (_tmp43_ != NULL, "test_deque != null");
1380         {
1381                 gint i;
1382                 i = 0;
1383                 {
1384                         gboolean _tmp44_;
1385                         _tmp44_ = TRUE;
1386                         while (TRUE) {
1387                                 gboolean _tmp45_;
1388                                 gint _tmp47_;
1389                                 gchar** _tmp48_;
1390                                 gint _tmp48__length1;
1391                                 GeeDeque* _tmp49_;
1392                                 gchar** _tmp50_;
1393                                 gint _tmp50__length1;
1394                                 gint _tmp51_;
1395                                 const gchar* _tmp52_;
1396                                 gboolean _tmp53_ = FALSE;
1397                                 GeeDeque* _tmp54_;
1398                                 gint _tmp55_;
1399                                 gint _tmp56_;
1400                                 gint _tmp57_;
1401                                 _tmp45_ = _tmp44_;
1402                                 if (!_tmp45_) {
1403                                         gint _tmp46_;
1404                                         _tmp46_ = i;
1405                                         i = _tmp46_ + 1;
1406                                 }
1407                                 _tmp44_ = FALSE;
1408                                 _tmp47_ = i;
1409                                 _tmp48_ = to_offer;
1410                                 _tmp48__length1 = to_offer_length1;
1411                                 if (!(_tmp47_ < _tmp48__length1)) {
1412                                         break;
1413                                 }
1414                                 _tmp49_ = test_deque;
1415                                 _tmp50_ = to_offer;
1416                                 _tmp50__length1 = to_offer_length1;
1417                                 _tmp51_ = i;
1418                                 _tmp52_ = _tmp50_[_tmp51_];
1419                                 _tmp53_ = gee_deque_offer_tail (_tmp49_, _tmp52_);
1420                                 _vala_assert (_tmp53_, "test_deque.offer_tail (to_offer[i])");
1421                                 _tmp54_ = test_deque;
1422                                 _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
1423                                 _tmp56_ = _tmp55_;
1424                                 _tmp57_ = i;
1425                                 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
1426                         }
1427                 }
1428         }
1429         {
1430                 gint i;
1431                 i = 0;
1432                 {
1433                         gboolean _tmp58_;
1434                         _tmp58_ = TRUE;
1435                         while (TRUE) {
1436                                 gboolean _tmp59_;
1437                                 gint _tmp61_;
1438                                 gchar** _tmp62_;
1439                                 gint _tmp62__length1;
1440                                 GeeDeque* _tmp63_;
1441                                 gpointer _tmp64_ = NULL;
1442                                 gchar* _tmp65_;
1443                                 gchar** _tmp66_;
1444                                 gint _tmp66__length1;
1445                                 gchar** _tmp67_;
1446                                 gint _tmp67__length1;
1447                                 gint _tmp68_;
1448                                 const gchar* _tmp69_;
1449                                 GeeDeque* _tmp70_;
1450                                 gpointer _tmp71_ = NULL;
1451                                 gchar* _tmp72_;
1452                                 gchar** _tmp73_;
1453                                 gint _tmp73__length1;
1454                                 gchar** _tmp74_;
1455                                 gint _tmp74__length1;
1456                                 gint _tmp75_;
1457                                 const gchar* _tmp76_;
1458                                 GeeDeque* _tmp77_;
1459                                 gint _tmp78_;
1460                                 gint _tmp79_;
1461                                 gchar** _tmp80_;
1462                                 gint _tmp80__length1;
1463                                 gint _tmp81_;
1464                                 _tmp59_ = _tmp58_;
1465                                 if (!_tmp59_) {
1466                                         gint _tmp60_;
1467                                         _tmp60_ = i;
1468                                         i = _tmp60_ + 1;
1469                                 }
1470                                 _tmp58_ = FALSE;
1471                                 _tmp61_ = i;
1472                                 _tmp62_ = to_offer;
1473                                 _tmp62__length1 = to_offer_length1;
1474                                 if (!(_tmp61_ < _tmp62__length1)) {
1475                                         break;
1476                                 }
1477                                 _tmp63_ = test_deque;
1478                                 _tmp64_ = gee_deque_peek_tail (_tmp63_);
1479                                 _tmp65_ = (gchar*) _tmp64_;
1480                                 _tmp66_ = to_offer;
1481                                 _tmp66__length1 = to_offer_length1;
1482                                 _tmp67_ = to_offer;
1483                                 _tmp67__length1 = to_offer_length1;
1484                                 _tmp68_ = i;
1485                                 _tmp69_ = _tmp66_[(_tmp67__length1 - _tmp68_) - 1];
1486                                 _vala_assert (g_strcmp0 (_tmp65_, _tmp69_) == 0, "test_deque.peek_tail () == to_offer[to_offer.length - i - 1]");
1487                                 _g_free0 (_tmp65_);
1488                                 _tmp70_ = test_deque;
1489                                 _tmp71_ = gee_deque_poll_tail (_tmp70_);
1490                                 _tmp72_ = (gchar*) _tmp71_;
1491                                 _tmp73_ = to_offer;
1492                                 _tmp73__length1 = to_offer_length1;
1493                                 _tmp74_ = to_offer;
1494                                 _tmp74__length1 = to_offer_length1;
1495                                 _tmp75_ = i;
1496                                 _tmp76_ = _tmp73_[(_tmp74__length1 - _tmp75_) - 1];
1497                                 _vala_assert (g_strcmp0 (_tmp72_, _tmp76_) == 0, "test_deque.poll_tail () == to_offer[to_offer.length - i - 1]");
1498                                 _g_free0 (_tmp72_);
1499                                 _tmp77_ = test_deque;
1500                                 _tmp78_ = gee_collection_get_size ((GeeCollection*) _tmp77_);
1501                                 _tmp79_ = _tmp78_;
1502                                 _tmp80_ = to_offer;
1503                                 _tmp80__length1 = to_offer_length1;
1504                                 _tmp81_ = i;
1505                                 _vala_assert (_tmp79_ == ((_tmp80__length1 - _tmp81_) - 1), "test_deque.size == to_offer.length - i - 1");
1506                         }
1507                 }
1508         }
1509         _tmp82_ = test_deque;
1510         _tmp83_ = gee_deque_peek_tail (_tmp82_);
1511         _tmp84_ = (gchar*) _tmp83_;
1512         _vala_assert (_tmp84_ == NULL, "test_deque.peek_tail () == null");
1513         _g_free0 (_tmp84_);
1514         _tmp85_ = test_deque;
1515         _tmp86_ = gee_deque_poll_tail (_tmp85_);
1516         _tmp87_ = (gchar*) _tmp86_;
1517         _vala_assert (_tmp87_ == NULL, "test_deque.poll_tail () == null");
1518         _g_free0 (_tmp87_);
1519         _tmp88_ = recipient;
1520         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp88_);
1521         {
1522                 gint i;
1523                 i = 0;
1524                 {
1525                         gboolean _tmp89_;
1526                         _tmp89_ = TRUE;
1527                         while (TRUE) {
1528                                 gboolean _tmp90_;
1529                                 gint _tmp92_;
1530                                 gchar** _tmp93_;
1531                                 gint _tmp93__length1;
1532                                 GeeDeque* _tmp94_;
1533                                 gchar** _tmp95_;
1534                                 gint _tmp95__length1;
1535                                 gint _tmp96_;
1536                                 const gchar* _tmp97_;
1537                                 gboolean _tmp98_ = FALSE;
1538                                 _tmp90_ = _tmp89_;
1539                                 if (!_tmp90_) {
1540                                         gint _tmp91_;
1541                                         _tmp91_ = i;
1542                                         i = _tmp91_ + 1;
1543                                 }
1544                                 _tmp89_ = FALSE;
1545                                 _tmp92_ = i;
1546                                 _tmp93_ = to_offer;
1547                                 _tmp93__length1 = to_offer_length1;
1548                                 if (!(_tmp92_ < _tmp93__length1)) {
1549                                         break;
1550                                 }
1551                                 _tmp94_ = test_deque;
1552                                 _tmp95_ = to_offer;
1553                                 _tmp95__length1 = to_offer_length1;
1554                                 _tmp96_ = i;
1555                                 _tmp97_ = _tmp95_[_tmp96_];
1556                                 _tmp98_ = gee_deque_offer_tail (_tmp94_, _tmp97_);
1557                                 _vala_assert (_tmp98_, "test_deque.offer_tail (to_offer[i])");
1558                         }
1559                 }
1560         }
1561         _tmp99_ = test_deque;
1562         _tmp100_ = gee_collection_get_size ((GeeCollection*) _tmp99_);
1563         _tmp101_ = _tmp100_;
1564         _tmp102_ = to_offer;
1565         _tmp102__length1 = to_offer_length1;
1566         _vala_assert (_tmp101_ == _tmp102__length1, "test_deque.size == to_offer.length");
1567         _tmp103_ = test_deque;
1568         _tmp104_ = recipient;
1569         _tmp105_ = gee_deque_drain_tail (_tmp103_, (GeeCollection*) _tmp104_, 1);
1570         _vala_assert (_tmp105_ == 1, "test_deque.drain_tail (recipient, 1) == 1");
1571         _tmp106_ = test_deque;
1572         _tmp107_ = gee_collection_get_size ((GeeCollection*) _tmp106_);
1573         _tmp108_ = _tmp107_;
1574         _tmp109_ = to_offer;
1575         _tmp109__length1 = to_offer_length1;
1576         _vala_assert (_tmp108_ == (_tmp109__length1 - 1), "test_deque.size == to_offer.length - 1");
1577         _tmp110_ = recipient;
1578         _tmp111_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp110_);
1579         _tmp112_ = _tmp111_;
1580         _vala_assert (_tmp112_ == 1, "recipient.size == 1");
1581         _tmp113_ = recipient;
1582         _tmp114_ = gee_abstract_list_get ((GeeAbstractList*) _tmp113_, 0);
1583         _tmp115_ = (gchar*) _tmp114_;
1584         _tmp116_ = to_offer;
1585         _tmp116__length1 = to_offer_length1;
1586         _tmp117_ = to_offer;
1587         _tmp117__length1 = to_offer_length1;
1588         _tmp118_ = _tmp116_[_tmp117__length1 - 1];
1589         _vala_assert (g_strcmp0 (_tmp115_, _tmp118_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
1590         _g_free0 (_tmp115_);
1591         _tmp119_ = test_deque;
1592         _tmp120_ = recipient;
1593         _tmp121_ = gee_deque_drain_tail (_tmp119_, (GeeCollection*) _tmp120_, -1);
1594         _tmp122_ = to_offer;
1595         _tmp122__length1 = to_offer_length1;
1596         _vala_assert (_tmp121_ == (_tmp122__length1 - 1), "test_deque.drain_tail (recipient) == to_offer.length - 1");
1597         _tmp123_ = test_deque;
1598         _tmp124_ = gee_collection_get_size ((GeeCollection*) _tmp123_);
1599         _tmp125_ = _tmp124_;
1600         _vala_assert (_tmp125_ == 0, "test_deque.size == 0");
1601         _tmp126_ = recipient;
1602         _tmp127_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp126_);
1603         _tmp128_ = _tmp127_;
1604         _tmp129_ = to_offer;
1605         _tmp129__length1 = to_offer_length1;
1606         _vala_assert (_tmp128_ == _tmp129__length1, "recipient.size == to_offer.length");
1607         {
1608                 gint i;
1609                 i = 1;
1610                 {
1611                         gboolean _tmp130_;
1612                         _tmp130_ = TRUE;
1613                         while (TRUE) {
1614                                 gboolean _tmp131_;
1615                                 gint _tmp133_;
1616                                 gchar** _tmp134_;
1617                                 gint _tmp134__length1;
1618                                 GeeArrayList* _tmp135_;
1619                                 gint _tmp136_;
1620                                 gpointer _tmp137_ = NULL;
1621                                 gchar* _tmp138_;
1622                                 gchar** _tmp139_;
1623                                 gint _tmp139__length1;
1624                                 gchar** _tmp140_;
1625                                 gint _tmp140__length1;
1626                                 gint _tmp141_;
1627                                 const gchar* _tmp142_;
1628                                 _tmp131_ = _tmp130_;
1629                                 if (!_tmp131_) {
1630                                         gint _tmp132_;
1631                                         _tmp132_ = i;
1632                                         i = _tmp132_ + 1;
1633                                 }
1634                                 _tmp130_ = FALSE;
1635                                 _tmp133_ = i;
1636                                 _tmp134_ = to_offer;
1637                                 _tmp134__length1 = to_offer_length1;
1638                                 if (!(_tmp133_ < _tmp134__length1)) {
1639                                         break;
1640                                 }
1641                                 _tmp135_ = recipient;
1642                                 _tmp136_ = i;
1643                                 _tmp137_ = gee_abstract_list_get ((GeeAbstractList*) _tmp135_, _tmp136_);
1644                                 _tmp138_ = (gchar*) _tmp137_;
1645                                 _tmp139_ = to_offer;
1646                                 _tmp139__length1 = to_offer_length1;
1647                                 _tmp140_ = to_offer;
1648                                 _tmp140__length1 = to_offer_length1;
1649                                 _tmp141_ = i;
1650                                 _tmp142_ = _tmp139_[(_tmp140__length1 - _tmp141_) - 1];
1651                                 _vala_assert (g_strcmp0 (_tmp138_, _tmp142_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
1652                                 _g_free0 (_tmp138_);
1653                         }
1654                 }
1655         }
1656         _tmp143_ = recipient;
1657         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp143_);
1658         _tmp144_ = test_deque;
1659         _tmp145_ = recipient;
1660         _tmp146_ = gee_deque_drain_tail (_tmp144_, (GeeCollection*) _tmp145_, 1);
1661         _vala_assert (_tmp146_ == 0, "test_deque.drain_tail (recipient, 1) == 0");
1662         _tmp147_ = test_deque;
1663         _tmp148_ = gee_collection_get_size ((GeeCollection*) _tmp147_);
1664         _tmp149_ = _tmp148_;
1665         _vala_assert (_tmp149_ == 0, "test_deque.size == 0");
1666         _tmp150_ = recipient;
1667         _tmp151_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp150_);
1668         _tmp152_ = _tmp151_;
1669         _vala_assert (_tmp152_ == 0, "recipient.size == 0");
1670         _tmp153_ = recipient;
1671         gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp153_);
1672         _tmp154_ = test_deque;
1673         _tmp155_ = recipient;
1674         _tmp156_ = gee_deque_drain_tail (_tmp154_, (GeeCollection*) _tmp155_, -1);
1675         _vala_assert (_tmp156_ == 0, "test_deque.drain_tail (recipient) == 0");
1676         _tmp157_ = test_deque;
1677         _tmp158_ = gee_collection_get_size ((GeeCollection*) _tmp157_);
1678         _tmp159_ = _tmp158_;
1679         _vala_assert (_tmp159_ == 0, "test_deque.size == 0");
1680         _tmp160_ = recipient;
1681         _tmp161_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp160_);
1682         _tmp162_ = _tmp161_;
1683         _vala_assert (_tmp162_ == 0, "recipient.size == 0");
1684         to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
1685         _g_object_unref0 (recipient);
1686         _g_object_unref0 (test_deque);
1687 }
1688
1689
1690 static void deque_tests_class_init (DequeTestsClass * klass) {
1691         deque_tests_parent_class = g_type_class_peek_parent (klass);
1692 }
1693
1694
1695 static void deque_tests_instance_init (DequeTests * self) {
1696 }
1697
1698
1699 GType deque_tests_get_type (void) {
1700         static volatile gsize deque_tests_type_id__volatile = 0;
1701         if (g_once_init_enter (&deque_tests_type_id__volatile)) {
1702                 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 };
1703                 GType deque_tests_type_id;
1704                 deque_tests_type_id = g_type_register_static (TYPE_QUEUE_TESTS, "DequeTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
1705                 g_once_init_leave (&deque_tests_type_id__volatile, deque_tests_type_id);
1706         }
1707         return deque_tests_type_id__volatile;
1708 }
1709
1710
1711 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1712         if ((array != NULL) && (destroy_func != NULL)) {
1713                 int i;
1714                 for (i = 0; i < array_length; i = i + 1) {
1715                         if (((gpointer*) array)[i] != NULL) {
1716                                 destroy_func (((gpointer*) array)[i]);
1717                         }
1718                 }
1719         }
1720 }
1721
1722
1723 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1724         _vala_array_destroy (array, array_length, destroy_func);
1725         g_free (array);
1726 }
1727
1728
1729