1
/* test-vala.c generated by valac 0.14.0, the Vala compiler
2
* generated from test-vala.vala, do not modify */
5
* Copyright (C) 2011 Canonical Ltd
7
* This library is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License
9
* version 3.0 as published by the Free Software Foundation.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License version 3.0 for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see
18
* <http://www.gnu.org/licenses/>.
20
* Authored by Ken VanDine <ken@vandine.org>
24
#include <glib-object.h>
33
#define TYPE_MAIN (main_get_type ())
34
#define MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN, Main))
35
#define MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN, MainClass))
36
#define IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN))
37
#define IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN))
38
#define MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN, MainClass))
40
typedef struct _Main Main;
41
typedef struct _MainClass MainClass;
42
typedef struct _MainPrivate MainPrivate;
44
#define GWIBBER_TEST_TYPE_UTILS (gwibber_test_utils_get_type ())
45
#define GWIBBER_TEST_UTILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GWIBBER_TEST_TYPE_UTILS, GwibberTestUtils))
46
#define GWIBBER_TEST_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GWIBBER_TEST_TYPE_UTILS, GwibberTestUtilsClass))
47
#define GWIBBER_TEST_IS_UTILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GWIBBER_TEST_TYPE_UTILS))
48
#define GWIBBER_TEST_IS_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GWIBBER_TEST_TYPE_UTILS))
49
#define GWIBBER_TEST_UTILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GWIBBER_TEST_TYPE_UTILS, GwibberTestUtilsClass))
51
typedef struct _GwibberTestUtils GwibberTestUtils;
52
typedef struct _GwibberTestUtilsClass GwibberTestUtilsClass;
53
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
55
#define GWIBBER_TEST_TYPE_UTILS_SUITE (gwibber_test_utils_suite_get_type ())
56
#define GWIBBER_TEST_UTILS_SUITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GWIBBER_TEST_TYPE_UTILS_SUITE, GwibberTestUtilsSuite))
57
#define GWIBBER_TEST_UTILS_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GWIBBER_TEST_TYPE_UTILS_SUITE, GwibberTestUtilsSuiteClass))
58
#define GWIBBER_TEST_IS_UTILS_SUITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GWIBBER_TEST_TYPE_UTILS_SUITE))
59
#define GWIBBER_TEST_IS_UTILS_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GWIBBER_TEST_TYPE_UTILS_SUITE))
60
#define GWIBBER_TEST_UTILS_SUITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GWIBBER_TEST_TYPE_UTILS_SUITE, GwibberTestUtilsSuiteClass))
62
typedef struct _GwibberTestUtilsSuite GwibberTestUtilsSuite;
63
typedef struct _GwibberTestUtilsSuiteClass GwibberTestUtilsSuiteClass;
64
#define _gwibber_test_utils_suite_unref0(var) ((var == NULL) ? NULL : (var = (gwibber_test_utils_suite_unref (var), NULL)))
67
GObject parent_instance;
72
GObjectClass parent_class;
76
static gpointer main_parent_class = NULL;
78
GType main_get_type (void) G_GNUC_CONST;
82
static Main* main_new (void);
83
static Main* main_construct (GType object_type);
84
GwibberTestUtils* gwibber_test_utils_new (void);
85
GwibberTestUtils* gwibber_test_utils_construct (GType object_type);
86
GType gwibber_test_utils_get_type (void) G_GNUC_CONST;
87
void gwibber_test_utils_setup (GwibberTestUtils* self, const gchar* name, GError** error);
88
static void main_run_tests (Main* self, gboolean b);
89
static void _main_run_tests_gwibber_test_utils_available (GwibberTestUtils* _sender, gboolean up, gpointer self);
90
gpointer gwibber_test_utils_suite_ref (gpointer instance);
91
void gwibber_test_utils_suite_unref (gpointer instance);
92
GParamSpec* gwibber_test_param_spec_utils_suite (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
93
void gwibber_test_value_set_utils_suite (GValue* value, gpointer v_object);
94
void gwibber_test_value_take_utils_suite (GValue* value, gpointer v_object);
95
gpointer gwibber_test_value_get_utils_suite (const GValue* value);
96
GType gwibber_test_utils_suite_get_type (void) G_GNUC_CONST;
97
GwibberTestUtilsSuite* gwibber_test_utils_suite_new (void);
98
GwibberTestUtilsSuite* gwibber_test_utils_suite_construct (GType object_type);
99
static gint main_main (gchar** args, int args_length1);
102
static void _main_run_tests_gwibber_test_utils_available (GwibberTestUtils* _sender, gboolean up, gpointer self) {
103
#line 28 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
104
main_run_tests (self, up);
105
#line 106 "test-vala.c"
109
static Main* main_construct (GType object_type) {
111
GwibberTestUtils* _tmp0_;
113
GError * _inner_error_ = NULL;
114
#line 24 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
115
self = (Main*) g_object_new (object_type, NULL);
116
#line 26 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
117
_tmp0_ = gwibber_test_utils_new ();
118
#line 26 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
120
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
121
gwibber_test_utils_setup (u, "com.Gwibber.Service", &_inner_error_);
122
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
123
if (_inner_error_ != NULL) {
124
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
125
_g_object_unref0 (u);
126
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
127
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
128
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
129
g_clear_error (&_inner_error_);
130
#line 27 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
132
#line 133 "test-vala.c"
134
#line 28 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
135
g_signal_connect_object (u, "available", (GCallback) _main_run_tests_gwibber_test_utils_available, self, 0);
136
#line 24 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
137
_g_object_unref0 (u);
138
#line 24 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
140
#line 141 "test-vala.c"
144
static Main* main_new (void) {
145
#line 24 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
146
return main_construct (TYPE_MAIN);
147
#line 148 "test-vala.c"
151
static void main_run_tests (Main* self, gboolean b) {
155
GwibberService* _tmp0_;
156
GwibberService* service;
157
GwibberTestUtilsSuite* utils_suite = NULL;
158
GwibberTestUtilsSuite* _tmp1_;
159
#line 31 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
160
g_return_if_fail (self != NULL);
161
#line 33 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
163
#line 33 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
165
#line 33 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
166
_args_size_ = args_length1;
167
#line 34 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
168
_tmp0_ = gwibber_service_new ();
169
#line 34 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
171
#line 35 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
172
g_test_init (&args_length1, &args, NULL);
173
#line 38 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
174
_tmp1_ = gwibber_test_utils_suite_new ();
175
#line 38 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
176
_gwibber_test_utils_suite_unref0 (utils_suite);
177
#line 38 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
178
utils_suite = _tmp1_;
179
#line 39 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
181
#line 40 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
182
gwibber_service_quit (service);
183
#line 41 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
185
#line 31 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
186
_gwibber_test_utils_suite_unref0 (utils_suite);
187
#line 31 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
188
_g_object_unref0 (service);
189
#line 190 "test-vala.c"
193
static gint main_main (gchar** args, int args_length1) {
197
#line 46 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
198
g_setenv ("XDG_DATA_HOME", TESTDIR "/data", TRUE);
199
#line 47 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
200
g_setenv ("XDG_CACHE_HOME", TESTDIR "/data", TRUE);
201
#line 48 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
202
gtk_init (&args_length1, &args);
203
#line 49 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
204
_tmp0_ = main_new ();
205
#line 49 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
207
#line 50 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
209
#line 52 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
211
#line 52 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
212
_g_object_unref0 (m);
213
#line 52 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
215
#line 216 "test-vala.c"
219
int main (int argc, char ** argv) {
220
#line 44 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
222
#line 44 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
223
return main_main (argv, argc);
224
#line 225 "test-vala.c"
228
static void main_class_init (MainClass * klass) {
229
#line 22 "/home/ken/src/gwibber/trunk/test/vala/test-vala.vala"
230
main_parent_class = g_type_class_peek_parent (klass);
231
#line 232 "test-vala.c"
235
static void main_instance_init (Main * self) {
239
GType main_get_type (void) {
240
static volatile gsize main_type_id__volatile = 0;
241
if (g_once_init_enter (&main_type_id__volatile)) {
242
static const GTypeInfo g_define_type_info = { sizeof (MainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Main), 0, (GInstanceInitFunc) main_instance_init, NULL };
244
main_type_id = g_type_register_static (G_TYPE_OBJECT, "Main", &g_define_type_info, 0);
245
g_once_init_leave (&main_type_id__volatile, main_type_id);
247
return main_type_id__volatile;