summaryrefslogtreecommitdiff
path: root/tests/testbidirlist.c
blob: 7e9ba9ee482d11a836cb17b99c877001c9f12cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
/* testbidirlist.c generated by valac 0.18.0, the Vala compiler
 * generated from testbidirlist.vala, do not modify */

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

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

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

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


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

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

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

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

#define TYPE_LIST_TESTS (list_tests_get_type ())
#define LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIST_TESTS, ListTests))
#define LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIST_TESTS, ListTestsClass))
#define IS_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIST_TESTS))
#define IS_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIST_TESTS))
#define LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIST_TESTS, ListTestsClass))

typedef struct _ListTests ListTests;
typedef struct _ListTestsClass ListTestsClass;
typedef struct _ListTestsPrivate ListTestsPrivate;

#define TYPE_BIDIR_LIST_TESTS (bidir_list_tests_get_type ())
#define BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTests))
#define BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
#define IS_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_LIST_TESTS))
#define IS_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_LIST_TESTS))
#define BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))

typedef struct _BidirListTests BidirListTests;
typedef struct _BidirListTestsClass BidirListTestsClass;
typedef struct _BidirListTestsPrivate BidirListTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GeeTestCase {
	GObject parent_instance;
	GeeTestCasePrivate * priv;
};

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

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

struct _CollectionTestsClass {
	GeeTestCaseClass parent_class;
};

struct _ListTests {
	CollectionTests parent_instance;
	ListTestsPrivate * priv;
};

struct _ListTestsClass {
	CollectionTestsClass parent_class;
	void (*test_duplicates_are_retained) (ListTests* self);
};

struct _BidirListTests {
	ListTests parent_instance;
	BidirListTestsPrivate * priv;
};

struct _BidirListTestsClass {
	ListTestsClass parent_class;
};

typedef void (*GeeTestCaseTestMethod) (void* user_data);

static gpointer bidir_list_tests_parent_class = NULL;

GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType list_tests_get_type (void) G_GNUC_CONST;
GType bidir_list_tests_get_type (void) G_GNUC_CONST;
enum  {
	BIDIR_LIST_TESTS_DUMMY_PROPERTY
};
BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name);
ListTests* list_tests_construct (GType object_type, const gchar* name);
void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void bidir_list_tests_test_bidir_list_iterator (BidirListTests* self);
static void _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method (gpointer self);


static void _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method (gpointer self) {
	bidir_list_tests_test_bidir_list_iterator (self);
}


BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name) {
	BidirListTests * self = NULL;
	const gchar* _tmp0_;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = name;
	self = (BidirListTests*) list_tests_construct (object_type, _tmp0_);
	gee_test_case_add_test ((GeeTestCase*) self, "[List] bi-directional list iterator", _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	return self;
}


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


void bidir_list_tests_test_bidir_list_iterator (BidirListTests* self) {
	GeeCollection* _tmp0_;
	GeeBidirList* _tmp1_;
	GeeBidirList* test_list;
	GeeBidirListIterator* _tmp2_ = NULL;
	GeeBidirListIterator* iterator;
	GeeBidirListIterator* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GeeBidirListIterator* _tmp5_;
	gboolean _tmp6_ = FALSE;
	GeeBidirListIterator* _tmp7_;
	gboolean _tmp8_ = FALSE;
	GeeBidirListIterator* _tmp9_;
	gboolean _tmp10_ = FALSE;
	GeeBidirListIterator* _tmp11_;
	gboolean _tmp12_ = FALSE;
	GeeBidirListIterator* _tmp13_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	GeeBidirListIterator* _tmp18_ = NULL;
	GeeBidirListIterator* _tmp19_;
	gboolean _tmp20_ = FALSE;
	GeeBidirListIterator* _tmp21_;
	gpointer _tmp22_ = NULL;
	gchar* _tmp23_;
	GeeBidirListIterator* _tmp24_;
	gint _tmp25_ = 0;
	GeeBidirListIterator* _tmp26_;
	GeeBidirListIterator* _tmp27_;
	gboolean _tmp28_ = FALSE;
	GeeBidirListIterator* _tmp29_;
	gpointer _tmp30_ = NULL;
	gchar* _tmp31_;
	GeeBidirListIterator* _tmp32_;
	gint _tmp33_ = 0;
	GeeBidirListIterator* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	GeeBidirListIterator* _tmp37_;
	gint _tmp38_ = 0;
	GeeBidirListIterator* _tmp39_;
	gint _tmp40_;
	gint _tmp41_;
	GeeBidirListIterator* _tmp42_;
	gint _tmp43_ = 0;
	GeeBidirListIterator* _tmp44_;
	gint _tmp45_;
	gint _tmp46_;
	GeeBidirListIterator* _tmp47_;
	gint _tmp48_ = 0;
	GeeBidirListIterator* _tmp49_;
	gboolean _tmp50_ = FALSE;
	GeeBidirListIterator* _tmp51_;
	gpointer _tmp52_ = NULL;
	gchar* _tmp53_;
	GeeBidirListIterator* _tmp54_;
	gint _tmp55_ = 0;
	GeeBidirListIterator* _tmp56_;
	GeeBidirListIterator* _tmp57_;
	gboolean _tmp58_ = FALSE;
	GeeBidirListIterator* _tmp59_;
	gboolean _tmp60_ = FALSE;
	GeeBidirListIterator* _tmp61_;
	gboolean _tmp62_ = FALSE;
	GeeBidirListIterator* _tmp63_;
	gpointer _tmp64_ = NULL;
	gchar* _tmp65_;
	GeeBidirListIterator* _tmp66_;
	gint _tmp67_ = 0;
	GeeBidirListIterator* _tmp68_;
	gboolean _tmp69_ = FALSE;
	GeeBidirListIterator* _tmp70_;
	gboolean _tmp71_ = FALSE;
	GeeBidirListIterator* _tmp72_;
	gboolean _tmp73_ = FALSE;
	GeeBidirListIterator* _tmp74_;
	gpointer _tmp75_ = NULL;
	gchar* _tmp76_;
	GeeBidirListIterator* _tmp77_;
	gint _tmp78_ = 0;
	GeeBidirListIterator* _tmp79_;
	gboolean _tmp80_ = FALSE;
	GeeBidirListIterator* _tmp81_;
	gboolean _tmp82_ = FALSE;
	GeeBidirListIterator* _tmp83_;
	gboolean _tmp84_ = FALSE;
	GeeBidirListIterator* _tmp85_;
	gboolean _tmp86_ = FALSE;
	GeeBidirListIterator* _tmp87_;
	gpointer _tmp88_ = NULL;
	gchar* _tmp89_;
	GeeBidirListIterator* _tmp90_;
	gint _tmp91_ = 0;
	GeeBidirListIterator* _tmp92_;
	gboolean _tmp93_ = FALSE;
	GeeBidirListIterator* _tmp94_;
	gboolean _tmp95_ = FALSE;
	GeeBidirListIterator* _tmp96_;
	gpointer _tmp97_ = NULL;
	gchar* _tmp98_;
	GeeBidirListIterator* _tmp99_;
	gint _tmp100_ = 0;
	GeeBidirListIterator* _tmp101_;
	gboolean _tmp102_ = FALSE;
	GeeBidirListIterator* _tmp103_;
	gboolean _tmp104_ = FALSE;
	GeeBidirListIterator* _tmp105_;
	gpointer _tmp106_ = NULL;
	gchar* _tmp107_;
	GeeBidirListIterator* _tmp108_;
	gint _tmp109_ = 0;
	GeeBidirListIterator* _tmp110_;
	gboolean _tmp111_ = FALSE;
	GeeBidirListIterator* _tmp112_;
	gboolean _tmp113_ = FALSE;
	GeeBidirListIterator* _tmp114_;
	gpointer _tmp115_ = NULL;
	gchar* _tmp116_;
	GeeBidirListIterator* _tmp117_;
	gint _tmp118_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_LIST) ? ((GeeBidirList*) _tmp0_) : NULL);
	test_list = _tmp1_;
	_vala_assert (test_list != NULL, "test_list != null");
	_tmp2_ = gee_bidir_list_bidir_list_iterator (test_list);
	iterator = _tmp2_;
	_tmp3_ = iterator;
	_tmp4_ = gee_iterator_has_next ((GeeIterator*) _tmp3_);
	_vala_assert (!_tmp4_, "! iterator.has_next ()");
	_tmp5_ = iterator;
	_tmp6_ = gee_iterator_next ((GeeIterator*) _tmp5_);
	_vala_assert (!_tmp6_, "! iterator.next ()");
	_tmp7_ = iterator;
	_tmp8_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp7_);
	_vala_assert (!_tmp8_, "! iterator.has_previous ()");
	_tmp9_ = iterator;
	_tmp10_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp9_);
	_vala_assert (!_tmp10_, "! iterator.previous ()");
	_tmp11_ = iterator;
	_tmp12_ = gee_bidir_iterator_first ((GeeBidirIterator*) _tmp11_);
	_vala_assert (!_tmp12_, "! iterator.first ()");
	_tmp13_ = iterator;
	_tmp14_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp13_);
	_vala_assert (!_tmp14_, "! iterator.last ()");
	_tmp15_ = gee_collection_add ((GeeCollection*) test_list, "one");
	_vala_assert (_tmp15_, "test_list.add (\"one\")");
	_tmp16_ = gee_collection_add ((GeeCollection*) test_list, "two");
	_vala_assert (_tmp16_, "test_list.add (\"two\")");
	_tmp17_ = gee_collection_add ((GeeCollection*) test_list, "three");
	_vala_assert (_tmp17_, "test_list.add (\"three\")");
	_tmp18_ = gee_bidir_list_bidir_list_iterator (test_list);
	_g_object_unref0 (iterator);
	iterator = _tmp18_;
	_tmp19_ = iterator;
	_tmp20_ = gee_iterator_next ((GeeIterator*) _tmp19_);
	_vala_assert (_tmp20_, "iterator.next()");
	_tmp21_ = iterator;
	_tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
	_tmp23_ = (gchar*) _tmp22_;
	_vala_assert (g_strcmp0 (_tmp23_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp23_);
	_tmp24_ = iterator;
	_tmp25_ = gee_list_iterator_index ((GeeListIterator*) _tmp24_);
	_vala_assert (_tmp25_ == 0, "iterator.index () == 0");
	_tmp26_ = iterator;
	gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new one");
	_tmp27_ = iterator;
	_tmp28_ = gee_iterator_next ((GeeIterator*) _tmp27_);
	_vala_assert (_tmp28_, "iterator.next()");
	_tmp29_ = iterator;
	_tmp30_ = gee_iterator_get ((GeeIterator*) _tmp29_);
	_tmp31_ = (gchar*) _tmp30_;
	_vala_assert (g_strcmp0 (_tmp31_, "two") == 0, "iterator.get () == \"two\"");
	_g_free0 (_tmp31_);
	_tmp32_ = iterator;
	_tmp33_ = gee_list_iterator_index ((GeeListIterator*) _tmp32_);
	_vala_assert (_tmp33_ == 1, "iterator.index () == 1");
	_tmp34_ = iterator;
	gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new two");
	_tmp35_ = gee_collection_get_size ((GeeCollection*) test_list);
	_tmp36_ = _tmp35_;
	_vala_assert (_tmp36_ == 3, "test_list.size == 3");
	_tmp37_ = iterator;
	_tmp38_ = gee_list_iterator_index ((GeeListIterator*) _tmp37_);
	_vala_assert (_tmp38_ == 1, "iterator.index () == 1");
	_tmp39_ = iterator;
	gee_bidir_list_iterator_insert (_tmp39_, "before two");
	_tmp40_ = gee_collection_get_size ((GeeCollection*) test_list);
	_tmp41_ = _tmp40_;
	_vala_assert (_tmp41_ == 4, "test_list.size == 4");
	_tmp42_ = iterator;
	_tmp43_ = gee_list_iterator_index ((GeeListIterator*) _tmp42_);
	_vala_assert (_tmp43_ == 2, "iterator.index () == 2");
	_tmp44_ = iterator;
	gee_list_iterator_add ((GeeListIterator*) _tmp44_, "after two");
	_tmp45_ = gee_collection_get_size ((GeeCollection*) test_list);
	_tmp46_ = _tmp45_;
	_vala_assert (_tmp46_ == 5, "test_list.size == 5");
	_tmp47_ = iterator;
	_tmp48_ = gee_list_iterator_index ((GeeListIterator*) _tmp47_);
	_vala_assert (_tmp48_ == 3, "iterator.index () == 3");
	_tmp49_ = iterator;
	_tmp50_ = gee_iterator_next ((GeeIterator*) _tmp49_);
	_vala_assert (_tmp50_, "iterator.next()");
	_tmp51_ = iterator;
	_tmp52_ = gee_iterator_get ((GeeIterator*) _tmp51_);
	_tmp53_ = (gchar*) _tmp52_;
	_vala_assert (g_strcmp0 (_tmp53_, "three") == 0, "iterator.get () == \"three\"");
	_g_free0 (_tmp53_);
	_tmp54_ = iterator;
	_tmp55_ = gee_list_iterator_index ((GeeListIterator*) _tmp54_);
	_vala_assert (_tmp55_ == 4, "iterator.index () == 4");
	_tmp56_ = iterator;
	gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new three");
	_tmp57_ = iterator;
	_tmp58_ = gee_iterator_has_next ((GeeIterator*) _tmp57_);
	_vala_assert (!_tmp58_, "! iterator.has_next ()");
	_tmp59_ = iterator;
	_tmp60_ = gee_iterator_next ((GeeIterator*) _tmp59_);
	_vala_assert (!_tmp60_, "! iterator.next ()");
	_tmp61_ = iterator;
	_tmp62_ = gee_bidir_iterator_first ((GeeBidirIterator*) _tmp61_);
	_vala_assert (_tmp62_, "iterator.first ()");
	_tmp63_ = iterator;
	_tmp64_ = gee_iterator_get ((GeeIterator*) _tmp63_);
	_tmp65_ = (gchar*) _tmp64_;
	_vala_assert (g_strcmp0 (_tmp65_, "new one") == 0, "iterator.get () == \"new one\"");
	_g_free0 (_tmp65_);
	_tmp66_ = iterator;
	_tmp67_ = gee_list_iterator_index ((GeeListIterator*) _tmp66_);
	_vala_assert (_tmp67_ == 0, "iterator.index () == 0");
	_tmp68_ = iterator;
	_tmp69_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp68_);
	_vala_assert (!_tmp69_, "! iterator.has_previous ()");
	_tmp70_ = iterator;
	_tmp71_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp70_);
	_vala_assert (!_tmp71_, "! iterator.previous ()");
	_tmp72_ = iterator;
	_tmp73_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp72_);
	_vala_assert (_tmp73_, "iterator.last ()");
	_tmp74_ = iterator;
	_tmp75_ = gee_iterator_get ((GeeIterator*) _tmp74_);
	_tmp76_ = (gchar*) _tmp75_;
	_vala_assert (g_strcmp0 (_tmp76_, "new three") == 0, "iterator.get () == \"new three\"");
	_g_free0 (_tmp76_);
	_tmp77_ = iterator;
	_tmp78_ = gee_list_iterator_index ((GeeListIterator*) _tmp77_);
	_vala_assert (_tmp78_ == 4, "iterator.index () == 4");
	_tmp79_ = iterator;
	_tmp80_ = gee_iterator_has_next ((GeeIterator*) _tmp79_);
	_vala_assert (!_tmp80_, "! iterator.has_next ()");
	_tmp81_ = iterator;
	_tmp82_ = gee_iterator_next ((GeeIterator*) _tmp81_);
	_vala_assert (!_tmp82_, "! iterator.next ()");
	_tmp83_ = iterator;
	_tmp84_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp83_);
	_vala_assert (_tmp84_, "iterator.has_previous ()");
	_tmp85_ = iterator;
	_tmp86_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp85_);
	_vala_assert (_tmp86_, "iterator.previous ()");
	_tmp87_ = iterator;
	_tmp88_ = gee_iterator_get ((GeeIterator*) _tmp87_);
	_tmp89_ = (gchar*) _tmp88_;
	_vala_assert (g_strcmp0 (_tmp89_, "after two") == 0, "iterator.get () == \"after two\"");
	_g_free0 (_tmp89_);
	_tmp90_ = iterator;
	_tmp91_ = gee_list_iterator_index ((GeeListIterator*) _tmp90_);
	_vala_assert (_tmp91_ == 3, "iterator.index () == 3");
	_tmp92_ = iterator;
	_tmp93_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp92_);
	_vala_assert (_tmp93_, "iterator.has_previous ()");
	_tmp94_ = iterator;
	_tmp95_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp94_);
	_vala_assert (_tmp95_, "iterator.previous ()");
	_tmp96_ = iterator;
	_tmp97_ = gee_iterator_get ((GeeIterator*) _tmp96_);
	_tmp98_ = (gchar*) _tmp97_;
	_vala_assert (g_strcmp0 (_tmp98_, "new two") == 0, "iterator.get () == \"new two\"");
	_g_free0 (_tmp98_);
	_tmp99_ = iterator;
	_tmp100_ = gee_list_iterator_index ((GeeListIterator*) _tmp99_);
	_vala_assert (_tmp100_ == 2, "iterator.index () == 2");
	_tmp101_ = iterator;
	_tmp102_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp101_);
	_vala_assert (_tmp102_, "iterator.has_previous ()");
	_tmp103_ = iterator;
	_tmp104_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp103_);
	_vala_assert (_tmp104_, "iterator.previous ()");
	_tmp105_ = iterator;
	_tmp106_ = gee_iterator_get ((GeeIterator*) _tmp105_);
	_tmp107_ = (gchar*) _tmp106_;
	_vala_assert (g_strcmp0 (_tmp107_, "before two") == 0, "iterator.get () == \"before two\"");
	_g_free0 (_tmp107_);
	_tmp108_ = iterator;
	_tmp109_ = gee_list_iterator_index ((GeeListIterator*) _tmp108_);
	_vala_assert (_tmp109_ == 1, "iterator.index () == 1");
	_tmp110_ = iterator;
	_tmp111_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp110_);
	_vala_assert (_tmp111_, "iterator.has_previous ()");
	_tmp112_ = iterator;
	_tmp113_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp112_);
	_vala_assert (_tmp113_, "iterator.previous ()");
	_tmp114_ = iterator;
	_tmp115_ = gee_iterator_get ((GeeIterator*) _tmp114_);
	_tmp116_ = (gchar*) _tmp115_;
	_vala_assert (g_strcmp0 (_tmp116_, "new one") == 0, "iterator.get () == \"new one\"");
	_g_free0 (_tmp116_);
	_tmp117_ = iterator;
	_tmp118_ = gee_list_iterator_index ((GeeListIterator*) _tmp117_);
	_vala_assert (_tmp118_ == 0, "iterator.index () == 0");
	_g_object_unref0 (iterator);
	_g_object_unref0 (test_list);
}


static void bidir_list_tests_class_init (BidirListTestsClass * klass) {
	bidir_list_tests_parent_class = g_type_class_peek_parent (klass);
}


static void bidir_list_tests_instance_init (BidirListTests * self) {
}


GType bidir_list_tests_get_type (void) {
	static volatile gsize bidir_list_tests_type_id__volatile = 0;
	if (g_once_init_enter (&bidir_list_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BidirListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirListTests), 0, (GInstanceInitFunc) bidir_list_tests_instance_init, NULL };
		GType bidir_list_tests_type_id;
		bidir_list_tests_type_id = g_type_register_static (TYPE_LIST_TESTS, "BidirListTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&bidir_list_tests_type_id__volatile, bidir_list_tests_type_id);
	}
	return bidir_list_tests_type_id__volatile;
}