Update Changelog
[profile/ivi/libgee.git] / tests / testmultimap.c
1 /* testmultimap.c generated by valac 0.18.0, the Vala compiler
2  * generated from testmultimap.vala, do not modify */
3
4 /* testmultimap.vala
5  *
6  * Copyright (C) 2008  Jürg Billeter
7  * Copyright (C) 2009  Didier Villevalois, Julien Peeters
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
22  *
23  * Author:
24  *      Jürg Billeter <j@bitron.ch>
25  *      Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
26  *      Julien Peeters <contact@julienpeeters.fr>
27  */
28
29 #include <glib.h>
30 #include <glib-object.h>
31 #include <gee.h>
32 #include <stdlib.h>
33 #include <string.h>
34
35
36 #define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
37 #define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
38 #define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
39 #define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
40 #define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
41 #define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
42
43 typedef struct _GeeTestCase GeeTestCase;
44 typedef struct _GeeTestCaseClass GeeTestCaseClass;
45 typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
46
47 #define TYPE_MULTI_MAP_TESTS (multi_map_tests_get_type ())
48 #define MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTI_MAP_TESTS, MultiMapTests))
49 #define MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTI_MAP_TESTS, MultiMapTestsClass))
50 #define IS_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTI_MAP_TESTS))
51 #define IS_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTI_MAP_TESTS))
52 #define MULTI_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTI_MAP_TESTS, MultiMapTestsClass))
53
54 typedef struct _MultiMapTests MultiMapTests;
55 typedef struct _MultiMapTestsClass MultiMapTestsClass;
56 typedef struct _MultiMapTestsPrivate MultiMapTestsPrivate;
57 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
58 #define _g_free0(var) (var = (g_free (var), NULL))
59 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
60
61 struct _GeeTestCase {
62         GObject parent_instance;
63         GeeTestCasePrivate * priv;
64 };
65
66 struct _GeeTestCaseClass {
67         GObjectClass parent_class;
68         void (*set_up) (GeeTestCase* self);
69         void (*tear_down) (GeeTestCase* self);
70 };
71
72 struct _MultiMapTests {
73         GeeTestCase parent_instance;
74         MultiMapTestsPrivate * priv;
75         GeeMultiMap* test_multi_map;
76 };
77
78 struct _MultiMapTestsClass {
79         GeeTestCaseClass parent_class;
80 };
81
82 typedef void (*GeeTestCaseTestMethod) (void* user_data);
83
84 static gpointer multi_map_tests_parent_class = NULL;
85
86 GType gee_test_case_get_type (void) G_GNUC_CONST;
87 GType multi_map_tests_get_type (void) G_GNUC_CONST;
88 enum  {
89         MULTI_MAP_TESTS_DUMMY_PROPERTY
90 };
91 MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name);
92 GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
93 void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
94 void multi_map_tests_test_type_correctness (MultiMapTests* self);
95 static void _multi_map_tests_test_type_correctness_gee_test_case_test_method (gpointer self);
96 static void multi_map_tests_test_size (MultiMapTests* self);
97 static void _multi_map_tests_test_size_gee_test_case_test_method (gpointer self);
98 static void multi_map_tests_test_getting_setting (MultiMapTests* self);
99 static void _multi_map_tests_test_getting_setting_gee_test_case_test_method (gpointer self);
100 static void multi_map_tests_test_keys_all_keys_values (MultiMapTests* self);
101 static void _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method (gpointer self);
102 static void multi_map_tests_finalize (GObject* obj);
103
104
105 static void _multi_map_tests_test_type_correctness_gee_test_case_test_method (gpointer self) {
106         multi_map_tests_test_type_correctness (self);
107 }
108
109
110 static void _multi_map_tests_test_size_gee_test_case_test_method (gpointer self) {
111         multi_map_tests_test_size (self);
112 }
113
114
115 static void _multi_map_tests_test_getting_setting_gee_test_case_test_method (gpointer self) {
116         multi_map_tests_test_getting_setting (self);
117 }
118
119
120 static void _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method (gpointer self) {
121         multi_map_tests_test_keys_all_keys_values (self);
122 }
123
124
125 MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name) {
126         MultiMapTests * self = NULL;
127         const gchar* _tmp0_;
128         g_return_val_if_fail (name != NULL, NULL);
129         _tmp0_ = name;
130         self = (MultiMapTests*) gee_test_case_construct (object_type, _tmp0_);
131         gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] type correctness", _multi_map_tests_test_type_correctness_gee_test_case_test_method, g_object_ref (self), g_object_unref);
132         gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] size", _multi_map_tests_test_size_gee_test_case_test_method, g_object_ref (self), g_object_unref);
133         gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] getting and setting", _multi_map_tests_test_getting_setting_gee_test_case_test_method, g_object_ref (self), g_object_unref);
134         gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] keys, all keys and values", _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method, g_object_ref (self), g_object_unref);
135         return self;
136 }
137
138
139 void multi_map_tests_test_type_correctness (MultiMapTests* self) {
140         GeeMultiMap* _tmp0_;
141         GeeMultiMap* _tmp1_;
142         GType _tmp2_;
143         GType _tmp3_;
144         GeeMultiMap* _tmp4_;
145         GType _tmp5_;
146         GType _tmp6_;
147         g_return_if_fail (self != NULL);
148         _tmp0_ = self->test_multi_map;
149         _vala_assert (_tmp0_ != NULL, "test_multi_map != null");
150         _tmp1_ = self->test_multi_map;
151         _tmp2_ = gee_multi_map_get_key_type (_tmp1_);
152         _tmp3_ = _tmp2_;
153         _vala_assert (_tmp3_ == G_TYPE_STRING, "test_multi_map.key_type == typeof (string)");
154         _tmp4_ = self->test_multi_map;
155         _tmp5_ = gee_multi_map_get_value_type (_tmp4_);
156         _tmp6_ = _tmp5_;
157         _vala_assert (_tmp6_ == G_TYPE_STRING, "test_multi_map.value_type == typeof (string)");
158 }
159
160
161 static void multi_map_tests_test_size (MultiMapTests* self) {
162         GeeMultiMap* _tmp0_;
163         GeeMultiMap* _tmp1_;
164         gint _tmp2_;
165         gint _tmp3_;
166         GeeMultiMap* _tmp4_;
167         GeeMultiMap* _tmp5_;
168         gint _tmp6_;
169         gint _tmp7_;
170         GeeMultiMap* _tmp8_;
171         GeeMultiMap* _tmp9_;
172         gint _tmp10_;
173         gint _tmp11_;
174         GeeMultiMap* _tmp12_;
175         GeeMultiMap* _tmp13_;
176         gint _tmp14_;
177         gint _tmp15_;
178         GeeMultiMap* _tmp16_;
179         GeeMultiMap* _tmp17_;
180         GeeMultiMap* _tmp18_;
181         gint _tmp19_;
182         gint _tmp20_;
183         GeeMultiMap* _tmp21_;
184         GeeMultiMap* _tmp22_;
185         gint _tmp23_;
186         gint _tmp24_;
187         GeeMultiMap* _tmp25_;
188         GeeMultiMap* _tmp26_;
189         gint _tmp27_;
190         gint _tmp28_;
191         g_return_if_fail (self != NULL);
192         _tmp0_ = self->test_multi_map;
193         _vala_assert (_tmp0_ != NULL, "test_multi_map != null");
194         _tmp1_ = self->test_multi_map;
195         _tmp2_ = gee_multi_map_get_size (_tmp1_);
196         _tmp3_ = _tmp2_;
197         _vala_assert (_tmp3_ == 0, "test_multi_map.size == 0");
198         _tmp4_ = self->test_multi_map;
199         gee_multi_map_set (_tmp4_, "0", "0");
200         _tmp5_ = self->test_multi_map;
201         _tmp6_ = gee_multi_map_get_size (_tmp5_);
202         _tmp7_ = _tmp6_;
203         _vala_assert (_tmp7_ == 1, "test_multi_map.size == 1");
204         _tmp8_ = self->test_multi_map;
205         gee_multi_map_set (_tmp8_, "0", "1");
206         _tmp9_ = self->test_multi_map;
207         _tmp10_ = gee_multi_map_get_size (_tmp9_);
208         _tmp11_ = _tmp10_;
209         _vala_assert (_tmp11_ == 2, "test_multi_map.size == 2");
210         _tmp12_ = self->test_multi_map;
211         gee_multi_map_remove (_tmp12_, "0", "1");
212         _tmp13_ = self->test_multi_map;
213         _tmp14_ = gee_multi_map_get_size (_tmp13_);
214         _tmp15_ = _tmp14_;
215         _vala_assert (_tmp15_ == 1, "test_multi_map.size == 1");
216         _tmp16_ = self->test_multi_map;
217         gee_multi_map_set (_tmp16_, "0", "1");
218         _tmp17_ = self->test_multi_map;
219         gee_multi_map_remove_all (_tmp17_, "0");
220         _tmp18_ = self->test_multi_map;
221         _tmp19_ = gee_multi_map_get_size (_tmp18_);
222         _tmp20_ = _tmp19_;
223         _vala_assert (_tmp20_ == 0, "test_multi_map.size == 0");
224         _tmp21_ = self->test_multi_map;
225         gee_multi_map_set (_tmp21_, "0", "0");
226         _tmp22_ = self->test_multi_map;
227         _tmp23_ = gee_multi_map_get_size (_tmp22_);
228         _tmp24_ = _tmp23_;
229         _vala_assert (_tmp24_ == 1, "test_multi_map.size == 1");
230         _tmp25_ = self->test_multi_map;
231         gee_multi_map_set (_tmp25_, "1", "1");
232         _tmp26_ = self->test_multi_map;
233         _tmp27_ = gee_multi_map_get_size (_tmp26_);
234         _tmp28_ = _tmp27_;
235         _vala_assert (_tmp28_ == 2, "test_multi_map.size == 2");
236 }
237
238
239 static void multi_map_tests_test_getting_setting (MultiMapTests* self) {
240         GeeMultiMap* _tmp0_;
241         GeeMultiMap* _tmp1_;
242         GeeMultiMap* _tmp2_;
243         gboolean _tmp3_ = FALSE;
244         GeeMultiMap* _tmp4_;
245         GeeCollection* _tmp5_ = NULL;
246         GeeCollection* _tmp6_;
247         gint _tmp7_;
248         gint _tmp8_;
249         GeeMultiMap* _tmp9_;
250         GeeCollection* _tmp10_ = NULL;
251         GeeCollection* _tmp11_;
252         gboolean _tmp12_ = FALSE;
253         GeeMultiMap* _tmp13_;
254         GeeCollection* _tmp14_ = NULL;
255         GeeCollection* _tmp15_;
256         gint _tmp16_;
257         gint _tmp17_;
258         GeeMultiMap* _tmp18_;
259         GeeMultiMap* _tmp19_;
260         GeeCollection* _tmp20_ = NULL;
261         GeeCollection* _tmp21_;
262         gint _tmp22_;
263         gint _tmp23_;
264         GeeMultiMap* _tmp24_;
265         GeeCollection* _tmp25_ = NULL;
266         GeeCollection* _tmp26_;
267         gboolean _tmp27_ = FALSE;
268         GeeMultiMap* _tmp28_;
269         GeeCollection* _tmp29_ = NULL;
270         GeeCollection* _tmp30_;
271         gboolean _tmp31_ = FALSE;
272         GeeMultiMap* _tmp32_;
273         GeeMultiMap* _tmp33_;
274         gboolean _tmp34_ = FALSE;
275         GeeMultiMap* _tmp35_;
276         GeeCollection* _tmp36_ = NULL;
277         GeeCollection* _tmp37_;
278         gint _tmp38_;
279         gint _tmp39_;
280         GeeMultiMap* _tmp40_;
281         GeeCollection* _tmp41_ = NULL;
282         GeeCollection* _tmp42_;
283         gboolean _tmp43_ = FALSE;
284         GeeMultiMap* _tmp44_;
285         GeeCollection* _tmp45_ = NULL;
286         GeeCollection* _tmp46_;
287         gboolean _tmp47_ = FALSE;
288         GeeMultiMap* _tmp48_;
289         GeeCollection* _tmp49_ = NULL;
290         GeeCollection* _tmp50_;
291         gint _tmp51_;
292         gint _tmp52_;
293         GeeMultiMap* _tmp53_;
294         GeeCollection* _tmp54_ = NULL;
295         GeeCollection* _tmp55_;
296         gboolean _tmp56_ = FALSE;
297         GeeMultiMap* _tmp57_;
298         gboolean _tmp58_ = FALSE;
299         GeeMultiMap* _tmp59_;
300         gboolean _tmp60_ = FALSE;
301         GeeMultiMap* _tmp61_;
302         GeeCollection* _tmp62_ = NULL;
303         GeeCollection* _tmp63_;
304         gboolean _tmp64_ = FALSE;
305         GeeMultiMap* _tmp65_;
306         GeeCollection* _tmp66_ = NULL;
307         GeeCollection* _tmp67_;
308         gboolean _tmp68_ = FALSE;
309         GeeMultiMap* _tmp69_;
310         gboolean _tmp70_ = FALSE;
311         GeeMultiMap* _tmp71_;
312         GeeCollection* _tmp72_ = NULL;
313         GeeCollection* _tmp73_;
314         gboolean _tmp74_ = FALSE;
315         GeeMultiMap* _tmp75_;
316         gboolean _tmp76_ = FALSE;
317         GeeMultiMap* _tmp77_;
318         gboolean _tmp78_ = FALSE;
319         GeeMultiMap* _tmp79_;
320         GeeCollection* _tmp80_ = NULL;
321         GeeCollection* _tmp81_;
322         gboolean _tmp82_ = FALSE;
323         GeeMultiMap* _tmp83_;
324         GeeCollection* _tmp84_ = NULL;
325         GeeCollection* _tmp85_;
326         gboolean _tmp86_ = FALSE;
327         GeeMultiMap* _tmp87_;
328         gboolean _tmp88_ = FALSE;
329         GeeMultiMap* _tmp89_;
330         GeeCollection* _tmp90_ = NULL;
331         GeeCollection* _tmp91_;
332         gboolean _tmp92_ = FALSE;
333         GeeMultiMap* _tmp93_;
334         gboolean _tmp94_ = FALSE;
335         GeeMultiMap* _tmp95_;
336         gboolean _tmp96_ = FALSE;
337         GeeMultiMap* _tmp97_;
338         GeeCollection* _tmp98_ = NULL;
339         GeeCollection* _tmp99_;
340         gboolean _tmp100_ = FALSE;
341         GeeMultiMap* _tmp101_;
342         GeeCollection* _tmp102_ = NULL;
343         GeeCollection* _tmp103_;
344         gboolean _tmp104_ = FALSE;
345         GeeMultiMap* _tmp105_;
346         gboolean _tmp106_ = FALSE;
347         GeeMultiMap* _tmp107_;
348         GeeCollection* _tmp108_ = NULL;
349         GeeCollection* _tmp109_;
350         gboolean _tmp110_ = FALSE;
351         GeeMultiMap* _tmp111_;
352         GeeMultiMap* _tmp112_;
353         gboolean _tmp113_ = FALSE;
354         GeeMultiMap* _tmp114_;
355         gboolean _tmp115_ = FALSE;
356         GeeMultiMap* _tmp116_;
357         GeeMultiMap* _tmp117_;
358         GeeMultiMap* _tmp118_;
359         GeeMultiMap* _tmp119_;
360         gint _tmp120_;
361         gint _tmp121_;
362         GeeMultiMap* _tmp122_;
363         gboolean _tmp123_ = FALSE;
364         GeeMultiMap* _tmp124_;
365         gboolean _tmp125_ = FALSE;
366         GeeMultiMap* _tmp126_;
367         GeeCollection* _tmp127_ = NULL;
368         GeeCollection* _tmp128_;
369         gint _tmp129_;
370         gint _tmp130_;
371         GeeMultiMap* _tmp131_;
372         GeeCollection* _tmp132_ = NULL;
373         GeeCollection* _tmp133_;
374         gboolean _tmp134_ = FALSE;
375         GeeMultiMap* _tmp135_;
376         GeeCollection* _tmp136_ = NULL;
377         GeeCollection* _tmp137_;
378         gboolean _tmp138_ = FALSE;
379         GeeMultiMap* _tmp139_;
380         GeeCollection* _tmp140_ = NULL;
381         GeeCollection* _tmp141_;
382         gint _tmp142_;
383         gint _tmp143_;
384         GeeMultiMap* _tmp144_;
385         GeeCollection* _tmp145_ = NULL;
386         GeeCollection* _tmp146_;
387         gboolean _tmp147_ = FALSE;
388         GeeMultiMap* _tmp148_;
389         gboolean _tmp149_ = FALSE;
390         GeeMultiMap* _tmp150_;
391         gboolean _tmp151_ = FALSE;
392         GeeMultiMap* _tmp152_;
393         GeeCollection* _tmp153_ = NULL;
394         GeeCollection* _tmp154_;
395         gboolean _tmp155_ = FALSE;
396         GeeMultiMap* _tmp156_;
397         GeeCollection* _tmp157_ = NULL;
398         GeeCollection* _tmp158_;
399         gboolean _tmp159_ = FALSE;
400         GeeMultiMap* _tmp160_;
401         gboolean _tmp161_ = FALSE;
402         GeeMultiMap* _tmp162_;
403         GeeCollection* _tmp163_ = NULL;
404         GeeCollection* _tmp164_;
405         gboolean _tmp165_ = FALSE;
406         GeeMultiMap* _tmp166_;
407         gboolean _tmp167_ = FALSE;
408         GeeMultiMap* _tmp168_;
409         gboolean _tmp169_ = FALSE;
410         GeeMultiMap* _tmp170_;
411         GeeCollection* _tmp171_ = NULL;
412         GeeCollection* _tmp172_;
413         gboolean _tmp173_ = FALSE;
414         GeeMultiMap* _tmp174_;
415         GeeCollection* _tmp175_ = NULL;
416         GeeCollection* _tmp176_;
417         gboolean _tmp177_ = FALSE;
418         GeeMultiMap* _tmp178_;
419         gboolean _tmp179_ = FALSE;
420         GeeMultiMap* _tmp180_;
421         GeeCollection* _tmp181_ = NULL;
422         GeeCollection* _tmp182_;
423         gboolean _tmp183_ = FALSE;
424         g_return_if_fail (self != NULL);
425         _tmp0_ = self->test_multi_map;
426         _vala_assert (_tmp0_ != NULL, "test_multi_map != null");
427         _tmp1_ = self->test_multi_map;
428         gee_multi_map_set (_tmp1_, "0", "0");
429         _tmp2_ = self->test_multi_map;
430         _tmp3_ = gee_multi_map_contains (_tmp2_, "0");
431         _vala_assert (_tmp3_, "test_multi_map.contains (\"0\")");
432         _tmp4_ = self->test_multi_map;
433         _tmp5_ = gee_multi_map_get (_tmp4_, "0");
434         _tmp6_ = _tmp5_;
435         _tmp7_ = gee_collection_get_size (_tmp6_);
436         _tmp8_ = _tmp7_;
437         _vala_assert (_tmp8_ == 1, "test_multi_map.get (\"0\").size == 1");
438         _g_object_unref0 (_tmp6_);
439         _tmp9_ = self->test_multi_map;
440         _tmp10_ = gee_multi_map_get (_tmp9_, "0");
441         _tmp11_ = _tmp10_;
442         _tmp12_ = gee_collection_contains (_tmp11_, "0");
443         _vala_assert (_tmp12_, "test_multi_map.get (\"0\").contains (\"0\")");
444         _g_object_unref0 (_tmp11_);
445         _tmp13_ = self->test_multi_map;
446         _tmp14_ = gee_multi_map_get (_tmp13_, "1");
447         _tmp15_ = _tmp14_;
448         _tmp16_ = gee_collection_get_size (_tmp15_);
449         _tmp17_ = _tmp16_;
450         _vala_assert (_tmp17_ == 0, "test_multi_map.get (\"1\").size == 0");
451         _g_object_unref0 (_tmp15_);
452         _tmp18_ = self->test_multi_map;
453         gee_multi_map_set (_tmp18_, "0", "1");
454         _tmp19_ = self->test_multi_map;
455         _tmp20_ = gee_multi_map_get (_tmp19_, "0");
456         _tmp21_ = _tmp20_;
457         _tmp22_ = gee_collection_get_size (_tmp21_);
458         _tmp23_ = _tmp22_;
459         _vala_assert (_tmp23_ == 2, "test_multi_map.get (\"0\").size == 2");
460         _g_object_unref0 (_tmp21_);
461         _tmp24_ = self->test_multi_map;
462         _tmp25_ = gee_multi_map_get (_tmp24_, "0");
463         _tmp26_ = _tmp25_;
464         _tmp27_ = gee_collection_contains (_tmp26_, "0");
465         _vala_assert (_tmp27_, "test_multi_map.get (\"0\").contains (\"0\")");
466         _g_object_unref0 (_tmp26_);
467         _tmp28_ = self->test_multi_map;
468         _tmp29_ = gee_multi_map_get (_tmp28_, "0");
469         _tmp30_ = _tmp29_;
470         _tmp31_ = gee_collection_contains (_tmp30_, "1");
471         _vala_assert (_tmp31_, "test_multi_map.get (\"0\").contains (\"1\")");
472         _g_object_unref0 (_tmp30_);
473         _tmp32_ = self->test_multi_map;
474         gee_multi_map_set (_tmp32_, "1", "1");
475         _tmp33_ = self->test_multi_map;
476         _tmp34_ = gee_multi_map_contains (_tmp33_, "1");
477         _vala_assert (_tmp34_, "test_multi_map.contains (\"1\")");
478         _tmp35_ = self->test_multi_map;
479         _tmp36_ = gee_multi_map_get (_tmp35_, "0");
480         _tmp37_ = _tmp36_;
481         _tmp38_ = gee_collection_get_size (_tmp37_);
482         _tmp39_ = _tmp38_;
483         _vala_assert (_tmp39_ == 2, "test_multi_map.get (\"0\").size == 2");
484         _g_object_unref0 (_tmp37_);
485         _tmp40_ = self->test_multi_map;
486         _tmp41_ = gee_multi_map_get (_tmp40_, "0");
487         _tmp42_ = _tmp41_;
488         _tmp43_ = gee_collection_contains (_tmp42_, "0");
489         _vala_assert (_tmp43_, "test_multi_map.get (\"0\").contains (\"0\")");
490         _g_object_unref0 (_tmp42_);
491         _tmp44_ = self->test_multi_map;
492         _tmp45_ = gee_multi_map_get (_tmp44_, "0");
493         _tmp46_ = _tmp45_;
494         _tmp47_ = gee_collection_contains (_tmp46_, "1");
495         _vala_assert (_tmp47_, "test_multi_map.get (\"0\").contains (\"1\")");
496         _g_object_unref0 (_tmp46_);
497         _tmp48_ = self->test_multi_map;
498         _tmp49_ = gee_multi_map_get (_tmp48_, "1");
499         _tmp50_ = _tmp49_;
500         _tmp51_ = gee_collection_get_size (_tmp50_);
501         _tmp52_ = _tmp51_;
502         _vala_assert (_tmp52_ == 1, "test_multi_map.get (\"1\").size == 1");
503         _g_object_unref0 (_tmp50_);
504         _tmp53_ = self->test_multi_map;
505         _tmp54_ = gee_multi_map_get (_tmp53_, "0");
506         _tmp55_ = _tmp54_;
507         _tmp56_ = gee_collection_contains (_tmp55_, "1");
508         _vala_assert (_tmp56_, "test_multi_map.get (\"0\").contains (\"1\")");
509         _g_object_unref0 (_tmp55_);
510         _tmp57_ = self->test_multi_map;
511         _tmp58_ = gee_multi_map_remove (_tmp57_, "0", "0");
512         _vala_assert (_tmp58_, "test_multi_map.remove (\"0\", \"0\")");
513         _tmp59_ = self->test_multi_map;
514         _tmp60_ = gee_multi_map_contains (_tmp59_, "0");
515         _vala_assert (_tmp60_, "test_multi_map.contains (\"0\")");
516         _tmp61_ = self->test_multi_map;
517         _tmp62_ = gee_multi_map_get (_tmp61_, "0");
518         _tmp63_ = _tmp62_;
519         _tmp64_ = gee_collection_contains (_tmp63_, "0");
520         _vala_assert (!_tmp64_, "! test_multi_map.get (\"0\").contains (\"0\")");
521         _g_object_unref0 (_tmp63_);
522         _tmp65_ = self->test_multi_map;
523         _tmp66_ = gee_multi_map_get (_tmp65_, "0");
524         _tmp67_ = _tmp66_;
525         _tmp68_ = gee_collection_contains (_tmp67_, "1");
526         _vala_assert (_tmp68_, "test_multi_map.get (\"0\").contains (\"1\")");
527         _g_object_unref0 (_tmp67_);
528         _tmp69_ = self->test_multi_map;
529         _tmp70_ = gee_multi_map_contains (_tmp69_, "1");
530         _vala_assert (_tmp70_, "test_multi_map.contains (\"1\")");
531         _tmp71_ = self->test_multi_map;
532         _tmp72_ = gee_multi_map_get (_tmp71_, "1");
533         _tmp73_ = _tmp72_;
534         _tmp74_ = gee_collection_contains (_tmp73_, "1");
535         _vala_assert (_tmp74_, "test_multi_map.get (\"1\").contains (\"1\")");
536         _g_object_unref0 (_tmp73_);
537         _tmp75_ = self->test_multi_map;
538         _tmp76_ = gee_multi_map_remove (_tmp75_, "0", "1");
539         _vala_assert (_tmp76_, "test_multi_map.remove (\"0\", \"1\")");
540         _tmp77_ = self->test_multi_map;
541         _tmp78_ = gee_multi_map_contains (_tmp77_, "0");
542         _vala_assert (!_tmp78_, "! test_multi_map.contains (\"0\")");
543         _tmp79_ = self->test_multi_map;
544         _tmp80_ = gee_multi_map_get (_tmp79_, "0");
545         _tmp81_ = _tmp80_;
546         _tmp82_ = gee_collection_contains (_tmp81_, "0");
547         _vala_assert (!_tmp82_, "! test_multi_map.get (\"0\").contains (\"0\")");
548         _g_object_unref0 (_tmp81_);
549         _tmp83_ = self->test_multi_map;
550         _tmp84_ = gee_multi_map_get (_tmp83_, "0");
551         _tmp85_ = _tmp84_;
552         _tmp86_ = gee_collection_contains (_tmp85_, "1");
553         _vala_assert (!_tmp86_, "! test_multi_map.get (\"0\").contains (\"1\")");
554         _g_object_unref0 (_tmp85_);
555         _tmp87_ = self->test_multi_map;
556         _tmp88_ = gee_multi_map_contains (_tmp87_, "1");
557         _vala_assert (_tmp88_, "test_multi_map.contains (\"1\")");
558         _tmp89_ = self->test_multi_map;
559         _tmp90_ = gee_multi_map_get (_tmp89_, "1");
560         _tmp91_ = _tmp90_;
561         _tmp92_ = gee_collection_contains (_tmp91_, "1");
562         _vala_assert (_tmp92_, "test_multi_map.get (\"1\").contains (\"1\")");
563         _g_object_unref0 (_tmp91_);
564         _tmp93_ = self->test_multi_map;
565         _tmp94_ = gee_multi_map_remove (_tmp93_, "0", "1");
566         _vala_assert (!_tmp94_, "! test_multi_map.remove (\"0\", \"1\")");
567         _tmp95_ = self->test_multi_map;
568         _tmp96_ = gee_multi_map_contains (_tmp95_, "0");
569         _vala_assert (!_tmp96_, "! test_multi_map.contains (\"0\")");
570         _tmp97_ = self->test_multi_map;
571         _tmp98_ = gee_multi_map_get (_tmp97_, "0");
572         _tmp99_ = _tmp98_;
573         _tmp100_ = gee_collection_contains (_tmp99_, "0");
574         _vala_assert (!_tmp100_, "! test_multi_map.get (\"0\").contains (\"0\")");
575         _g_object_unref0 (_tmp99_);
576         _tmp101_ = self->test_multi_map;
577         _tmp102_ = gee_multi_map_get (_tmp101_, "0");
578         _tmp103_ = _tmp102_;
579         _tmp104_ = gee_collection_contains (_tmp103_, "1");
580         _vala_assert (!_tmp104_, "! test_multi_map.get (\"0\").contains (\"1\")");
581         _g_object_unref0 (_tmp103_);
582         _tmp105_ = self->test_multi_map;
583         _tmp106_ = gee_multi_map_contains (_tmp105_, "1");
584         _vala_assert (_tmp106_, "test_multi_map.contains (\"1\")");
585         _tmp107_ = self->test_multi_map;
586         _tmp108_ = gee_multi_map_get (_tmp107_, "1");
587         _tmp109_ = _tmp108_;
588         _tmp110_ = gee_collection_contains (_tmp109_, "1");
589         _vala_assert (_tmp110_, "test_multi_map.get (\"1\").contains (\"1\")");
590         _g_object_unref0 (_tmp109_);
591         _tmp111_ = self->test_multi_map;
592         gee_multi_map_clear (_tmp111_);
593         _tmp112_ = self->test_multi_map;
594         _tmp113_ = gee_multi_map_contains (_tmp112_, "0");
595         _vala_assert (!_tmp113_, "! test_multi_map.contains (\"0\")");
596         _tmp114_ = self->test_multi_map;
597         _tmp115_ = gee_multi_map_contains (_tmp114_, "1");
598         _vala_assert (!_tmp115_, "! test_multi_map.contains (\"1\")");
599         _tmp116_ = self->test_multi_map;
600         gee_multi_map_set (_tmp116_, "0", "0");
601         _tmp117_ = self->test_multi_map;
602         gee_multi_map_set (_tmp117_, "0", "1");
603         _tmp118_ = self->test_multi_map;
604         gee_multi_map_set (_tmp118_, "1", "1");
605         _tmp119_ = self->test_multi_map;
606         _tmp120_ = gee_multi_map_get_size (_tmp119_);
607         _tmp121_ = _tmp120_;
608         _vala_assert (_tmp121_ == 3, "test_multi_map.size == 3");
609         _tmp122_ = self->test_multi_map;
610         _tmp123_ = gee_multi_map_contains (_tmp122_, "0");
611         _vala_assert (_tmp123_, "test_multi_map.contains (\"0\")");
612         _tmp124_ = self->test_multi_map;
613         _tmp125_ = gee_multi_map_contains (_tmp124_, "1");
614         _vala_assert (_tmp125_, "test_multi_map.contains (\"1\")");
615         _tmp126_ = self->test_multi_map;
616         _tmp127_ = gee_multi_map_get (_tmp126_, "0");
617         _tmp128_ = _tmp127_;
618         _tmp129_ = gee_collection_get_size (_tmp128_);
619         _tmp130_ = _tmp129_;
620         _vala_assert (_tmp130_ == 2, "test_multi_map.get (\"0\").size == 2");
621         _g_object_unref0 (_tmp128_);
622         _tmp131_ = self->test_multi_map;
623         _tmp132_ = gee_multi_map_get (_tmp131_, "0");
624         _tmp133_ = _tmp132_;
625         _tmp134_ = gee_collection_contains (_tmp133_, "0");
626         _vala_assert (_tmp134_, "test_multi_map.get (\"0\").contains (\"0\")");
627         _g_object_unref0 (_tmp133_);
628         _tmp135_ = self->test_multi_map;
629         _tmp136_ = gee_multi_map_get (_tmp135_, "0");
630         _tmp137_ = _tmp136_;
631         _tmp138_ = gee_collection_contains (_tmp137_, "1");
632         _vala_assert (_tmp138_, "test_multi_map.get (\"0\").contains (\"1\")");
633         _g_object_unref0 (_tmp137_);
634         _tmp139_ = self->test_multi_map;
635         _tmp140_ = gee_multi_map_get (_tmp139_, "1");
636         _tmp141_ = _tmp140_;
637         _tmp142_ = gee_collection_get_size (_tmp141_);
638         _tmp143_ = _tmp142_;
639         _vala_assert (_tmp143_ == 1, "test_multi_map.get (\"1\").size == 1");
640         _g_object_unref0 (_tmp141_);
641         _tmp144_ = self->test_multi_map;
642         _tmp145_ = gee_multi_map_get (_tmp144_, "0");
643         _tmp146_ = _tmp145_;
644         _tmp147_ = gee_collection_contains (_tmp146_, "1");
645         _vala_assert (_tmp147_, "test_multi_map.get (\"0\").contains (\"1\")");
646         _g_object_unref0 (_tmp146_);
647         _tmp148_ = self->test_multi_map;
648         _tmp149_ = gee_multi_map_remove_all (_tmp148_, "0");
649         _vala_assert (_tmp149_, "test_multi_map.remove_all (\"0\")");
650         _tmp150_ = self->test_multi_map;
651         _tmp151_ = gee_multi_map_contains (_tmp150_, "0");
652         _vala_assert (!_tmp151_, "! test_multi_map.contains (\"0\")");
653         _tmp152_ = self->test_multi_map;
654         _tmp153_ = gee_multi_map_get (_tmp152_, "0");
655         _tmp154_ = _tmp153_;
656         _tmp155_ = gee_collection_contains (_tmp154_, "0");
657         _vala_assert (!_tmp155_, "! test_multi_map.get (\"0\").contains (\"0\")");
658         _g_object_unref0 (_tmp154_);
659         _tmp156_ = self->test_multi_map;
660         _tmp157_ = gee_multi_map_get (_tmp156_, "0");
661         _tmp158_ = _tmp157_;
662         _tmp159_ = gee_collection_contains (_tmp158_, "1");
663         _vala_assert (!_tmp159_, "! test_multi_map.get (\"0\").contains (\"1\")");
664         _g_object_unref0 (_tmp158_);
665         _tmp160_ = self->test_multi_map;
666         _tmp161_ = gee_multi_map_contains (_tmp160_, "1");
667         _vala_assert (_tmp161_, "test_multi_map.contains (\"1\")");
668         _tmp162_ = self->test_multi_map;
669         _tmp163_ = gee_multi_map_get (_tmp162_, "1");
670         _tmp164_ = _tmp163_;
671         _tmp165_ = gee_collection_contains (_tmp164_, "1");
672         _vala_assert (_tmp165_, "test_multi_map.get (\"1\").contains (\"1\")");
673         _g_object_unref0 (_tmp164_);
674         _tmp166_ = self->test_multi_map;
675         _tmp167_ = gee_multi_map_remove_all (_tmp166_, "0");
676         _vala_assert (!_tmp167_, "! test_multi_map.remove_all (\"0\")");
677         _tmp168_ = self->test_multi_map;
678         _tmp169_ = gee_multi_map_contains (_tmp168_, "0");
679         _vala_assert (!_tmp169_, "! test_multi_map.contains (\"0\")");
680         _tmp170_ = self->test_multi_map;
681         _tmp171_ = gee_multi_map_get (_tmp170_, "0");
682         _tmp172_ = _tmp171_;
683         _tmp173_ = gee_collection_contains (_tmp172_, "0");
684         _vala_assert (!_tmp173_, "! test_multi_map.get (\"0\").contains (\"0\")");
685         _g_object_unref0 (_tmp172_);
686         _tmp174_ = self->test_multi_map;
687         _tmp175_ = gee_multi_map_get (_tmp174_, "0");
688         _tmp176_ = _tmp175_;
689         _tmp177_ = gee_collection_contains (_tmp176_, "1");
690         _vala_assert (!_tmp177_, "! test_multi_map.get (\"0\").contains (\"1\")");
691         _g_object_unref0 (_tmp176_);
692         _tmp178_ = self->test_multi_map;
693         _tmp179_ = gee_multi_map_contains (_tmp178_, "1");
694         _vala_assert (_tmp179_, "test_multi_map.contains (\"1\")");
695         _tmp180_ = self->test_multi_map;
696         _tmp181_ = gee_multi_map_get (_tmp180_, "1");
697         _tmp182_ = _tmp181_;
698         _tmp183_ = gee_collection_contains (_tmp182_, "1");
699         _vala_assert (_tmp183_, "test_multi_map.get (\"1\").contains (\"1\")");
700         _g_object_unref0 (_tmp182_);
701 }
702
703
704 static void multi_map_tests_test_keys_all_keys_values (MultiMapTests* self) {
705         GeeMultiMap* _tmp0_;
706         GeeMultiMap* _tmp1_;
707         GeeMultiMap* _tmp2_;
708         GeeMultiMap* _tmp3_;
709         GeeMultiMap* _tmp4_;
710         GeeSet* _tmp5_ = NULL;
711         GeeSet* keys;
712         GeeMultiMap* _tmp6_;
713         GeeMultiSet* _tmp7_ = NULL;
714         GeeMultiSet* all_keys;
715         GeeMultiMap* _tmp8_;
716         GeeCollection* _tmp9_ = NULL;
717         GeeCollection* values;
718         GeeSet* _tmp10_;
719         gboolean _tmp11_ = FALSE;
720         GeeSet* _tmp12_;
721         gboolean _tmp13_ = FALSE;
722         GeeMultiSet* _tmp14_;
723         gint _tmp15_ = 0;
724         GeeMultiSet* _tmp16_;
725         gint _tmp17_ = 0;
726         GeeCollection* _tmp18_;
727         gboolean _tmp19_ = FALSE;
728         GeeCollection* _tmp20_;
729         gboolean _tmp21_ = FALSE;
730         gboolean zero_found;
731         gboolean zero_found_once;
732         gboolean one_found;
733         gboolean one_found_twice;
734         gboolean nothing_more;
735         gboolean _tmp33_;
736         gboolean _tmp34_;
737         gboolean _tmp35_;
738         gboolean _tmp36_;
739         gboolean _tmp37_;
740         g_return_if_fail (self != NULL);
741         _tmp0_ = self->test_multi_map;
742         _vala_assert (_tmp0_ != NULL, "test_multi_map != null");
743         _tmp1_ = self->test_multi_map;
744         gee_multi_map_set (_tmp1_, "0", "0");
745         _tmp2_ = self->test_multi_map;
746         gee_multi_map_set (_tmp2_, "0", "1");
747         _tmp3_ = self->test_multi_map;
748         gee_multi_map_set (_tmp3_, "1", "1");
749         _tmp4_ = self->test_multi_map;
750         _tmp5_ = gee_multi_map_get_keys (_tmp4_);
751         keys = _tmp5_;
752         _tmp6_ = self->test_multi_map;
753         _tmp7_ = gee_multi_map_get_all_keys (_tmp6_);
754         all_keys = _tmp7_;
755         _tmp8_ = self->test_multi_map;
756         _tmp9_ = gee_multi_map_get_values (_tmp8_);
757         values = _tmp9_;
758         _tmp10_ = keys;
759         _tmp11_ = gee_collection_contains ((GeeCollection*) _tmp10_, "0");
760         _vala_assert (_tmp11_, "keys.contains (\"0\")");
761         _tmp12_ = keys;
762         _tmp13_ = gee_collection_contains ((GeeCollection*) _tmp12_, "1");
763         _vala_assert (_tmp13_, "keys.contains (\"1\")");
764         _tmp14_ = all_keys;
765         _tmp15_ = gee_multi_set_count (_tmp14_, "0");
766         _vala_assert (_tmp15_ == 2, "all_keys.count (\"0\") == 2");
767         _tmp16_ = all_keys;
768         _tmp17_ = gee_multi_set_count (_tmp16_, "1");
769         _vala_assert (_tmp17_ == 1, "all_keys.count (\"1\") == 1");
770         _tmp18_ = values;
771         _tmp19_ = gee_collection_contains (_tmp18_, "0");
772         _vala_assert (_tmp19_, "values.contains (\"0\")");
773         _tmp20_ = values;
774         _tmp21_ = gee_collection_contains (_tmp20_, "1");
775         _vala_assert (_tmp21_, "values.contains (\"1\")");
776         zero_found = FALSE;
777         zero_found_once = TRUE;
778         one_found = FALSE;
779         one_found_twice = FALSE;
780         nothing_more = TRUE;
781         {
782                 GeeCollection* _tmp22_;
783                 GeeIterator* _tmp23_ = NULL;
784                 GeeIterator* _value_it;
785                 _tmp22_ = values;
786                 _tmp23_ = gee_iterable_iterator ((GeeIterable*) _tmp22_);
787                 _value_it = _tmp23_;
788                 while (TRUE) {
789                         GeeIterator* _tmp24_;
790                         gboolean _tmp25_ = FALSE;
791                         GeeIterator* _tmp26_;
792                         gpointer _tmp27_ = NULL;
793                         gchar* value;
794                         const gchar* _tmp28_;
795                         _tmp24_ = _value_it;
796                         _tmp25_ = gee_iterator_next (_tmp24_);
797                         if (!_tmp25_) {
798                                 break;
799                         }
800                         _tmp26_ = _value_it;
801                         _tmp27_ = gee_iterator_get (_tmp26_);
802                         value = (gchar*) _tmp27_;
803                         _tmp28_ = value;
804                         if (g_strcmp0 (_tmp28_, "0") == 0) {
805                                 gboolean _tmp29_;
806                                 _tmp29_ = zero_found;
807                                 if (_tmp29_) {
808                                         zero_found_once = FALSE;
809                                 }
810                                 zero_found = TRUE;
811                         } else {
812                                 const gchar* _tmp30_;
813                                 _tmp30_ = value;
814                                 if (g_strcmp0 (_tmp30_, "1") == 0) {
815                                         gboolean _tmp31_;
816                                         _tmp31_ = one_found;
817                                         if (_tmp31_) {
818                                                 gboolean _tmp32_;
819                                                 _tmp32_ = one_found_twice;
820                                                 if (_tmp32_) {
821                                                         one_found_twice = FALSE;
822                                                 } else {
823                                                         one_found_twice = TRUE;
824                                                 }
825                                         }
826                                         one_found = TRUE;
827                                 } else {
828                                         nothing_more = FALSE;
829                                 }
830                         }
831                         _g_free0 (value);
832                 }
833                 _g_object_unref0 (_value_it);
834         }
835         _tmp33_ = zero_found;
836         _vala_assert (_tmp33_, "zero_found");
837         _tmp34_ = zero_found_once;
838         _vala_assert (_tmp34_, "zero_found_once");
839         _tmp35_ = one_found;
840         _vala_assert (_tmp35_, "one_found");
841         _tmp36_ = one_found_twice;
842         _vala_assert (_tmp36_, "one_found_twice");
843         _tmp37_ = nothing_more;
844         _vala_assert (_tmp37_, "nothing_more");
845         _g_object_unref0 (values);
846         _g_object_unref0 (all_keys);
847         _g_object_unref0 (keys);
848 }
849
850
851 static void multi_map_tests_class_init (MultiMapTestsClass * klass) {
852         multi_map_tests_parent_class = g_type_class_peek_parent (klass);
853         G_OBJECT_CLASS (klass)->finalize = multi_map_tests_finalize;
854 }
855
856
857 static void multi_map_tests_instance_init (MultiMapTests * self) {
858 }
859
860
861 static void multi_map_tests_finalize (GObject* obj) {
862         MultiMapTests * self;
863         self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MULTI_MAP_TESTS, MultiMapTests);
864         _g_object_unref0 (self->test_multi_map);
865         G_OBJECT_CLASS (multi_map_tests_parent_class)->finalize (obj);
866 }
867
868
869 GType multi_map_tests_get_type (void) {
870         static volatile gsize multi_map_tests_type_id__volatile = 0;
871         if (g_once_init_enter (&multi_map_tests_type_id__volatile)) {
872                 static const GTypeInfo g_define_type_info = { sizeof (MultiMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multi_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultiMapTests), 0, (GInstanceInitFunc) multi_map_tests_instance_init, NULL };
873                 GType multi_map_tests_type_id;
874                 multi_map_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "MultiMapTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
875                 g_once_init_leave (&multi_map_tests_type_id__volatile, multi_map_tests_type_id);
876         }
877         return multi_map_tests_type_id__volatile;
878 }
879
880
881