summaryrefslogtreecommitdiff
path: root/tests/testqueue.c
blob: 549499b4399615728bd43910da959a385c0a05a3 (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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
/* testqueue.c generated by valac 0.18.0, the Vala compiler
 * generated from testqueue.vala, do not modify */

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

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

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
 */

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

typedef struct _QueueTests QueueTests;
typedef struct _QueueTestsClass QueueTestsClass;
typedef struct _QueueTestsPrivate QueueTestsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

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

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

struct _CollectionTestsClass {
	GeeTestCaseClass parent_class;
};

struct _QueueTests {
	CollectionTests parent_instance;
	QueueTestsPrivate * priv;
};

struct _QueueTestsClass {
	CollectionTestsClass parent_class;
};

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

static gpointer queue_tests_parent_class = NULL;

GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType queue_tests_get_type (void) G_GNUC_CONST;
enum  {
	QUEUE_TESTS_DUMMY_PROPERTY
};
QueueTests* queue_tests_construct (GType object_type, const gchar* name);
CollectionTests* collection_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 queue_tests_test_capacity_bound (QueueTests* self);
static void _queue_tests_test_capacity_bound_gee_test_case_test_method (gpointer self);
void queue_tests_test_one_element_operation (QueueTests* self);
static void _queue_tests_test_one_element_operation_gee_test_case_test_method (gpointer self);
void queue_tests_test_gobject_properties (QueueTests* self);
static void _queue_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);


static void _queue_tests_test_capacity_bound_gee_test_case_test_method (gpointer self) {
	queue_tests_test_capacity_bound (self);
}


static void _queue_tests_test_one_element_operation_gee_test_case_test_method (gpointer self) {
	queue_tests_test_one_element_operation (self);
}


static void _queue_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
	queue_tests_test_gobject_properties (self);
}


QueueTests* queue_tests_construct (GType object_type, const gchar* name) {
	QueueTests * self = NULL;
	const gchar* _tmp0_;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = name;
	self = (QueueTests*) collection_tests_construct (object_type, _tmp0_);
	gee_test_case_add_test ((GeeTestCase*) self, "[Queue] capacity bound", _queue_tests_test_capacity_bound_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[Queue] one element operation", _queue_tests_test_one_element_operation_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[Queue] GObject properties", _queue_tests_test_gobject_properties_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 queue_tests_test_capacity_bound (QueueTests* self) {
	GeeCollection* _tmp0_;
	GeeQueue* _tmp1_;
	GeeQueue* test_queue;
	GeeQueue* _tmp2_;
	GeeQueue* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_QUEUE) ? ((GeeQueue*) _tmp0_) : NULL);
	test_queue = _tmp1_;
	_tmp2_ = test_queue;
	_vala_assert (_tmp2_ != NULL, "test_queue != null");
	_tmp3_ = test_queue;
	_tmp4_ = gee_queue_get_capacity (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == GEE_QUEUE_UNBOUNDED_CAPACITY) {
		GeeQueue* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		GeeQueue* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp6_ = test_queue;
		_tmp7_ = gee_queue_get_remaining_capacity (_tmp6_);
		_tmp8_ = _tmp7_;
		_vala_assert (_tmp8_ == GEE_QUEUE_UNBOUNDED_CAPACITY, "test_queue.remaining_capacity == Gee.Queue.UNBOUNDED_CAPACITY");
		_tmp9_ = test_queue;
		_tmp10_ = gee_queue_get_is_full (_tmp9_);
		_tmp11_ = _tmp10_;
		_vala_assert (!_tmp11_, "! test_queue.is_full");
	} else {
		GeeQueue* _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		GeeQueue* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint capacity;
		GeeQueue* _tmp33_;
		gboolean _tmp34_;
		gboolean _tmp35_;
		GeeQueue* _tmp51_;
		gboolean _tmp52_;
		gboolean _tmp53_;
		_tmp12_ = test_queue;
		_tmp13_ = gee_collection_get_is_empty ((GeeCollection*) _tmp12_);
		_tmp14_ = _tmp13_;
		_vala_assert (_tmp14_, "test_queue.is_empty");
		_tmp15_ = test_queue;
		_tmp16_ = gee_queue_get_capacity (_tmp15_);
		_tmp17_ = _tmp16_;
		capacity = _tmp17_;
		{
			gint i;
			i = 1;
			{
				gboolean _tmp18_;
				_tmp18_ = TRUE;
				while (TRUE) {
					gboolean _tmp19_;
					gint _tmp21_;
					gint _tmp22_;
					GeeQueue* _tmp23_;
					gboolean _tmp24_;
					gboolean _tmp25_;
					GeeQueue* _tmp26_;
					gboolean _tmp27_ = FALSE;
					GeeQueue* _tmp28_;
					gint _tmp29_;
					gint _tmp30_;
					gint _tmp31_;
					gint _tmp32_;
					_tmp19_ = _tmp18_;
					if (!_tmp19_) {
						gint _tmp20_;
						_tmp20_ = i;
						i = _tmp20_ + 1;
					}
					_tmp18_ = FALSE;
					_tmp21_ = i;
					_tmp22_ = capacity;
					if (!(_tmp21_ <= _tmp22_)) {
						break;
					}
					_tmp23_ = test_queue;
					_tmp24_ = gee_queue_get_is_full (_tmp23_);
					_tmp25_ = _tmp24_;
					_vala_assert (!_tmp25_, "! test_queue.is_full");
					_tmp26_ = test_queue;
					_tmp27_ = gee_queue_offer (_tmp26_, "one");
					_vala_assert (_tmp27_, "test_queue.offer (\"one\")");
					_tmp28_ = test_queue;
					_tmp29_ = gee_queue_get_remaining_capacity (_tmp28_);
					_tmp30_ = _tmp29_;
					_tmp31_ = capacity;
					_tmp32_ = i;
					_vala_assert (_tmp30_ == (_tmp31_ - _tmp32_), "test_queue.remaining_capacity == capacity - i");
				}
			}
		}
		_tmp33_ = test_queue;
		_tmp34_ = gee_queue_get_is_full (_tmp33_);
		_tmp35_ = _tmp34_;
		_vala_assert (_tmp35_, "test_queue.is_full");
		{
			gint i;
			i = 1;
			{
				gboolean _tmp36_;
				_tmp36_ = TRUE;
				while (TRUE) {
					gboolean _tmp37_;
					gint _tmp39_;
					gint _tmp40_;
					GeeQueue* _tmp41_;
					gpointer _tmp42_ = NULL;
					gchar* _tmp43_;
					GeeQueue* _tmp44_;
					gboolean _tmp45_;
					gboolean _tmp46_;
					GeeQueue* _tmp47_;
					gint _tmp48_;
					gint _tmp49_;
					gint _tmp50_;
					_tmp37_ = _tmp36_;
					if (!_tmp37_) {
						gint _tmp38_;
						_tmp38_ = i;
						i = _tmp38_ + 1;
					}
					_tmp36_ = FALSE;
					_tmp39_ = i;
					_tmp40_ = capacity;
					if (!(_tmp39_ <= _tmp40_)) {
						break;
					}
					_tmp41_ = test_queue;
					_tmp42_ = gee_queue_poll (_tmp41_);
					_tmp43_ = (gchar*) _tmp42_;
					_vala_assert (g_strcmp0 (_tmp43_, "one") == 0, "test_queue.poll () == \"one\"");
					_g_free0 (_tmp43_);
					_tmp44_ = test_queue;
					_tmp45_ = gee_queue_get_is_full (_tmp44_);
					_tmp46_ = _tmp45_;
					_vala_assert (!_tmp46_, "! test_queue.is_full");
					_tmp47_ = test_queue;
					_tmp48_ = gee_queue_get_remaining_capacity (_tmp47_);
					_tmp49_ = _tmp48_;
					_tmp50_ = i;
					_vala_assert (_tmp49_ == _tmp50_, "test_queue.remaining_capacity == i");
				}
			}
		}
		_tmp51_ = test_queue;
		_tmp52_ = gee_collection_get_is_empty ((GeeCollection*) _tmp51_);
		_tmp53_ = _tmp52_;
		_vala_assert (_tmp53_, "test_queue.is_empty");
	}
	_g_object_unref0 (test_queue);
}


void queue_tests_test_one_element_operation (QueueTests* self) {
	GeeCollection* _tmp0_;
	GeeQueue* _tmp1_;
	GeeQueue* test_queue;
	GeeArrayList* _tmp2_;
	GeeArrayList* recipient;
	gboolean _tmp3_ = FALSE;
	gpointer _tmp4_ = NULL;
	gchar* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gpointer _tmp10_ = NULL;
	gchar* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	gpointer _tmp16_ = NULL;
	gchar* _tmp17_;
	gpointer _tmp18_ = NULL;
	gchar* _tmp19_;
	gboolean _tmp20_ = FALSE;
	gint _tmp21_ = 0;
	gint _tmp22_;
	gint _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	gpointer _tmp28_ = NULL;
	gchar* _tmp29_;
	gint _tmp30_ = 0;
	gint _tmp31_;
	gint _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	gboolean _tmp37_ = FALSE;
	gint _tmp38_ = 0;
	gint _tmp39_;
	gint _tmp40_;
	gboolean _tmp41_;
	gboolean _tmp42_;
	gint _tmp43_;
	gint _tmp44_;
	gpointer _tmp45_ = NULL;
	gchar* _tmp46_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_QUEUE) ? ((GeeQueue*) _tmp0_) : NULL);
	test_queue = _tmp1_;
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
	recipient = _tmp2_;
	_vala_assert (test_queue != NULL, "test_queue != null");
	_tmp3_ = gee_queue_offer (test_queue, "one");
	_vala_assert (_tmp3_, "test_queue.offer (\"one\")");
	_tmp4_ = gee_queue_peek (test_queue);
	_tmp5_ = (gchar*) _tmp4_;
	_vala_assert (g_strcmp0 (_tmp5_, "one") == 0, "test_queue.peek () == \"one\"");
	_g_free0 (_tmp5_);
	_tmp6_ = gee_collection_get_size ((GeeCollection*) test_queue);
	_tmp7_ = _tmp6_;
	_vala_assert (_tmp7_ == 1, "test_queue.size == 1");
	_tmp8_ = gee_collection_get_is_empty ((GeeCollection*) test_queue);
	_tmp9_ = _tmp8_;
	_vala_assert (!_tmp9_, "! test_queue.is_empty");
	_tmp10_ = gee_queue_poll (test_queue);
	_tmp11_ = (gchar*) _tmp10_;
	_vala_assert (g_strcmp0 (_tmp11_, "one") == 0, "test_queue.poll () == \"one\"");
	_g_free0 (_tmp11_);
	_tmp12_ = gee_collection_get_size ((GeeCollection*) test_queue);
	_tmp13_ = _tmp12_;
	_vala_assert (_tmp13_ == 0, "test_queue.size == 0");
	_tmp14_ = gee_collection_get_is_empty ((GeeCollection*) test_queue);
	_tmp15_ = _tmp14_;
	_vala_assert (_tmp15_, "test_queue.is_empty");
	_tmp16_ = gee_queue_peek (test_queue);
	_tmp17_ = (gchar*) _tmp16_;
	_vala_assert (_tmp17_ == NULL, "test_queue.peek () == null");
	_g_free0 (_tmp17_);
	_tmp18_ = gee_queue_poll (test_queue);
	_tmp19_ = (gchar*) _tmp18_;
	_vala_assert (_tmp19_ == NULL, "test_queue.poll () == null");
	_g_free0 (_tmp19_);
	gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
	_tmp20_ = gee_queue_offer (test_queue, "one");
	_vala_assert (_tmp20_, "test_queue.offer (\"one\")");
	_tmp21_ = gee_queue_drain (test_queue, (GeeCollection*) recipient, 1);
	_vala_assert (_tmp21_ == 1, "test_queue.drain (recipient, 1) == 1");
	_tmp22_ = gee_collection_get_size ((GeeCollection*) test_queue);
	_tmp23_ = _tmp22_;
	_vala_assert (_tmp23_ == 0, "test_queue.size == 0");
	_tmp24_ = gee_collection_get_is_empty ((GeeCollection*) test_queue);
	_tmp25_ = _tmp24_;
	_vala_assert (_tmp25_, "test_queue.is_empty");
	_tmp26_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
	_tmp27_ = _tmp26_;
	_vala_assert (_tmp27_ == 1, "recipient.size == 1");
	_tmp28_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 0);
	_tmp29_ = (gchar*) _tmp28_;
	_vala_assert (g_strcmp0 (_tmp29_, "one") == 0, "recipient.get (0) == \"one\"");
	_g_free0 (_tmp29_);
	gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
	_tmp30_ = gee_queue_drain (test_queue, (GeeCollection*) recipient, 1);
	_vala_assert (_tmp30_ == 0, "test_queue.drain (recipient, 1) == 0");
	_tmp31_ = gee_collection_get_size ((GeeCollection*) test_queue);
	_tmp32_ = _tmp31_;
	_vala_assert (_tmp32_ == 0, "test_queue.size == 0");
	_tmp33_ = gee_collection_get_is_empty ((GeeCollection*) test_queue);
	_tmp34_ = _tmp33_;
	_vala_assert (_tmp34_, "test_queue.is_empty");
	_tmp35_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
	_tmp36_ = _tmp35_;
	_vala_assert (_tmp36_ == 0, "recipient.size == 0");
	gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
	_tmp37_ = gee_queue_offer (test_queue, "one");
	_vala_assert (_tmp37_, "test_queue.offer (\"one\")");
	_tmp38_ = gee_queue_drain (test_queue, (GeeCollection*) recipient, -1);
	_vala_assert (_tmp38_ == 1, "test_queue.drain (recipient) == 1");
	_tmp39_ = gee_collection_get_size ((GeeCollection*) test_queue);
	_tmp40_ = _tmp39_;
	_vala_assert (_tmp40_ == 0, "test_queue.size == 0");
	_tmp41_ = gee_collection_get_is_empty ((GeeCollection*) test_queue);
	_tmp42_ = _tmp41_;
	_vala_assert (_tmp42_, "test_queue.is_empty");
	_tmp43_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
	_tmp44_ = _tmp43_;
	_vala_assert (_tmp44_ == 1, "recipient.size == 1");
	_tmp45_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 0);
	_tmp46_ = (gchar*) _tmp45_;
	_vala_assert (g_strcmp0 (_tmp46_, "one") == 0, "recipient.get (0) == \"one\"");
	_g_free0 (_tmp46_);
	_g_object_unref0 (recipient);
	_g_object_unref0 (test_queue);
}


void queue_tests_test_gobject_properties (QueueTests* self) {
	GeeCollection* _tmp0_;
	GeeQueue* _tmp1_;
	GeeQueue* test_queue;
	GValue value = {0};
	GValue _tmp2_ = {0};
	GValue _tmp3_;
	gint _tmp4_ = 0;
	gint _tmp5_;
	gint _tmp6_;
	GValue _tmp7_ = {0};
	GValue _tmp8_;
	gint _tmp9_ = 0;
	gint _tmp10_;
	gint _tmp11_;
	GValue _tmp12_ = {0};
	GValue _tmp13_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_;
	gboolean _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((CollectionTests*) self)->test_collection;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_QUEUE) ? ((GeeQueue*) _tmp0_) : NULL);
	test_queue = _tmp1_;
	_vala_assert (test_queue != NULL, "test_queue != null");
	g_value_init (&_tmp2_, G_TYPE_INT);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	value = _tmp2_;
	_tmp3_ = value;
	g_object_get_property ((GObject*) test_queue, "capacity", &value);
	_tmp4_ = g_value_get_int (&value);
	_tmp5_ = gee_queue_get_capacity (test_queue);
	_tmp6_ = _tmp5_;
	_vala_assert (_tmp4_ == _tmp6_, "value.get_int () == test_queue.capacity");
	g_value_unset (&value);
	g_value_init (&_tmp7_, G_TYPE_INT);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	value = _tmp7_;
	_tmp8_ = value;
	g_object_get_property ((GObject*) test_queue, "remaining-capacity", &value);
	_tmp9_ = g_value_get_int (&value);
	_tmp10_ = gee_queue_get_remaining_capacity (test_queue);
	_tmp11_ = _tmp10_;
	_vala_assert (_tmp9_ == _tmp11_, "value.get_int () == test_queue.remaining_capacity");
	g_value_unset (&value);
	g_value_init (&_tmp12_, G_TYPE_BOOLEAN);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	value = _tmp12_;
	_tmp13_ = value;
	g_object_get_property ((GObject*) test_queue, "is-full", &value);
	_tmp14_ = g_value_get_boolean (&value);
	_tmp15_ = gee_queue_get_is_full (test_queue);
	_tmp16_ = _tmp15_;
	_vala_assert (_tmp14_ == _tmp16_, "value.get_boolean () == test_queue.is_full");
	g_value_unset (&value);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	_g_object_unref0 (test_queue);
}


static void queue_tests_class_init (QueueTestsClass * klass) {
	queue_tests_parent_class = g_type_class_peek_parent (klass);
}


static void queue_tests_instance_init (QueueTests * self) {
}


GType queue_tests_get_type (void) {
	static volatile gsize queue_tests_type_id__volatile = 0;
	if (g_once_init_enter (&queue_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (QueueTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) queue_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (QueueTests), 0, (GInstanceInitFunc) queue_tests_instance_init, NULL };
		GType queue_tests_type_id;
		queue_tests_type_id = g_type_register_static (TYPE_COLLECTION_TESTS, "QueueTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&queue_tests_type_id__volatile, queue_tests_type_id);
	}
	return queue_tests_type_id__volatile;
}