Update Changelog
[profile/ivi/libgee.git] / tests / testpriorityqueue.c
1 /* testpriorityqueue.c generated by valac 0.18.0, the Vala compiler
2  * generated from testpriorityqueue.vala, do not modify */
3
4 /* testpriorityqueue.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  * Authors:
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_PRIORITY_QUEUE_TESTS (priority_queue_tests_get_type ())
67 #define PRIORITY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PRIORITY_QUEUE_TESTS, PriorityQueueTests))
68 #define PRIORITY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PRIORITY_QUEUE_TESTS, PriorityQueueTestsClass))
69 #define IS_PRIORITY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PRIORITY_QUEUE_TESTS))
70 #define IS_PRIORITY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PRIORITY_QUEUE_TESTS))
71 #define PRIORITY_QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PRIORITY_QUEUE_TESTS, PriorityQueueTestsClass))
72
73 typedef struct _PriorityQueueTests PriorityQueueTests;
74 typedef struct _PriorityQueueTestsClass PriorityQueueTestsClass;
75 typedef struct _PriorityQueueTestsPrivate PriorityQueueTestsPrivate;
76 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
77 #define _g_free0(var) (var = (g_free (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 _PriorityQueueTests {
111         QueueTests parent_instance;
112         PriorityQueueTestsPrivate * priv;
113 };
114
115 struct _PriorityQueueTestsClass {
116         QueueTestsClass parent_class;
117 };
118
119 typedef void (*GeeTestCaseTestMethod) (void* user_data);
120
121 static gpointer priority_queue_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 priority_queue_tests_get_type (void) G_GNUC_CONST;
127 enum  {
128         PRIORITY_QUEUE_TESTS_DUMMY_PROPERTY
129 };
130 PriorityQueueTests* priority_queue_tests_new (void);
131 PriorityQueueTests* priority_queue_tests_construct (GType object_type);
132 QueueTests* queue_tests_construct (GType object_type, const gchar* name);
133 void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
134 static void priority_queue_tests_test_poll_gives_minimum (PriorityQueueTests* self);
135 static void _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method (gpointer self);
136 static void priority_queue_tests_real_set_up (GeeTestCase* base);
137 static void priority_queue_tests_real_tear_down (GeeTestCase* base);
138
139
140 static void _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method (gpointer self) {
141         priority_queue_tests_test_poll_gives_minimum (self);
142 }
143
144
145 PriorityQueueTests* priority_queue_tests_construct (GType object_type) {
146         PriorityQueueTests * self = NULL;
147         self = (PriorityQueueTests*) queue_tests_construct (object_type, "PriorityQueue");
148         gee_test_case_add_test ((GeeTestCase*) self, "[PriorityQueue] poll gives minimum", _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method, g_object_ref (self), g_object_unref);
149         return self;
150 }
151
152
153 PriorityQueueTests* priority_queue_tests_new (void) {
154         return priority_queue_tests_construct (TYPE_PRIORITY_QUEUE_TESTS);
155 }
156
157
158 static void priority_queue_tests_real_set_up (GeeTestCase* base) {
159         PriorityQueueTests * self;
160         GeePriorityQueue* _tmp0_;
161         self = (PriorityQueueTests*) base;
162         _tmp0_ = gee_priority_queue_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
163         _g_object_unref0 (((CollectionTests*) self)->test_collection);
164         ((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
165 }
166
167
168 static void priority_queue_tests_real_tear_down (GeeTestCase* base) {
169         PriorityQueueTests * self;
170         self = (PriorityQueueTests*) base;
171         _g_object_unref0 (((CollectionTests*) self)->test_collection);
172         ((CollectionTests*) self)->test_collection = NULL;
173 }
174
175
176 static gpointer _g_object_ref0 (gpointer self) {
177         return self ? g_object_ref (self) : NULL;
178 }
179
180
181 static void priority_queue_tests_test_poll_gives_minimum (PriorityQueueTests* self) {
182         GeeCollection* _tmp0_;
183         GeeQueue* _tmp1_;
184         GeeQueue* test_queue;
185         gboolean _tmp2_ = FALSE;
186         gboolean _tmp3_ = FALSE;
187         gpointer _tmp4_ = NULL;
188         gchar* _tmp5_;
189         gboolean _tmp6_ = FALSE;
190         gpointer _tmp7_ = NULL;
191         gchar* _tmp8_;
192         gpointer _tmp9_ = NULL;
193         gchar* _tmp10_;
194         gboolean _tmp11_ = FALSE;
195         gboolean _tmp12_ = FALSE;
196         gboolean _tmp13_ = FALSE;
197         gboolean _tmp14_ = FALSE;
198         gboolean _tmp15_ = FALSE;
199         gboolean _tmp16_ = FALSE;
200         gboolean _tmp17_ = FALSE;
201         gboolean _tmp18_ = FALSE;
202         gboolean _tmp19_ = FALSE;
203         gboolean _tmp20_ = FALSE;
204         gboolean _tmp21_ = FALSE;
205         gboolean _tmp22_ = FALSE;
206         gpointer _tmp23_ = NULL;
207         gchar* _tmp24_;
208         gpointer _tmp25_ = NULL;
209         gchar* _tmp26_;
210         gpointer _tmp27_ = NULL;
211         gchar* _tmp28_;
212         gpointer _tmp29_ = NULL;
213         gchar* _tmp30_;
214         gpointer _tmp31_ = NULL;
215         gchar* _tmp32_;
216         gpointer _tmp33_ = NULL;
217         gchar* _tmp34_;
218         gpointer _tmp35_ = NULL;
219         gchar* _tmp36_;
220         gpointer _tmp37_ = NULL;
221         gchar* _tmp38_;
222         gpointer _tmp39_ = NULL;
223         gchar* _tmp40_;
224         gpointer _tmp41_ = NULL;
225         gchar* _tmp42_;
226         gpointer _tmp43_ = NULL;
227         gchar* _tmp44_;
228         gpointer _tmp45_ = NULL;
229         gchar* _tmp46_;
230         gpointer _tmp47_ = NULL;
231         gchar* _tmp48_;
232         gpointer _tmp49_ = NULL;
233         gchar* _tmp50_;
234         gpointer _tmp51_ = NULL;
235         gchar* _tmp52_;
236         gpointer _tmp53_ = NULL;
237         gchar* _tmp54_;
238         gpointer _tmp55_ = NULL;
239         gchar* _tmp56_;
240         gpointer _tmp57_ = NULL;
241         gchar* _tmp58_;
242         gpointer _tmp59_ = NULL;
243         gchar* _tmp60_;
244         gpointer _tmp61_ = NULL;
245         gchar* _tmp62_;
246         gpointer _tmp63_ = NULL;
247         gchar* _tmp64_;
248         gpointer _tmp65_ = NULL;
249         gchar* _tmp66_;
250         gpointer _tmp67_ = NULL;
251         gchar* _tmp68_;
252         gpointer _tmp69_ = NULL;
253         gchar* _tmp70_;
254         gboolean _tmp71_ = FALSE;
255         gboolean _tmp72_ = FALSE;
256         gpointer _tmp73_ = NULL;
257         gchar* _tmp74_;
258         gpointer _tmp75_ = NULL;
259         gchar* _tmp76_;
260         gpointer _tmp77_ = NULL;
261         gchar* _tmp78_;
262         gpointer _tmp79_ = NULL;
263         gchar* _tmp80_;
264         g_return_if_fail (self != NULL);
265         _tmp0_ = ((CollectionTests*) self)->test_collection;
266         _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_QUEUE) ? ((GeeQueue*) _tmp0_) : NULL);
267         test_queue = _tmp1_;
268         _vala_assert (test_queue != NULL, "test_queue != null");
269         _tmp2_ = gee_queue_offer (test_queue, "one");
270         _vala_assert (_tmp2_, "test_queue.offer (\"one\")");
271         _tmp3_ = gee_queue_offer (test_queue, "two");
272         _vala_assert (_tmp3_, "test_queue.offer (\"two\")");
273         _tmp4_ = gee_queue_peek (test_queue);
274         _tmp5_ = (gchar*) _tmp4_;
275         _vala_assert (g_strcmp0 (_tmp5_, "one") == 0, "test_queue.peek () == \"one\"");
276         _g_free0 (_tmp5_);
277         _tmp6_ = gee_collection_remove ((GeeCollection*) test_queue, "two");
278         _vala_assert (_tmp6_, "test_queue.remove (\"two\")");
279         _tmp7_ = gee_queue_peek (test_queue);
280         _tmp8_ = (gchar*) _tmp7_;
281         _vala_assert (g_strcmp0 (_tmp8_, "one") == 0, "test_queue.peek () == \"one\"");
282         _g_free0 (_tmp8_);
283         _tmp9_ = gee_queue_poll (test_queue);
284         _tmp10_ = (gchar*) _tmp9_;
285         _vala_assert (g_strcmp0 (_tmp10_, "one") == 0, "test_queue.poll () == \"one\"");
286         _g_free0 (_tmp10_);
287         _tmp11_ = gee_queue_offer (test_queue, "one");
288         _vala_assert (_tmp11_, "test_queue.offer (\"one\")");
289         _tmp12_ = gee_queue_offer (test_queue, "two");
290         _vala_assert (_tmp12_, "test_queue.offer (\"two\")");
291         _tmp13_ = gee_queue_offer (test_queue, "three");
292         _vala_assert (_tmp13_, "test_queue.offer (\"three\")");
293         _tmp14_ = gee_queue_offer (test_queue, "four");
294         _vala_assert (_tmp14_, "test_queue.offer (\"four\")");
295         _tmp15_ = gee_queue_offer (test_queue, "five");
296         _vala_assert (_tmp15_, "test_queue.offer (\"five\")");
297         _tmp16_ = gee_queue_offer (test_queue, "six");
298         _vala_assert (_tmp16_, "test_queue.offer (\"six\")");
299         _tmp17_ = gee_queue_offer (test_queue, "seven");
300         _vala_assert (_tmp17_, "test_queue.offer (\"seven\")");
301         _tmp18_ = gee_queue_offer (test_queue, "eight");
302         _vala_assert (_tmp18_, "test_queue.offer (\"eight\")");
303         _tmp19_ = gee_queue_offer (test_queue, "nine");
304         _vala_assert (_tmp19_, "test_queue.offer (\"nine\")");
305         _tmp20_ = gee_queue_offer (test_queue, "ten");
306         _vala_assert (_tmp20_, "test_queue.offer (\"ten\")");
307         _tmp21_ = gee_queue_offer (test_queue, "eleven");
308         _vala_assert (_tmp21_, "test_queue.offer (\"eleven\")");
309         _tmp22_ = gee_queue_offer (test_queue, "twelve");
310         _vala_assert (_tmp22_, "test_queue.offer (\"twelve\")");
311         _tmp23_ = gee_queue_peek (test_queue);
312         _tmp24_ = (gchar*) _tmp23_;
313         _vala_assert (g_strcmp0 (_tmp24_, "eight") == 0, "test_queue.peek () == \"eight\"");
314         _g_free0 (_tmp24_);
315         _tmp25_ = gee_queue_poll (test_queue);
316         _tmp26_ = (gchar*) _tmp25_;
317         _vala_assert (g_strcmp0 (_tmp26_, "eight") == 0, "test_queue.poll () == \"eight\"");
318         _g_free0 (_tmp26_);
319         _tmp27_ = gee_queue_peek (test_queue);
320         _tmp28_ = (gchar*) _tmp27_;
321         _vala_assert (g_strcmp0 (_tmp28_, "eleven") == 0, "test_queue.peek () == \"eleven\"");
322         _g_free0 (_tmp28_);
323         _tmp29_ = gee_queue_poll (test_queue);
324         _tmp30_ = (gchar*) _tmp29_;
325         _vala_assert (g_strcmp0 (_tmp30_, "eleven") == 0, "test_queue.poll () == \"eleven\"");
326         _g_free0 (_tmp30_);
327         _tmp31_ = gee_queue_peek (test_queue);
328         _tmp32_ = (gchar*) _tmp31_;
329         _vala_assert (g_strcmp0 (_tmp32_, "five") == 0, "test_queue.peek () == \"five\"");
330         _g_free0 (_tmp32_);
331         _tmp33_ = gee_queue_poll (test_queue);
332         _tmp34_ = (gchar*) _tmp33_;
333         _vala_assert (g_strcmp0 (_tmp34_, "five") == 0, "test_queue.poll () == \"five\"");
334         _g_free0 (_tmp34_);
335         _tmp35_ = gee_queue_peek (test_queue);
336         _tmp36_ = (gchar*) _tmp35_;
337         _vala_assert (g_strcmp0 (_tmp36_, "four") == 0, "test_queue.peek () == \"four\"");
338         _g_free0 (_tmp36_);
339         _tmp37_ = gee_queue_poll (test_queue);
340         _tmp38_ = (gchar*) _tmp37_;
341         _vala_assert (g_strcmp0 (_tmp38_, "four") == 0, "test_queue.poll () == \"four\"");
342         _g_free0 (_tmp38_);
343         _tmp39_ = gee_queue_peek (test_queue);
344         _tmp40_ = (gchar*) _tmp39_;
345         _vala_assert (g_strcmp0 (_tmp40_, "nine") == 0, "test_queue.peek () == \"nine\"");
346         _g_free0 (_tmp40_);
347         _tmp41_ = gee_queue_poll (test_queue);
348         _tmp42_ = (gchar*) _tmp41_;
349         _vala_assert (g_strcmp0 (_tmp42_, "nine") == 0, "test_queue.poll () == \"nine\"");
350         _g_free0 (_tmp42_);
351         _tmp43_ = gee_queue_peek (test_queue);
352         _tmp44_ = (gchar*) _tmp43_;
353         _vala_assert (g_strcmp0 (_tmp44_, "one") == 0, "test_queue.peek () == \"one\"");
354         _g_free0 (_tmp44_);
355         _tmp45_ = gee_queue_poll (test_queue);
356         _tmp46_ = (gchar*) _tmp45_;
357         _vala_assert (g_strcmp0 (_tmp46_, "one") == 0, "test_queue.poll () == \"one\"");
358         _g_free0 (_tmp46_);
359         _tmp47_ = gee_queue_peek (test_queue);
360         _tmp48_ = (gchar*) _tmp47_;
361         _vala_assert (g_strcmp0 (_tmp48_, "seven") == 0, "test_queue.peek () == \"seven\"");
362         _g_free0 (_tmp48_);
363         _tmp49_ = gee_queue_poll (test_queue);
364         _tmp50_ = (gchar*) _tmp49_;
365         _vala_assert (g_strcmp0 (_tmp50_, "seven") == 0, "test_queue.poll () == \"seven\"");
366         _g_free0 (_tmp50_);
367         _tmp51_ = gee_queue_peek (test_queue);
368         _tmp52_ = (gchar*) _tmp51_;
369         _vala_assert (g_strcmp0 (_tmp52_, "six") == 0, "test_queue.peek () == \"six\"");
370         _g_free0 (_tmp52_);
371         _tmp53_ = gee_queue_poll (test_queue);
372         _tmp54_ = (gchar*) _tmp53_;
373         _vala_assert (g_strcmp0 (_tmp54_, "six") == 0, "test_queue.poll () == \"six\"");
374         _g_free0 (_tmp54_);
375         _tmp55_ = gee_queue_peek (test_queue);
376         _tmp56_ = (gchar*) _tmp55_;
377         _vala_assert (g_strcmp0 (_tmp56_, "ten") == 0, "test_queue.peek () == \"ten\"");
378         _g_free0 (_tmp56_);
379         _tmp57_ = gee_queue_poll (test_queue);
380         _tmp58_ = (gchar*) _tmp57_;
381         _vala_assert (g_strcmp0 (_tmp58_, "ten") == 0, "test_queue.poll () == \"ten\"");
382         _g_free0 (_tmp58_);
383         _tmp59_ = gee_queue_peek (test_queue);
384         _tmp60_ = (gchar*) _tmp59_;
385         _vala_assert (g_strcmp0 (_tmp60_, "three") == 0, "test_queue.peek () == \"three\"");
386         _g_free0 (_tmp60_);
387         _tmp61_ = gee_queue_poll (test_queue);
388         _tmp62_ = (gchar*) _tmp61_;
389         _vala_assert (g_strcmp0 (_tmp62_, "three") == 0, "test_queue.poll () == \"three\"");
390         _g_free0 (_tmp62_);
391         _tmp63_ = gee_queue_peek (test_queue);
392         _tmp64_ = (gchar*) _tmp63_;
393         _vala_assert (g_strcmp0 (_tmp64_, "twelve") == 0, "test_queue.peek () == \"twelve\"");
394         _g_free0 (_tmp64_);
395         _tmp65_ = gee_queue_poll (test_queue);
396         _tmp66_ = (gchar*) _tmp65_;
397         _vala_assert (g_strcmp0 (_tmp66_, "twelve") == 0, "test_queue.poll () == \"twelve\"");
398         _g_free0 (_tmp66_);
399         _tmp67_ = gee_queue_peek (test_queue);
400         _tmp68_ = (gchar*) _tmp67_;
401         _vala_assert (g_strcmp0 (_tmp68_, "two") == 0, "test_queue.peek () == \"two\"");
402         _g_free0 (_tmp68_);
403         _tmp69_ = gee_queue_poll (test_queue);
404         _tmp70_ = (gchar*) _tmp69_;
405         _vala_assert (g_strcmp0 (_tmp70_, "two") == 0, "test_queue.poll () == \"two\"");
406         _g_free0 (_tmp70_);
407         _tmp71_ = gee_queue_offer (test_queue, "2");
408         _vala_assert (_tmp71_, "test_queue.offer (\"2\")");
409         _tmp72_ = gee_queue_offer (test_queue, "1");
410         _vala_assert (_tmp72_, "test_queue.offer (\"1\")");
411         _tmp73_ = gee_queue_peek (test_queue);
412         _tmp74_ = (gchar*) _tmp73_;
413         _vala_assert (g_strcmp0 (_tmp74_, "1") == 0, "test_queue.peek () == \"1\"");
414         _g_free0 (_tmp74_);
415         _tmp75_ = gee_queue_poll (test_queue);
416         _tmp76_ = (gchar*) _tmp75_;
417         _vala_assert (g_strcmp0 (_tmp76_, "1") == 0, "test_queue.poll () == \"1\"");
418         _g_free0 (_tmp76_);
419         _tmp77_ = gee_queue_peek (test_queue);
420         _tmp78_ = (gchar*) _tmp77_;
421         _vala_assert (g_strcmp0 (_tmp78_, "2") == 0, "test_queue.peek () == \"2\"");
422         _g_free0 (_tmp78_);
423         _tmp79_ = gee_queue_poll (test_queue);
424         _tmp80_ = (gchar*) _tmp79_;
425         _vala_assert (g_strcmp0 (_tmp80_, "2") == 0, "test_queue.poll () == \"2\"");
426         _g_free0 (_tmp80_);
427         _g_object_unref0 (test_queue);
428 }
429
430
431 static void priority_queue_tests_class_init (PriorityQueueTestsClass * klass) {
432         priority_queue_tests_parent_class = g_type_class_peek_parent (klass);
433         GEE_TEST_CASE_CLASS (klass)->set_up = priority_queue_tests_real_set_up;
434         GEE_TEST_CASE_CLASS (klass)->tear_down = priority_queue_tests_real_tear_down;
435 }
436
437
438 static void priority_queue_tests_instance_init (PriorityQueueTests * self) {
439 }
440
441
442 GType priority_queue_tests_get_type (void) {
443         static volatile gsize priority_queue_tests_type_id__volatile = 0;
444         if (g_once_init_enter (&priority_queue_tests_type_id__volatile)) {
445                 static const GTypeInfo g_define_type_info = { sizeof (PriorityQueueTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) priority_queue_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PriorityQueueTests), 0, (GInstanceInitFunc) priority_queue_tests_instance_init, NULL };
446                 GType priority_queue_tests_type_id;
447                 priority_queue_tests_type_id = g_type_register_static (TYPE_QUEUE_TESTS, "PriorityQueueTests", &g_define_type_info, 0);
448                 g_once_init_leave (&priority_queue_tests_type_id__volatile, priority_queue_tests_type_id);
449         }
450         return priority_queue_tests_type_id__volatile;
451 }
452
453
454