1 /* testdeque.c generated by valac 0.18.0, the Vala compiler
2 * generated from testdeque.vala, do not modify */
6 * Copyright (C) 2009 Didier Villevalois
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.
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.
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
23 * Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
27 #include <glib-object.h>
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))
40 typedef struct _GeeTestCase GeeTestCase;
41 typedef struct _GeeTestCaseClass GeeTestCaseClass;
42 typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
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))
51 typedef struct _CollectionTests CollectionTests;
52 typedef struct _CollectionTestsClass CollectionTestsClass;
53 typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
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))
62 typedef struct _QueueTests QueueTests;
63 typedef struct _QueueTestsClass QueueTestsClass;
64 typedef struct _QueueTestsPrivate QueueTestsPrivate;
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))
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);
81 GObject parent_instance;
82 GeeTestCasePrivate * priv;
85 struct _GeeTestCaseClass {
86 GObjectClass parent_class;
87 void (*set_up) (GeeTestCase* self);
88 void (*tear_down) (GeeTestCase* self);
91 struct _CollectionTests {
92 GeeTestCase parent_instance;
93 CollectionTestsPrivate * priv;
94 GeeCollection* test_collection;
97 struct _CollectionTestsClass {
98 GeeTestCaseClass parent_class;
102 CollectionTests parent_instance;
103 QueueTestsPrivate * priv;
106 struct _QueueTestsClass {
107 CollectionTestsClass parent_class;
111 QueueTests parent_instance;
112 DequeTestsPrivate * priv;
115 struct _DequeTestsClass {
116 QueueTestsClass parent_class;
119 typedef void (*GeeTestCaseTestMethod) (void* user_data);
121 static gpointer deque_tests_parent_class = NULL;
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;
128 DEQUE_TESTS_DUMMY_PROPERTY
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);
143 static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self) {
144 deque_tests_test_queue_use (self);
148 static void _deque_tests_test_stack_use_gee_test_case_test_method (gpointer self) {
149 deque_tests_test_stack_use (self);
153 static void _deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self) {
154 deque_tests_test_reversed_stack_use (self);
158 DequeTests* deque_tests_construct (GType object_type, const gchar* name) {
159 DequeTests * self = NULL;
161 g_return_val_if_fail (name != NULL, NULL);
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);
171 static gpointer _g_object_ref0 (gpointer self) {
172 return self ? g_object_ref (self) : NULL;
176 void deque_tests_test_queue_use (DequeTests* self) {
177 GeeCollection* _tmp0_;
179 GeeDeque* test_deque;
180 GeeArrayList* _tmp2_;
181 GeeArrayList* recipient;
222 gchar** _tmp43_ = NULL;
224 gint to_offer_length1;
225 gint _to_offer_size_;
227 gpointer _tmp81_ = NULL;
230 gpointer _tmp84_ = NULL;
232 GeeArrayList* _tmp86_;
237 gint _tmp100__length1;
239 GeeArrayList* _tmp102_;
245 gint _tmp107__length1;
246 GeeArrayList* _tmp108_;
249 GeeArrayList* _tmp111_;
250 gpointer _tmp112_ = NULL;
253 gint _tmp114__length1;
254 const gchar* _tmp115_;
256 GeeArrayList* _tmp117_;
259 gint _tmp119__length1;
263 GeeArrayList* _tmp123_;
267 gint _tmp126__length1;
268 GeeArrayList* _tmp139_;
270 GeeArrayList* _tmp141_;
275 GeeArrayList* _tmp146_;
278 GeeArrayList* _tmp149_;
280 GeeArrayList* _tmp151_;
285 GeeArrayList* _tmp156_;
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);
292 _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
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);
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_;
376 to_offer_length1 = 39;
377 _to_offer_size_ = to_offer_length1;
388 gint _tmp48__length1;
391 gint _tmp50__length1;
393 const gchar* _tmp52_;
394 gboolean _tmp53_ = FALSE;
408 _tmp48__length1 = to_offer_length1;
409 if (!(_tmp47_ < _tmp48__length1)) {
412 _tmp49_ = test_deque;
414 _tmp50__length1 = to_offer_length1;
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_);
423 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
437 gint _tmp62__length1;
439 gpointer _tmp64_ = NULL;
442 gint _tmp66__length1;
444 const gchar* _tmp68_;
446 gpointer _tmp70_ = NULL;
449 gint _tmp72__length1;
451 const gchar* _tmp74_;
456 gint _tmp78__length1;
467 _tmp62__length1 = to_offer_length1;
468 if (!(_tmp61_ < _tmp62__length1)) {
471 _tmp63_ = test_deque;
472 _tmp64_ = gee_deque_peek_head (_tmp63_);
473 _tmp65_ = (gchar*) _tmp64_;
475 _tmp66__length1 = to_offer_length1;
477 _tmp68_ = _tmp66_[_tmp67_];
478 _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
480 _tmp69_ = test_deque;
481 _tmp70_ = gee_deque_poll_head (_tmp69_);
482 _tmp71_ = (gchar*) _tmp70_;
484 _tmp72__length1 = to_offer_length1;
486 _tmp74_ = _tmp72_[_tmp73_];
487 _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
489 _tmp75_ = test_deque;
490 _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
493 _tmp78__length1 = to_offer_length1;
495 _vala_assert (_tmp77_ == ((_tmp78__length1 - _tmp79_) - 1), "test_deque.size == to_offer.length - i - 1");
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");
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");
510 gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp86_);
521 gint _tmp91__length1;
524 gint _tmp93__length1;
526 const gchar* _tmp95_;
527 gboolean _tmp96_ = FALSE;
537 _tmp91__length1 = to_offer_length1;
538 if (!(_tmp90_ < _tmp91__length1)) {
541 _tmp92_ = test_deque;
543 _tmp93__length1 = to_offer_length1;
545 _tmp95_ = _tmp93_[_tmp94_];
546 _tmp96_ = gee_deque_offer_tail (_tmp92_, _tmp95_);
547 _vala_assert (_tmp96_, "test_deque.offer_tail (to_offer[i])");
551 _tmp97_ = test_deque;
552 _tmp98_ = gee_collection_get_size ((GeeCollection*) _tmp97_);
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_);
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_);
570 _vala_assert (_tmp110_ == 1, "recipient.size == 1");
571 _tmp111_ = recipient;
572 _tmp112_ = gee_abstract_list_get ((GeeAbstractList*) _tmp111_, 0);
573 _tmp113_ = (gchar*) _tmp112_;
575 _tmp114__length1 = to_offer_length1;
576 _tmp115_ = _tmp114_[0];
577 _vala_assert (g_strcmp0 (_tmp113_, _tmp115_) == 0, "recipient.get (0) == to_offer[0]");
579 _tmp116_ = test_deque;
580 _tmp117_ = recipient;
581 _tmp118_ = gee_deque_drain_head (_tmp116_, (GeeCollection*) _tmp117_, -1);
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_);
588 _vala_assert (_tmp122_ == 0, "test_deque.size == 0");
589 _tmp123_ = recipient;
590 _tmp124_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp123_);
593 _tmp126__length1 = to_offer_length1;
594 _vala_assert (_tmp125_ == _tmp126__length1, "recipient.size == to_offer.length");
605 gint _tmp131__length1;
606 GeeArrayList* _tmp132_;
608 gpointer _tmp134_ = NULL;
611 gint _tmp136__length1;
613 const gchar* _tmp138_;
623 _tmp131__length1 = to_offer_length1;
624 if (!(_tmp130_ < _tmp131__length1)) {
627 _tmp132_ = recipient;
629 _tmp134_ = gee_abstract_list_get ((GeeAbstractList*) _tmp132_, _tmp133_);
630 _tmp135_ = (gchar*) _tmp134_;
632 _tmp136__length1 = to_offer_length1;
634 _tmp138_ = _tmp136_[_tmp137_];
635 _vala_assert (g_strcmp0 (_tmp135_, _tmp138_) == 0, "recipient.get (i) == to_offer[i]");
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_);
649 _vala_assert (_tmp145_ == 0, "test_deque.size == 0");
650 _tmp146_ = recipient;
651 _tmp147_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp146_);
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_);
663 _vala_assert (_tmp155_ == 0, "test_deque.size == 0");
664 _tmp156_ = recipient;
665 _tmp157_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp156_);
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);
674 void deque_tests_test_stack_use (DequeTests* self) {
675 GeeCollection* _tmp0_;
677 GeeDeque* test_deque;
678 GeeArrayList* _tmp2_;
679 GeeArrayList* recipient;
719 gchar** _tmp42_ = NULL;
721 gint to_offer_length1;
722 gint _to_offer_size_;
725 gpointer _tmp80_ = NULL;
728 gpointer _tmp83_ = NULL;
730 GeeArrayList* _tmp85_;
735 gint _tmp99__length1;
737 GeeArrayList* _tmp101_;
743 gint _tmp106__length1;
744 GeeArrayList* _tmp107_;
747 GeeArrayList* _tmp110_;
748 gpointer _tmp111_ = NULL;
751 gint _tmp113__length1;
753 gint _tmp114__length1;
754 const gchar* _tmp115_;
756 GeeArrayList* _tmp117_;
759 gint _tmp119__length1;
763 GeeArrayList* _tmp123_;
767 gint _tmp126__length1;
768 GeeArrayList* _tmp140_;
770 GeeArrayList* _tmp142_;
775 GeeArrayList* _tmp147_;
778 GeeArrayList* _tmp150_;
780 GeeArrayList* _tmp152_;
785 GeeArrayList* _tmp157_;
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);
792 _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
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);
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_;
874 to_offer_length1 = 39;
875 _to_offer_size_ = to_offer_length1;
876 _tmp43_ = test_deque;
877 _vala_assert (_tmp43_ != NULL, "test_deque != null");
888 gint _tmp48__length1;
891 gint _tmp50__length1;
893 const gchar* _tmp52_;
894 gboolean _tmp53_ = FALSE;
908 _tmp48__length1 = to_offer_length1;
909 if (!(_tmp47_ < _tmp48__length1)) {
912 _tmp49_ = test_deque;
914 _tmp50__length1 = to_offer_length1;
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_);
923 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
929 gint _tmp58__length1;
932 _tmp58__length1 = to_offer_length1;
933 i = _tmp58__length1 - 1;
941 gpointer _tmp64_ = NULL;
944 gint _tmp66__length1;
946 const gchar* _tmp68_;
948 gpointer _tmp70_ = NULL;
951 gint _tmp72__length1;
953 const gchar* _tmp74_;
966 if (!(_tmp62_ >= 0)) {
969 _tmp63_ = test_deque;
970 _tmp64_ = gee_deque_peek_head (_tmp63_);
971 _tmp65_ = (gchar*) _tmp64_;
973 _tmp66__length1 = to_offer_length1;
975 _tmp68_ = _tmp66_[_tmp67_];
976 _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
978 _tmp69_ = test_deque;
979 _tmp70_ = gee_deque_poll_head (_tmp69_);
980 _tmp71_ = (gchar*) _tmp70_;
982 _tmp72__length1 = to_offer_length1;
984 _tmp74_ = _tmp72_[_tmp73_];
985 _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
987 _tmp75_ = test_deque;
988 _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
991 _vala_assert (_tmp77_ == _tmp78_, "test_deque.size == i");
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");
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");
1005 _tmp85_ = recipient;
1006 gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp85_);
1017 gint _tmp90__length1;
1020 gint _tmp92__length1;
1022 const gchar* _tmp94_;
1023 gboolean _tmp95_ = FALSE;
1033 _tmp90__length1 = to_offer_length1;
1034 if (!(_tmp89_ < _tmp90__length1)) {
1037 _tmp91_ = test_deque;
1039 _tmp92__length1 = to_offer_length1;
1041 _tmp94_ = _tmp92_[_tmp93_];
1042 _tmp95_ = gee_deque_offer_head (_tmp91_, _tmp94_);
1043 _vala_assert (_tmp95_, "test_deque.offer_head (to_offer[i])");
1047 _tmp96_ = test_deque;
1048 _tmp97_ = gee_collection_get_size ((GeeCollection*) _tmp96_);
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");
1103 gint _tmp131__length1;
1104 GeeArrayList* _tmp132_;
1106 gpointer _tmp134_ = NULL;
1109 gint _tmp136__length1;
1111 gint _tmp137__length1;
1113 const gchar* _tmp139_;
1114 _tmp128_ = _tmp127_;
1122 _tmp131_ = to_offer;
1123 _tmp131__length1 = to_offer_length1;
1124 if (!(_tmp130_ < _tmp131__length1)) {
1127 _tmp132_ = recipient;
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;
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_);
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);
1176 void deque_tests_test_reversed_stack_use (DequeTests* self) {
1177 GeeCollection* _tmp0_;
1179 GeeDeque* test_deque;
1180 GeeArrayList* _tmp2_;
1181 GeeArrayList* recipient;
1221 gchar** _tmp42_ = NULL;
1223 gint to_offer_length1;
1224 gint _to_offer_size_;
1227 gpointer _tmp83_ = NULL;
1230 gpointer _tmp86_ = NULL;
1232 GeeArrayList* _tmp88_;
1237 gint _tmp102__length1;
1239 GeeArrayList* _tmp104_;
1245 gint _tmp109__length1;
1246 GeeArrayList* _tmp110_;
1249 GeeArrayList* _tmp113_;
1250 gpointer _tmp114_ = NULL;
1253 gint _tmp116__length1;
1255 gint _tmp117__length1;
1256 const gchar* _tmp118_;
1258 GeeArrayList* _tmp120_;
1261 gint _tmp122__length1;
1265 GeeArrayList* _tmp126_;
1269 gint _tmp129__length1;
1270 GeeArrayList* _tmp143_;
1272 GeeArrayList* _tmp145_;
1277 GeeArrayList* _tmp150_;
1280 GeeArrayList* _tmp153_;
1282 GeeArrayList* _tmp155_;
1287 GeeArrayList* _tmp160_;
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);
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_;
1376 to_offer_length1 = 39;
1377 _to_offer_size_ = to_offer_length1;
1378 _tmp43_ = test_deque;
1379 _vala_assert (_tmp43_ != NULL, "test_deque != null");
1390 gint _tmp48__length1;
1393 gint _tmp50__length1;
1395 const gchar* _tmp52_;
1396 gboolean _tmp53_ = FALSE;
1410 _tmp48__length1 = to_offer_length1;
1411 if (!(_tmp47_ < _tmp48__length1)) {
1414 _tmp49_ = test_deque;
1416 _tmp50__length1 = to_offer_length1;
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_);
1425 _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
1439 gint _tmp62__length1;
1441 gpointer _tmp64_ = NULL;
1444 gint _tmp66__length1;
1446 gint _tmp67__length1;
1448 const gchar* _tmp69_;
1450 gpointer _tmp71_ = NULL;
1453 gint _tmp73__length1;
1455 gint _tmp74__length1;
1457 const gchar* _tmp76_;
1462 gint _tmp80__length1;
1473 _tmp62__length1 = to_offer_length1;
1474 if (!(_tmp61_ < _tmp62__length1)) {
1477 _tmp63_ = test_deque;
1478 _tmp64_ = gee_deque_peek_tail (_tmp63_);
1479 _tmp65_ = (gchar*) _tmp64_;
1481 _tmp66__length1 = to_offer_length1;
1483 _tmp67__length1 = to_offer_length1;
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]");
1488 _tmp70_ = test_deque;
1489 _tmp71_ = gee_deque_poll_tail (_tmp70_);
1490 _tmp72_ = (gchar*) _tmp71_;
1492 _tmp73__length1 = to_offer_length1;
1494 _tmp74__length1 = to_offer_length1;
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]");
1499 _tmp77_ = test_deque;
1500 _tmp78_ = gee_collection_get_size ((GeeCollection*) _tmp77_);
1503 _tmp80__length1 = to_offer_length1;
1505 _vala_assert (_tmp79_ == ((_tmp80__length1 - _tmp81_) - 1), "test_deque.size == to_offer.length - i - 1");
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");
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");
1519 _tmp88_ = recipient;
1520 gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp88_);
1531 gint _tmp93__length1;
1534 gint _tmp95__length1;
1536 const gchar* _tmp97_;
1537 gboolean _tmp98_ = FALSE;
1547 _tmp93__length1 = to_offer_length1;
1548 if (!(_tmp92_ < _tmp93__length1)) {
1551 _tmp94_ = test_deque;
1553 _tmp95__length1 = to_offer_length1;
1555 _tmp97_ = _tmp95_[_tmp96_];
1556 _tmp98_ = gee_deque_offer_tail (_tmp94_, _tmp97_);
1557 _vala_assert (_tmp98_, "test_deque.offer_tail (to_offer[i])");
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");
1617 gint _tmp134__length1;
1618 GeeArrayList* _tmp135_;
1620 gpointer _tmp137_ = NULL;
1623 gint _tmp139__length1;
1625 gint _tmp140__length1;
1627 const gchar* _tmp142_;
1628 _tmp131_ = _tmp130_;
1636 _tmp134_ = to_offer;
1637 _tmp134__length1 = to_offer_length1;
1638 if (!(_tmp133_ < _tmp134__length1)) {
1641 _tmp135_ = recipient;
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;
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_);
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);
1690 static void deque_tests_class_init (DequeTestsClass * klass) {
1691 deque_tests_parent_class = g_type_class_peek_parent (klass);
1695 static void deque_tests_instance_init (DequeTests * self) {
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);
1707 return deque_tests_type_id__volatile;
1711 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1712 if ((array != NULL) && (destroy_func != NULL)) {
1714 for (i = 0; i < array_length; i = i + 1) {
1715 if (((gpointer*) array)[i] != NULL) {
1716 destroy_func (((gpointer*) array)[i]);
1723 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1724 _vala_array_destroy (array, array_length, destroy_func);