1 /* testtreemultimap.c generated by valac 0.18.0, the Vala compiler
2 * generated from testtreemultimap.vala, do not modify */
4 /* testtreemultimap.vala
6 * Copyright (C) 2008 Jürg Billeter
7 * Copyright (C) 2009 Didier Villevalois, Julien Peeters
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.
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.
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
24 * Jürg Billeter <j@bitron.ch>
25 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
26 * Julien Peeters <contact@julienpeeters.fr>
30 #include <glib-object.h>
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))
43 typedef struct _GeeTestCase GeeTestCase;
44 typedef struct _GeeTestCaseClass GeeTestCaseClass;
45 typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
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))
54 typedef struct _MultiMapTests MultiMapTests;
55 typedef struct _MultiMapTestsClass MultiMapTestsClass;
56 typedef struct _MultiMapTestsPrivate MultiMapTestsPrivate;
58 #define TYPE_TREE_MULTI_MAP_TESTS (tree_multi_map_tests_get_type ())
59 #define TREE_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TREE_MULTI_MAP_TESTS, TreeMultiMapTests))
60 #define TREE_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TREE_MULTI_MAP_TESTS, TreeMultiMapTestsClass))
61 #define IS_TREE_MULTI_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TREE_MULTI_MAP_TESTS))
62 #define IS_TREE_MULTI_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TREE_MULTI_MAP_TESTS))
63 #define TREE_MULTI_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TREE_MULTI_MAP_TESTS, TreeMultiMapTestsClass))
65 typedef struct _TreeMultiMapTests TreeMultiMapTests;
66 typedef struct _TreeMultiMapTestsClass TreeMultiMapTestsClass;
67 typedef struct _TreeMultiMapTestsPrivate TreeMultiMapTestsPrivate;
68 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
71 GObject parent_instance;
72 GeeTestCasePrivate * priv;
75 struct _GeeTestCaseClass {
76 GObjectClass parent_class;
77 void (*set_up) (GeeTestCase* self);
78 void (*tear_down) (GeeTestCase* self);
81 struct _MultiMapTests {
82 GeeTestCase parent_instance;
83 MultiMapTestsPrivate * priv;
84 GeeMultiMap* test_multi_map;
87 struct _MultiMapTestsClass {
88 GeeTestCaseClass parent_class;
91 struct _TreeMultiMapTests {
92 MultiMapTests parent_instance;
93 TreeMultiMapTestsPrivate * priv;
96 struct _TreeMultiMapTestsClass {
97 MultiMapTestsClass parent_class;
101 static gpointer tree_multi_map_tests_parent_class = NULL;
103 GType gee_test_case_get_type (void) G_GNUC_CONST;
104 GType multi_map_tests_get_type (void) G_GNUC_CONST;
105 GType tree_multi_map_tests_get_type (void) G_GNUC_CONST;
107 TREE_MULTI_MAP_TESTS_DUMMY_PROPERTY
109 TreeMultiMapTests* tree_multi_map_tests_new (void);
110 TreeMultiMapTests* tree_multi_map_tests_construct (GType object_type);
111 MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name);
112 static void tree_multi_map_tests_real_set_up (GeeTestCase* base);
113 static void tree_multi_map_tests_real_tear_down (GeeTestCase* base);
116 TreeMultiMapTests* tree_multi_map_tests_construct (GType object_type) {
117 TreeMultiMapTests * self = NULL;
118 self = (TreeMultiMapTests*) multi_map_tests_construct (object_type, "TreeMultiMap");
123 TreeMultiMapTests* tree_multi_map_tests_new (void) {
124 return tree_multi_map_tests_construct (TYPE_TREE_MULTI_MAP_TESTS);
128 static void tree_multi_map_tests_real_set_up (GeeTestCase* base) {
129 TreeMultiMapTests * self;
130 GeeTreeMultiMap* _tmp0_;
131 self = (TreeMultiMapTests*) base;
132 _tmp0_ = gee_tree_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
133 _g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
134 ((MultiMapTests*) self)->test_multi_map = (GeeMultiMap*) _tmp0_;
138 static void tree_multi_map_tests_real_tear_down (GeeTestCase* base) {
139 TreeMultiMapTests * self;
140 self = (TreeMultiMapTests*) base;
141 _g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
142 ((MultiMapTests*) self)->test_multi_map = NULL;
146 static void tree_multi_map_tests_class_init (TreeMultiMapTestsClass * klass) {
147 tree_multi_map_tests_parent_class = g_type_class_peek_parent (klass);
148 GEE_TEST_CASE_CLASS (klass)->set_up = tree_multi_map_tests_real_set_up;
149 GEE_TEST_CASE_CLASS (klass)->tear_down = tree_multi_map_tests_real_tear_down;
153 static void tree_multi_map_tests_instance_init (TreeMultiMapTests * self) {
157 GType tree_multi_map_tests_get_type (void) {
158 static volatile gsize tree_multi_map_tests_type_id__volatile = 0;
159 if (g_once_init_enter (&tree_multi_map_tests_type_id__volatile)) {
160 static const GTypeInfo g_define_type_info = { sizeof (TreeMultiMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tree_multi_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TreeMultiMapTests), 0, (GInstanceInitFunc) tree_multi_map_tests_instance_init, NULL };
161 GType tree_multi_map_tests_type_id;
162 tree_multi_map_tests_type_id = g_type_register_static (TYPE_MULTI_MAP_TESTS, "TreeMultiMapTests", &g_define_type_info, 0);
163 g_once_init_leave (&tree_multi_map_tests_type_id__volatile, tree_multi_map_tests_type_id);
165 return tree_multi_map_tests_type_id__volatile;