~ken-vandine/ubuntu/precise/folks/precise

« back to all changes in this revision

Viewing changes to tests/eds/removing-contacts.c

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-08-29 17:46:04 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: package-import@ubuntu.com-20110829174604-2s7tbu84i0s9wohh
Tags: 0.6.1-0ubuntu1
* New upstream release
* debian/rules:
  - Explicitly disable libsocialweb backend 
* debian/control:
  - Build depend on libvala-0.14, not ..-0.12
  - Build depend on valac >= 0.13.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* removing-contacts.c generated by valac 0.13.1.106-1068, the Vala compiler
 
1
/* removing-contacts.c generated by valac 0.13.3, the Vala compiler
2
2
 * generated from removing-contacts.vala, do not modify */
3
3
 
4
4
/*
75
75
        EdsTestBackend* _tmp0_;
76
76
        FolksBackendStore* _tmp1_;
77
77
        FolksBackendStore* store;
78
 
        FolksBackendStore* _tmp2_;
 
78
        FolksIndividualAggregator* _tmp2_;
79
79
        FolksIndividualAggregator* _tmp3_;
80
80
        FolksIndividualAggregator* _tmp4_;
81
 
        FolksIndividualAggregator* _tmp5_;
82
81
        GError* e;
83
 
        GError* _tmp6_;
84
 
        const gchar* _tmp7_;
 
82
        GError* _tmp5_;
 
83
        const gchar* _tmp6_;
85
84
        GError * _inner_error_;
86
85
};
87
86
 
103
102
static void _vala_GValue_free (GValue* self);
104
103
static void _removing_contacts_tests_test_removal_async (RemovingContactsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
105
104
static void _removing_contacts_tests_test_removal_finish (RemovingContactsTests* self, GAsyncResult* _res_);
106
 
static gboolean _lambda0_ (RemovingContactsTests* self);
107
 
static gboolean __lambda0__gsource_func (gpointer self);
 
105
static gboolean __lambda0_ (RemovingContactsTests* self);
 
106
static gboolean ___lambda0__gsource_func (gpointer self);
108
107
static void _removing_contacts_tests_test_removal_async_data_free (gpointer _data);
109
108
static gboolean _removing_contacts_tests_test_removal_async_co (RemovingContactsTestsTestRemovalAsyncData* _data_);
110
109
static void _removing_contacts_tests_test_removal_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
115
114
 
116
115
 
117
116
static void _removing_contacts_tests_test_removal_folks_test_case_test_method (gpointer self) {
 
117
#line 39 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
118
118
        removing_contacts_tests_test_removal (self);
 
119
#line 120 "removing-contacts.c"
119
120
}
120
121
 
121
122
 
122
123
RemovingContactsTests* removing_contacts_tests_construct (GType object_type) {
123
124
        RemovingContactsTests * self = NULL;
124
125
        EdsTestBackend* _tmp0_;
 
126
#line 35 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
125
127
        self = (RemovingContactsTests*) folks_test_case_construct (object_type, "IndividualRetrieval");
 
128
#line 37 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
126
129
        _tmp0_ = eds_test_backend_new ();
 
130
#line 37 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
127
131
        _eds_test_backend_unref0 (self->priv->_eds_backend);
 
132
#line 37 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
128
133
        self->priv->_eds_backend = _tmp0_;
 
134
#line 39 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
129
135
        folks_test_case_add_test ((FolksTestCase*) self, "removing contact", _removing_contacts_tests_test_removal_folks_test_case_test_method, self);
 
136
#line 33 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
130
137
        return self;
 
138
#line 139 "removing-contacts.c"
131
139
}
132
140
 
133
141
 
134
142
RemovingContactsTests* removing_contacts_tests_new (void) {
 
143
#line 33 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
135
144
        return removing_contacts_tests_construct (TYPE_REMOVING_CONTACTS_TESTS);
 
145
#line 146 "removing-contacts.c"
136
146
}
137
147
 
138
148
 
139
149
static void removing_contacts_tests_real_set_up (FolksTestCase* base) {
140
150
        RemovingContactsTests * self;
141
151
        EdsTestBackend* _tmp0_;
 
152
#line 42 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
142
153
        self = (RemovingContactsTests*) base;
 
154
#line 44 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
143
155
        _tmp0_ = self->priv->_eds_backend;
 
156
#line 44 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
144
157
        eds_test_backend_set_up (_tmp0_);
 
158
#line 159 "removing-contacts.c"
145
159
}
146
160
 
147
161
 
148
162
static void removing_contacts_tests_real_tear_down (FolksTestCase* base) {
149
163
        RemovingContactsTests * self;
150
164
        EdsTestBackend* _tmp0_;
 
165
#line 47 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
151
166
        self = (RemovingContactsTests*) base;
 
167
#line 49 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
152
168
        _tmp0_ = self->priv->_eds_backend;
 
169
#line 49 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
153
170
        eds_test_backend_tear_down (_tmp0_);
 
171
#line 172 "removing-contacts.c"
154
172
}
155
173
 
156
174
 
157
175
static GValue* _g_value_dup (GValue* self) {
 
176
#line 54 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
158
177
        return g_boxed_copy (G_TYPE_VALUE, self);
 
178
#line 179 "removing-contacts.c"
159
179
}
160
180
 
161
181
 
162
182
static void _vala_GValue_free (GValue* self) {
 
183
#line 54 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
163
184
        g_value_unset (self);
 
185
#line 54 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
164
186
        g_free (self);
 
187
#line 188 "removing-contacts.c"
165
188
}
166
189
 
167
190
 
168
191
static gpointer __g_value_dup0 (gpointer self) {
 
192
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
169
193
        return self ? _g_value_dup (self) : NULL;
 
194
#line 195 "removing-contacts.c"
170
195
}
171
196
 
172
197
 
173
198
static gpointer _g_object_ref0 (gpointer self) {
 
199
#line 66 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
174
200
        return self ? g_object_ref (self) : NULL;
 
201
#line 202 "removing-contacts.c"
175
202
}
176
203
 
177
204
 
178
 
static gboolean _lambda0_ (RemovingContactsTests* self) {
 
205
static gboolean __lambda0_ (RemovingContactsTests* self) {
179
206
        gboolean result = FALSE;
180
207
        GMainLoop* _tmp0_;
 
208
#line 71 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
181
209
        _tmp0_ = self->priv->_main_loop;
 
210
#line 71 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
182
211
        g_main_loop_quit (_tmp0_);
 
212
#line 72 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
183
213
        result = FALSE;
 
214
#line 72 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
184
215
        return result;
 
216
#line 217 "removing-contacts.c"
185
217
}
186
218
 
187
219
 
188
 
static gboolean __lambda0__gsource_func (gpointer self) {
 
220
static gboolean ___lambda0__gsource_func (gpointer self) {
189
221
        gboolean result;
190
 
        result = _lambda0_ (self);
 
222
        result = __lambda0_ (self);
 
223
#line 70 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
191
224
        return result;
 
225
#line 226 "removing-contacts.c"
192
226
}
193
227
 
194
228
 
203
237
        GValue _tmp5_;
204
238
        GValue* _tmp6_;
205
239
        GValue* _tmp7_;
206
 
        GeeHashMap* _tmp8_;
 
240
        GValue* _tmp8_;
207
241
        GValue* _tmp9_;
208
 
        GValue* _tmp10_;
209
 
        EdsTestBackend* _tmp11_;
210
 
        GeeHashMap* _tmp12_;
211
 
        GeeHashMap* _tmp13_;
212
 
        GMainLoop* _tmp14_;
213
 
        gboolean _tmp15_;
214
 
        gboolean _tmp16_;
 
242
        EdsTestBackend* _tmp10_;
 
243
        GeeHashMap* _tmp11_;
 
244
        GMainLoop* _tmp12_;
 
245
        gboolean _tmp13_;
 
246
        gboolean _tmp14_;
 
247
#line 52 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
215
248
        g_return_if_fail (self != NULL);
 
249
#line 54 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
216
250
        _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, _vala_GValue_free, NULL, NULL, NULL);
 
251
#line 54 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
217
252
        c1 = _tmp0_;
 
253
#line 55 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
218
254
        _tmp1_ = g_main_loop_new (NULL, FALSE);
 
255
#line 55 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
219
256
        _g_main_loop_unref0 (self->priv->_main_loop);
 
257
#line 55 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
220
258
        self->priv->_main_loop = _tmp1_;
 
259
#line 58 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
221
260
        self->priv->_added = FALSE;
 
261
#line 59 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
222
262
        self->priv->_removed = FALSE;
 
263
#line 61 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
223
264
        _tmp2_ = self->priv->_eds_backend;
 
265
#line 61 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
224
266
        eds_test_backend_reset (_tmp2_);
 
267
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
225
268
        g_value_init (&_tmp3_, G_TYPE_STRING);
 
269
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
226
270
        _tmp4_ = _tmp3_;
 
271
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
227
272
        _tmp5_ = _tmp4_;
 
273
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
228
274
        _tmp6_ = __g_value_dup0 (&_tmp5_);
 
275
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
229
276
        __vala_GValue_free0 (v);
 
277
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
230
278
        v = _tmp6_;
 
279
#line 63 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
231
280
        G_IS_VALUE (&_tmp5_) ? (g_value_unset (&_tmp5_), NULL) : NULL;
 
281
#line 64 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
232
282
        _tmp7_ = v;
 
283
#line 64 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
233
284
        g_value_set_string (_tmp7_, "bernie h. innocenti");
234
 
        _tmp8_ = c1;
235
 
        _tmp9_ = v;
 
285
#line 65 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
286
        _tmp8_ = v;
 
287
#line 65 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
236
288
        v = NULL;
237
 
        _tmp10_ = _tmp9_;
238
 
        gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, "full_name", _tmp10_);
239
 
        __vala_GValue_free0 (_tmp10_);
240
 
        _tmp11_ = self->priv->_eds_backend;
241
 
        _tmp12_ = c1;
242
 
        _tmp13_ = _g_object_ref0 (_tmp12_);
243
 
        eds_test_backend_add_contact (_tmp11_, _tmp13_);
 
289
#line 65 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
290
        _tmp9_ = _tmp8_;
 
291
#line 65 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
292
        gee_abstract_map_set ((GeeAbstractMap*) c1, "full_name", _tmp9_);
 
293
#line 65 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
294
        __vala_GValue_free0 (_tmp9_);
 
295
#line 66 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
296
        _tmp10_ = self->priv->_eds_backend;
 
297
#line 66 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
298
        _tmp11_ = _g_object_ref0 (c1);
 
299
#line 66 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
300
        eds_test_backend_add_contact (_tmp10_, _tmp11_);
 
301
#line 68 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
244
302
        _removing_contacts_tests_test_removal_async (self, NULL, NULL);
245
 
        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda0__gsource_func, g_object_ref (self), g_object_unref);
246
 
        _tmp14_ = self->priv->_main_loop;
247
 
        g_main_loop_run (_tmp14_);
248
 
        _tmp15_ = self->priv->_added;
249
 
        g_assert (_tmp15_ == TRUE);
250
 
        _tmp16_ = self->priv->_removed;
251
 
        g_assert (_tmp16_ == TRUE);
 
303
#line 70 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
304
        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda0__gsource_func, g_object_ref (self), g_object_unref);
 
305
#line 75 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
306
        _tmp12_ = self->priv->_main_loop;
 
307
#line 75 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
308
        g_main_loop_run (_tmp12_);
 
309
#line 77 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
310
        _tmp13_ = self->priv->_added;
 
311
#line 77 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
312
        g_assert (_tmp13_ == TRUE);
 
313
#line 78 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
314
        _tmp14_ = self->priv->_removed;
 
315
#line 78 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
316
        g_assert (_tmp14_ == TRUE);
 
317
#line 52 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
252
318
        __vala_GValue_free0 (v);
 
319
#line 52 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
253
320
        _g_object_unref0 (c1);
 
321
#line 322 "removing-contacts.c"
254
322
}
255
323
 
256
324
 
257
325
static void _removing_contacts_tests_test_removal_async_data_free (gpointer _data) {
258
326
        RemovingContactsTestsTestRemovalAsyncData* _data_;
259
327
        _data_ = _data;
 
328
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
260
329
        _g_object_unref0 (_data_->self);
 
330
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
261
331
        g_slice_free (RemovingContactsTestsTestRemovalAsyncData, _data_);
 
332
#line 333 "removing-contacts.c"
262
333
}
263
334
 
264
335
 
265
336
static void _removing_contacts_tests_test_removal_async (RemovingContactsTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
266
337
        RemovingContactsTestsTestRemovalAsyncData* _data_;
267
338
        RemovingContactsTests* _tmp0_;
 
339
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
268
340
        _data_ = g_slice_new0 (RemovingContactsTestsTestRemovalAsyncData);
 
341
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
269
342
        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _removing_contacts_tests_test_removal_async);
 
343
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
270
344
        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _removing_contacts_tests_test_removal_async_data_free);
 
345
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
271
346
        _tmp0_ = _g_object_ref0 (self);
 
347
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
272
348
        _data_->self = _tmp0_;
 
349
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
273
350
        _removing_contacts_tests_test_removal_async_co (_data_);
 
351
#line 352 "removing-contacts.c"
274
352
}
275
353
 
276
354
 
277
355
static void _removing_contacts_tests_test_removal_finish (RemovingContactsTests* self, GAsyncResult* _res_) {
278
356
        RemovingContactsTestsTestRemovalAsyncData* _data_;
 
357
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
279
358
        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 
359
#line 360 "removing-contacts.c"
280
360
}
281
361
 
282
362
 
283
363
static void _removing_contacts_tests_test_removal_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
284
364
        RemovingContactsTestsTestRemovalAsyncData* _data_;
 
365
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
285
366
        _data_ = _user_data_;
 
367
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
286
368
        _data_->_source_object_ = source_object;
 
369
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
287
370
        _data_->_res_ = _res_;
 
371
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
288
372
        _removing_contacts_tests_test_removal_async_co (_data_);
 
373
#line 374 "removing-contacts.c"
289
374
}
290
375
 
291
376
 
292
377
static void __removing_contacts_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
 
378
#line 88 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
293
379
        _removing_contacts_tests_individuals_changed_cb (self, added, removed, message, actor, reason);
 
380
#line 381 "removing-contacts.c"
294
381
}
295
382
 
296
383
 
297
384
static gboolean _removing_contacts_tests_test_removal_async_co (RemovingContactsTestsTestRemovalAsyncData* _data_) {
 
385
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
298
386
        switch (_data_->_state_) {
 
387
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
299
388
                case 0:
 
389
#line 390 "removing-contacts.c"
300
390
                goto _state_0;
 
391
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
301
392
                case 1:
 
393
#line 394 "removing-contacts.c"
302
394
                goto _state_1;
 
395
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
303
396
                case 2:
 
397
#line 398 "removing-contacts.c"
304
398
                goto _state_2;
 
399
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
305
400
                case 3:
 
401
#line 402 "removing-contacts.c"
306
402
                goto _state_3;
307
403
                default:
 
404
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
308
405
                g_assert_not_reached ();
 
406
#line 407 "removing-contacts.c"
309
407
        }
310
408
        _state_0:
 
409
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
311
410
        _data_->_tmp0_ = _data_->self->priv->_eds_backend;
 
411
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
312
412
        _data_->_state_ = 1;
 
413
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
313
414
        eds_test_backend_commit_contacts_to_addressbook (_data_->_tmp0_, _removing_contacts_tests_test_removal_async_ready, _data_);
 
415
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
314
416
        return FALSE;
 
417
#line 418 "removing-contacts.c"
315
418
        _state_1:
 
419
#line 83 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
316
420
        eds_test_backend_commit_contacts_to_addressbook_finish (_data_->_tmp0_, _data_->_res_);
 
421
#line 85 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
317
422
        _data_->_tmp1_ = NULL;
 
423
#line 85 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
318
424
        _data_->_tmp1_ = folks_backend_store_dup ();
 
425
#line 85 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
319
426
        _data_->store = _data_->_tmp1_;
320
 
        _data_->_tmp2_ = _data_->store;
 
427
#line 86 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
321
428
        _data_->_state_ = 2;
322
 
        folks_backend_store_prepare (_data_->_tmp2_, _removing_contacts_tests_test_removal_async_ready, _data_);
 
429
#line 86 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
430
        folks_backend_store_prepare (_data_->store, _removing_contacts_tests_test_removal_async_ready, _data_);
 
431
#line 86 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
323
432
        return FALSE;
 
433
#line 434 "removing-contacts.c"
324
434
        _state_2:
325
 
        folks_backend_store_prepare_finish (_data_->_tmp2_, _data_->_res_);
326
 
        _data_->_tmp3_ = folks_individual_aggregator_new ();
 
435
#line 86 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
436
        folks_backend_store_prepare_finish (_data_->store, _data_->_res_);
 
437
#line 87 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
438
        _data_->_tmp2_ = folks_individual_aggregator_new ();
 
439
#line 87 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
327
440
        _g_object_unref0 (_data_->self->priv->_aggregator);
328
 
        _data_->self->priv->_aggregator = _data_->_tmp3_;
329
 
        _data_->_tmp4_ = _data_->self->priv->_aggregator;
330
 
        g_signal_connect_object (_data_->_tmp4_, "individuals-changed", (GCallback) __removing_contacts_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed, _data_->self, 0);
 
441
#line 87 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
442
        _data_->self->priv->_aggregator = _data_->_tmp2_;
 
443
#line 88 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
444
        _data_->_tmp3_ = _data_->self->priv->_aggregator;
 
445
#line 88 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
446
        g_signal_connect_object (_data_->_tmp3_, "individuals-changed", (GCallback) __removing_contacts_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed, _data_->self, 0);
 
447
#line 448 "removing-contacts.c"
331
448
        {
332
 
                _data_->_tmp5_ = _data_->self->priv->_aggregator;
 
449
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
450
                _data_->_tmp4_ = _data_->self->priv->_aggregator;
 
451
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
333
452
                _data_->_state_ = 3;
334
 
                folks_individual_aggregator_prepare (_data_->_tmp5_, _removing_contacts_tests_test_removal_async_ready, _data_);
 
453
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
454
                folks_individual_aggregator_prepare (_data_->_tmp4_, _removing_contacts_tests_test_removal_async_ready, _data_);
 
455
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
335
456
                return FALSE;
 
457
#line 458 "removing-contacts.c"
336
458
                _state_3:
337
 
                folks_individual_aggregator_prepare_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
 
459
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
460
                folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
 
461
#line 92 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
338
462
                if (_data_->_inner_error_ != NULL) {
 
463
#line 464 "removing-contacts.c"
339
464
                        goto __catch0_g_error;
340
465
                }
341
466
        }
342
467
        goto __finally0;
343
468
        __catch0_g_error:
344
469
        {
 
470
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
345
471
                _data_->e = _data_->_inner_error_;
 
472
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
346
473
                _data_->_inner_error_ = NULL;
347
 
                _data_->_tmp6_ = _data_->e;
348
 
                _data_->_tmp7_ = _data_->_tmp6_->message;
349
 
                g_warning ("removing-contacts.vala:96: Error when calling prepare: %s\n", _data_->_tmp7_);
 
474
#line 96 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
475
                _data_->_tmp5_ = _data_->e;
 
476
#line 96 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
477
                _data_->_tmp6_ = _data_->_tmp5_->message;
 
478
#line 96 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
479
                g_warning ("removing-contacts.vala:96: Error when calling prepare: %s\n", _data_->_tmp6_);
 
480
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
350
481
                _g_error_free0 (_data_->e);
 
482
#line 483 "removing-contacts.c"
351
483
        }
352
484
        __finally0:
 
485
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
353
486
        if (_data_->_inner_error_ != NULL) {
 
487
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
354
488
                _g_object_unref0 (_data_->store);
 
489
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
355
490
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
 
491
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
356
492
                g_clear_error (&_data_->_inner_error_);
 
493
#line 90 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
357
494
                return FALSE;
 
495
#line 496 "removing-contacts.c"
358
496
        }
 
497
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
359
498
        _g_object_unref0 (_data_->store);
 
499
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
360
500
        if (_data_->_state_ == 0) {
 
501
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
361
502
                g_simple_async_result_complete_in_idle (_data_->_async_result);
 
503
#line 504 "removing-contacts.c"
362
504
        } else {
 
505
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
363
506
                g_simple_async_result_complete (_data_->_async_result);
 
507
#line 508 "removing-contacts.c"
364
508
        }
 
509
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
365
510
        g_object_unref (_data_->_async_result);
 
511
#line 81 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
366
512
        return FALSE;
 
513
#line 514 "removing-contacts.c"
367
514
}
368
515
 
369
516
 
370
517
static void _removing_contacts_tests_individuals_changed_cb (RemovingContactsTests* self, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason) {
 
518
#line 100 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
371
519
        g_return_if_fail (self != NULL);
 
520
#line 100 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
372
521
        g_return_if_fail (added != NULL);
 
522
#line 100 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
373
523
        g_return_if_fail (removed != NULL);
 
524
#line 525 "removing-contacts.c"
374
525
        {
375
526
                GeeSet* _tmp0_;
376
527
                GeeIterator* _tmp1_ = NULL;
377
528
                GeeIterator* _i_it;
 
529
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
378
530
                _tmp0_ = added;
 
531
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
379
532
                _tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
 
533
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
380
534
                _i_it = _tmp1_;
 
535
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
381
536
                while (TRUE) {
 
537
#line 538 "removing-contacts.c"
382
538
                        GeeIterator* _tmp2_;
383
539
                        gboolean _tmp3_ = FALSE;
384
540
                        GeeIterator* _tmp4_;
391
547
                        const gchar* _tmp9_;
392
548
                        const gchar* _tmp10_;
393
549
                        EdsTestBackend* _tmp11_;
 
550
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
394
551
                        _tmp2_ = _i_it;
 
552
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
395
553
                        _tmp3_ = gee_iterator_next (_tmp2_);
 
554
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
396
555
                        if (!_tmp3_) {
 
556
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
397
557
                                break;
 
558
#line 559 "removing-contacts.c"
398
559
                        }
 
560
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
399
561
                        _tmp4_ = _i_it;
 
562
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
400
563
                        _tmp5_ = gee_iterator_get (_tmp4_);
 
564
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
401
565
                        i = (FolksIndividual*) _tmp5_;
 
566
#line 109 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
402
567
                        _tmp6_ = i;
 
568
#line 109 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
403
569
                        _tmp7_ = _g_object_ref0 (FOLKS_NAME_DETAILS (_tmp6_));
 
570
#line 109 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
404
571
                        name = _tmp7_;
 
572
#line 110 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
405
573
                        self->priv->_added = TRUE;
 
574
#line 111 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
406
575
                        _tmp8_ = name;
 
576
#line 111 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
407
577
                        _tmp9_ = folks_name_details_get_full_name (_tmp8_);
 
578
#line 111 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
408
579
                        _tmp10_ = _tmp9_;
 
580
#line 111 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
409
581
                        g_assert (g_strcmp0 (_tmp10_, "bernie h. innocenti") == 0);
 
582
#line 112 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
410
583
                        _tmp11_ = self->priv->_eds_backend;
 
584
#line 112 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
411
585
                        eds_test_backend_remove_contact (_tmp11_, 0, NULL, NULL);
 
586
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
412
587
                        _g_object_unref0 (name);
 
588
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
413
589
                        _g_object_unref0 (i);
 
590
#line 591 "removing-contacts.c"
414
591
                }
 
592
#line 107 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
415
593
                _g_object_unref0 (_i_it);
 
594
#line 595 "removing-contacts.c"
416
595
        }
417
596
        {
418
597
                GeeSet* _tmp12_;
419
598
                GeeIterator* _tmp13_ = NULL;
420
599
                GeeIterator* _i_it;
 
600
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
421
601
                _tmp12_ = removed;
 
602
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
422
603
                _tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
 
604
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
423
605
                _i_it = _tmp13_;
 
606
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
424
607
                while (TRUE) {
 
608
#line 609 "removing-contacts.c"
425
609
                        GeeIterator* _tmp14_;
426
610
                        gboolean _tmp15_ = FALSE;
427
611
                        GeeIterator* _tmp16_;
434
618
                        const gchar* _tmp21_;
435
619
                        const gchar* _tmp22_;
436
620
                        GMainLoop* _tmp23_;
 
621
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
437
622
                        _tmp14_ = _i_it;
 
623
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
438
624
                        _tmp15_ = gee_iterator_next (_tmp14_);
 
625
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
439
626
                        if (!_tmp15_) {
 
627
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
440
628
                                break;
 
629
#line 630 "removing-contacts.c"
441
630
                        }
 
631
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
442
632
                        _tmp16_ = _i_it;
 
633
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
443
634
                        _tmp17_ = gee_iterator_get (_tmp16_);
 
635
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
444
636
                        i = (FolksIndividual*) _tmp17_;
 
637
#line 117 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
445
638
                        _tmp18_ = i;
 
639
#line 117 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
446
640
                        _tmp19_ = _g_object_ref0 (FOLKS_NAME_DETAILS (_tmp18_));
 
641
#line 117 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
447
642
                        name = _tmp19_;
 
643
#line 118 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
448
644
                        _tmp20_ = name;
 
645
#line 118 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
449
646
                        _tmp21_ = folks_name_details_get_full_name (_tmp20_);
 
647
#line 118 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
450
648
                        _tmp22_ = _tmp21_;
 
649
#line 118 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
451
650
                        g_assert (g_strcmp0 (_tmp22_, "bernie h. innocenti") == 0);
 
651
#line 119 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
452
652
                        self->priv->_removed = TRUE;
 
653
#line 120 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
453
654
                        _tmp23_ = self->priv->_main_loop;
 
655
#line 120 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
454
656
                        g_main_loop_quit (_tmp23_);
 
657
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
455
658
                        _g_object_unref0 (name);
 
659
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
456
660
                        _g_object_unref0 (i);
 
661
#line 662 "removing-contacts.c"
457
662
                }
 
663
#line 115 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
458
664
                _g_object_unref0 (_i_it);
 
665
#line 666 "removing-contacts.c"
459
666
        }
460
667
}
461
668
 
462
669
 
463
670
static void removing_contacts_tests_class_init (RemovingContactsTestsClass * klass) {
 
671
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
464
672
        removing_contacts_tests_parent_class = g_type_class_peek_parent (klass);
 
673
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
465
674
        g_type_class_add_private (klass, sizeof (RemovingContactsTestsPrivate));
 
675
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
466
676
        FOLKS_TEST_CASE_CLASS (klass)->set_up = removing_contacts_tests_real_set_up;
 
677
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
467
678
        FOLKS_TEST_CASE_CLASS (klass)->tear_down = removing_contacts_tests_real_tear_down;
 
679
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
468
680
        G_OBJECT_CLASS (klass)->finalize = removing_contacts_tests_finalize;
 
681
#line 682 "removing-contacts.c"
469
682
}
470
683
 
471
684
 
472
685
static void removing_contacts_tests_instance_init (RemovingContactsTests * self) {
 
686
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
473
687
        self->priv = REMOVING_CONTACTS_TESTS_GET_PRIVATE (self);
 
688
#line 689 "removing-contacts.c"
474
689
}
475
690
 
476
691
 
477
692
static void removing_contacts_tests_finalize (GObject* obj) {
478
693
        RemovingContactsTests * self;
 
694
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
479
695
        self = REMOVING_CONTACTS_TESTS (obj);
 
696
#line 27 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
480
697
        _eds_test_backend_unref0 (self->priv->_eds_backend);
 
698
#line 28 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
481
699
        _g_object_unref0 (self->priv->_aggregator);
 
700
#line 29 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
482
701
        _g_main_loop_unref0 (self->priv->_main_loop);
 
702
#line 25 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
483
703
        G_OBJECT_CLASS (removing_contacts_tests_parent_class)->finalize (obj);
 
704
#line 705 "removing-contacts.c"
484
705
}
485
706
 
486
707
 
500
721
        gint result = 0;
501
722
        GTestSuite* _tmp0_ = NULL;
502
723
        GTestSuite* root;
503
 
        GTestSuite* _tmp1_;
 
724
        RemovingContactsTests* _tmp1_;
504
725
        RemovingContactsTests* _tmp2_;
505
 
        RemovingContactsTests* _tmp3_;
506
 
        GTestSuite* _tmp4_ = NULL;
 
726
        GTestSuite* _tmp3_ = NULL;
 
727
#line 127 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
507
728
        g_test_init (&args_length1, &args, NULL);
 
729
#line 129 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
508
730
        _tmp0_ = g_test_get_root ();
 
731
#line 129 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
509
732
        root = _tmp0_;
510
 
        _tmp1_ = root;
511
 
        _tmp2_ = removing_contacts_tests_new ();
512
 
        _tmp3_ = _tmp2_;
513
 
        _tmp4_ = folks_test_case_get_suite ((FolksTestCase*) _tmp3_);
514
 
        g_test_suite_add_suite (_tmp1_, _tmp4_);
515
 
        _g_object_unref0 (_tmp3_);
 
733
#line 130 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
734
        _tmp1_ = removing_contacts_tests_new ();
 
735
#line 130 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
736
        _tmp2_ = _tmp1_;
 
737
#line 130 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
738
        _tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
 
739
#line 130 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
740
        g_test_suite_add_suite (root, _tmp3_);
 
741
#line 130 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
 
742
        _g_object_unref0 (_tmp2_);
 
743
#line 132 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
516
744
        g_test_run ();
 
745
#line 134 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
517
746
        result = 0;
 
747
#line 134 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
518
748
        return result;
 
749
#line 750 "removing-contacts.c"
519
750
}
520
751
 
521
752
 
522
753
int main (int argc, char ** argv) {
 
754
#line 125 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
523
755
        g_type_init ();
 
756
#line 125 "/debian/rgs/devel/folks/tests/eds/removing-contacts.vala"
524
757
        return _vala_main (argv, argc);
 
758
#line 759 "removing-contacts.c"
525
759
}
526
760
 
527
761