File: testcase.c

package info (click to toggle)
rpl 2.0.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 6,700 kB
  • sloc: ansic: 47,076; sh: 8,700; makefile: 79
file content (963 lines) | stat: -rw-r--r-- 32,696 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
/* testcase.c generated by valac 0.56.18, the Vala compiler
 * generated from testcase.vala, do not modify */

/* testcase.vala
 *
 * Copyright (C) 2009 Julien Peeters
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Julien Peeters <contact@julienpeeters.fr>
 */

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_GEE_TEST_CASE (gee_test_case_get_type ())
#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GEE_TEST_CASE, GeeTestCase))
#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GEE_TEST_CASE, GeeTestCaseClass))
#define IS_GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GEE_TEST_CASE))
#define IS_GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GEE_TEST_CASE))
#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GEE_TEST_CASE, GeeTestCaseClass))

typedef struct _GeeTestCase GeeTestCase;
typedef struct _GeeTestCaseClass GeeTestCaseClass;
typedef struct _GeeTestCasePrivate GeeTestCasePrivate;

#define GEE_TEST_CASE_TYPE_ADAPTOR (gee_test_case_adaptor_get_type ())
#define GEE_TEST_CASE_ADAPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TEST_CASE_TYPE_ADAPTOR, GeeTestCaseAdaptor))
#define GEE_TEST_CASE_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TEST_CASE_TYPE_ADAPTOR, GeeTestCaseAdaptorClass))
#define GEE_TEST_CASE_IS_ADAPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TEST_CASE_TYPE_ADAPTOR))
#define GEE_TEST_CASE_IS_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TEST_CASE_TYPE_ADAPTOR))
#define GEE_TEST_CASE_ADAPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TEST_CASE_TYPE_ADAPTOR, GeeTestCaseAdaptorClass))

typedef struct _GeeTestCaseAdaptor GeeTestCaseAdaptor;
typedef struct _GeeTestCaseAdaptorClass GeeTestCaseAdaptorClass;
enum  {
	GEE_TEST_CASE_0_PROPERTY,
	GEE_TEST_CASE_NUM_PROPERTIES
};
static GParamSpec* gee_test_case_properties[GEE_TEST_CASE_NUM_PROPERTIES];
typedef void (*GeeTestCaseTestMethod) (gpointer user_data);
#define _gee_test_case_adaptor_unref0(var) ((var == NULL) ? NULL : (var = (gee_test_case_adaptor_unref (var), NULL)))
typedef struct _GeeTestCaseAdaptorPrivate GeeTestCaseAdaptorPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _GeeTestCaseParamSpecAdaptor GeeTestCaseParamSpecAdaptor;

struct _GeeTestCase {
	GObject parent_instance;
	GeeTestCasePrivate * priv;
};

struct _GeeTestCaseClass {
	GObjectClass parent_class;
	void (*set_up) (GeeTestCase* self);
	void (*tear_down) (GeeTestCase* self);
};

struct _GeeTestCasePrivate {
	GTestSuite* suite;
	GeeTestCaseAdaptor** adaptors;
	gint adaptors_length1;
	gint _adaptors_size_;
};

struct _GeeTestCaseAdaptor {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GeeTestCaseAdaptorPrivate * priv;
};

struct _GeeTestCaseAdaptorClass {
	GTypeClass parent_class;
	void (*finalize) (GeeTestCaseAdaptor *self);
};

struct _GeeTestCaseAdaptorPrivate {
	gchar* _name;
	GeeTestCaseTestMethod test;
	gpointer test_target;
	GDestroyNotify test_target_destroy_notify;
	GeeTestCase* test_case;
};

struct _GeeTestCaseParamSpecAdaptor {
	GParamSpec parent_instance;
};

static gint GeeTestCase_private_offset;
static gpointer gee_test_case_parent_class = NULL;
static gint GeeTestCaseAdaptor_private_offset;
static gpointer gee_test_case_adaptor_parent_class = NULL;

VALA_EXTERN GType gee_test_case_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCase, g_object_unref)
static gpointer gee_test_case_adaptor_ref (gpointer instance);
static void gee_test_case_adaptor_unref (gpointer instance);
static GParamSpec* gee_test_case_param_spec_adaptor (const gchar* name,
                                              const gchar* nick,
                                              const gchar* blurb,
                                              GType object_type,
                                              GParamFlags flags) G_GNUC_UNUSED ;
static void gee_test_case_value_set_adaptor (GValue* value,
                                      gpointer v_object) G_GNUC_UNUSED ;
static void gee_test_case_value_take_adaptor (GValue* value,
                                       gpointer v_object) G_GNUC_UNUSED ;
static gpointer gee_test_case_value_get_adaptor (const GValue* value) G_GNUC_UNUSED ;
static GType gee_test_case_adaptor_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCaseAdaptor, gee_test_case_adaptor_unref)
VALA_EXTERN void gee_test_case_set_up (GeeTestCase* self);
VALA_EXTERN void gee_test_case_tear_down (GeeTestCase* self);
VALA_EXTERN GeeTestCase* gee_test_case_construct (GType object_type,
                                      const gchar* name);
VALA_EXTERN void gee_test_case_add_test (GeeTestCase* self,
                             const gchar* name,
                             GeeTestCaseTestMethod test,
                             gpointer test_target,
                             GDestroyNotify test_target_destroy_notify);
static GeeTestCaseAdaptor* gee_test_case_adaptor_new (const gchar* name,
                                               GeeTestCaseTestMethod test,
                                               gpointer test_target,
                                               GDestroyNotify test_target_destroy_notify,
                                               GeeTestCase* test_case);
static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type,
                                                     const gchar* name,
                                                     GeeTestCaseTestMethod test,
                                                     gpointer test_target,
                                                     GDestroyNotify test_target_destroy_notify,
                                                     GeeTestCase* test_case);
static void _vala_array_add1 (GeeTestCaseAdaptor** * array,
                       gint* length,
                       gint* size,
                       GeeTestCaseAdaptor* value);
static const gchar* gee_test_case_adaptor_get_name (GeeTestCaseAdaptor* self);
static void gee_test_case_adaptor_set_up (GeeTestCaseAdaptor* self,
                                   void* fixture);
static void _gee_test_case_adaptor_set_up_gtest_fixture_func (void* fixture,
                                                       gpointer self);
static void gee_test_case_adaptor_run (GeeTestCaseAdaptor* self,
                                void* fixture);
static void _gee_test_case_adaptor_run_gtest_fixture_func (void* fixture,
                                                    gpointer self);
static void gee_test_case_adaptor_tear_down (GeeTestCaseAdaptor* self,
                                      void* fixture);
static void _gee_test_case_adaptor_tear_down_gtest_fixture_func (void* fixture,
                                                          gpointer self);
static void gee_test_case_real_set_up (GeeTestCase* self);
static void gee_test_case_real_tear_down (GeeTestCase* self);
VALA_EXTERN GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
static void gee_test_case_adaptor_set_name (GeeTestCaseAdaptor* self,
                                     const gchar* value);
static void gee_test_case_adaptor_finalize (GeeTestCaseAdaptor * obj);
static GType gee_test_case_adaptor_get_type_once (void);
static void gee_test_case_finalize (GObject * obj);
static GType gee_test_case_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
gee_test_case_get_instance_private (GeeTestCase* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTestCase_private_offset);
}

GeeTestCase*
gee_test_case_construct (GType object_type,
                         const gchar* name)
{
	GeeTestCase * self = NULL;
	GTestSuite* _tmp0_;
#line 30 "testcase.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 30 "testcase.vala"
	self = (GeeTestCase*) g_object_new (object_type, NULL);
#line 31 "testcase.vala"
	_tmp0_ = g_test_create_suite (name);
#line 31 "testcase.vala"
	self->priv->suite = _tmp0_;
#line 30 "testcase.vala"
	return self;
#line 220 "testcase.c"
}

static gpointer
_gee_test_case_adaptor_ref0 (gpointer self)
{
#line 36 "testcase.vala"
	return self ? gee_test_case_adaptor_ref (self) : NULL;
#line 228 "testcase.c"
}

static void
_vala_array_add1 (GeeTestCaseAdaptor** * array,
                  gint* length,
                  gint* size,
                  GeeTestCaseAdaptor* value)
{
#line 36 "testcase.vala"
	if ((*length) == (*size)) {
#line 36 "testcase.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 36 "testcase.vala"
		*array = g_renew (GeeTestCaseAdaptor*, *array, (*size) + 1);
#line 243 "testcase.c"
	}
#line 36 "testcase.vala"
	(*array)[(*length)++] = value;
#line 36 "testcase.vala"
	(*array)[*length] = NULL;
#line 249 "testcase.c"
}

static void
_gee_test_case_adaptor_set_up_gtest_fixture_func (void* fixture,
                                                  gpointer self)
{
#line 38 "testcase.vala"
	gee_test_case_adaptor_set_up ((GeeTestCaseAdaptor*) self, fixture);
#line 258 "testcase.c"
}

static void
_gee_test_case_adaptor_run_gtest_fixture_func (void* fixture,
                                               gpointer self)
{
#line 38 "testcase.vala"
	gee_test_case_adaptor_run ((GeeTestCaseAdaptor*) self, fixture);
#line 267 "testcase.c"
}

static void
_gee_test_case_adaptor_tear_down_gtest_fixture_func (void* fixture,
                                                     gpointer self)
{
#line 38 "testcase.vala"
	gee_test_case_adaptor_tear_down ((GeeTestCaseAdaptor*) self, fixture);
#line 276 "testcase.c"
}

void
gee_test_case_add_test (GeeTestCase* self,
                        const gchar* name,
                        GeeTestCaseTestMethod test,
                        gpointer test_target,
                        GDestroyNotify test_target_destroy_notify)
{
	GeeTestCaseAdaptor* adaptor = NULL;
	GeeTestCaseTestMethod _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	GeeTestCaseAdaptor* _tmp1_;
	GeeTestCaseAdaptor* _tmp2_;
	GTestSuite* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GTestCase* _tmp6_;
#line 34 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 34 "testcase.vala"
	g_return_if_fail (name != NULL);
#line 35 "testcase.vala"
	_tmp0_ = test;
#line 35 "testcase.vala"
	_tmp0__target = test_target;
#line 35 "testcase.vala"
	_tmp0__target_destroy_notify = test_target_destroy_notify;
#line 35 "testcase.vala"
	test = NULL;
#line 35 "testcase.vala"
	test_target = NULL;
#line 35 "testcase.vala"
	test_target_destroy_notify = NULL;
#line 35 "testcase.vala"
	_tmp1_ = gee_test_case_adaptor_new (name, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify, self);
#line 35 "testcase.vala"
	adaptor = _tmp1_;
#line 36 "testcase.vala"
	_tmp2_ = _gee_test_case_adaptor_ref0 (adaptor);
#line 36 "testcase.vala"
	_vala_array_add1 (&self->priv->adaptors, &self->priv->adaptors_length1, &self->priv->_adaptors_size_, _tmp2_);
#line 38 "testcase.vala"
	_tmp3_ = self->priv->suite;
#line 38 "testcase.vala"
	_tmp4_ = gee_test_case_adaptor_get_name (adaptor);
#line 38 "testcase.vala"
	_tmp5_ = _tmp4_;
#line 38 "testcase.vala"
	_tmp6_ = g_test_create_case (_tmp5_, (gsize) 0, adaptor, _gee_test_case_adaptor_set_up_gtest_fixture_func, _gee_test_case_adaptor_run_gtest_fixture_func, _gee_test_case_adaptor_tear_down_gtest_fixture_func);
#line 38 "testcase.vala"
	g_test_suite_add (_tmp3_, _tmp6_);
#line 34 "testcase.vala"
	_gee_test_case_adaptor_unref0 (adaptor);
#line 34 "testcase.vala"
	(test_target_destroy_notify == NULL) ? NULL : (test_target_destroy_notify (test_target), NULL);
#line 34 "testcase.vala"
	test = NULL;
#line 34 "testcase.vala"
	test_target = NULL;
#line 34 "testcase.vala"
	test_target_destroy_notify = NULL;
#line 340 "testcase.c"
}

static void
gee_test_case_real_set_up (GeeTestCase* self)
{
}

void
gee_test_case_set_up (GeeTestCase* self)
{
	GeeTestCaseClass* _klass_;
#line 44 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 44 "testcase.vala"
	_klass_ = GEE_TEST_CASE_GET_CLASS (self);
#line 44 "testcase.vala"
	if (_klass_->set_up) {
#line 44 "testcase.vala"
		_klass_->set_up (self);
#line 360 "testcase.c"
	}
}

static void
gee_test_case_real_tear_down (GeeTestCase* self)
{
}

void
gee_test_case_tear_down (GeeTestCase* self)
{
	GeeTestCaseClass* _klass_;
#line 47 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 47 "testcase.vala"
	_klass_ = GEE_TEST_CASE_GET_CLASS (self);
#line 47 "testcase.vala"
	if (_klass_->tear_down) {
#line 47 "testcase.vala"
		_klass_->tear_down (self);
#line 381 "testcase.c"
	}
}

GTestSuite*
gee_test_case_get_suite (GeeTestCase* self)
{
	GTestSuite* _tmp0_;
	GTestSuite* result;
#line 50 "testcase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 51 "testcase.vala"
	_tmp0_ = self->priv->suite;
#line 51 "testcase.vala"
	result = _tmp0_;
#line 51 "testcase.vala"
	return result;
#line 398 "testcase.c"
}

static inline gpointer
gee_test_case_adaptor_get_instance_private (GeeTestCaseAdaptor* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTestCaseAdaptor_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
#line 65 "testcase.vala"
	return self ? g_object_ref (self) : NULL;
#line 412 "testcase.c"
}

static GeeTestCaseAdaptor*
gee_test_case_adaptor_construct (GType object_type,
                                 const gchar* name,
                                 GeeTestCaseTestMethod test,
                                 gpointer test_target,
                                 GDestroyNotify test_target_destroy_notify,
                                 GeeTestCase* test_case)
{
	GeeTestCaseAdaptor* self = NULL;
	GeeTestCaseTestMethod _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	GeeTestCase* _tmp1_;
#line 60 "testcase.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 60 "testcase.vala"
	g_return_val_if_fail (test_case != NULL, NULL);
#line 60 "testcase.vala"
	self = (GeeTestCaseAdaptor*) g_type_create_instance (object_type);
#line 63 "testcase.vala"
	gee_test_case_adaptor_set_name (self, name);
#line 64 "testcase.vala"
	_tmp0_ = test;
#line 64 "testcase.vala"
	_tmp0__target = test_target;
#line 64 "testcase.vala"
	_tmp0__target_destroy_notify = test_target_destroy_notify;
#line 64 "testcase.vala"
	test = NULL;
#line 64 "testcase.vala"
	test_target = NULL;
#line 64 "testcase.vala"
	test_target_destroy_notify = NULL;
#line 64 "testcase.vala"
	(self->priv->test_target_destroy_notify == NULL) ? NULL : (self->priv->test_target_destroy_notify (self->priv->test_target), NULL);
#line 64 "testcase.vala"
	self->priv->test = NULL;
#line 64 "testcase.vala"
	self->priv->test_target = NULL;
#line 64 "testcase.vala"
	self->priv->test_target_destroy_notify = NULL;
#line 64 "testcase.vala"
	self->priv->test = _tmp0_;
#line 64 "testcase.vala"
	self->priv->test_target = _tmp0__target;
#line 64 "testcase.vala"
	self->priv->test_target_destroy_notify = _tmp0__target_destroy_notify;
#line 65 "testcase.vala"
	_tmp1_ = _g_object_ref0 (test_case);
#line 65 "testcase.vala"
	_g_object_unref0 (self->priv->test_case);
#line 65 "testcase.vala"
	self->priv->test_case = _tmp1_;
#line 60 "testcase.vala"
	(test_target_destroy_notify == NULL) ? NULL : (test_target_destroy_notify (test_target), NULL);
#line 60 "testcase.vala"
	test = NULL;
#line 60 "testcase.vala"
	test_target = NULL;
#line 60 "testcase.vala"
	test_target_destroy_notify = NULL;
#line 60 "testcase.vala"
	return self;
#line 478 "testcase.c"
}

static GeeTestCaseAdaptor*
gee_test_case_adaptor_new (const gchar* name,
                           GeeTestCaseTestMethod test,
                           gpointer test_target,
                           GDestroyNotify test_target_destroy_notify,
                           GeeTestCase* test_case)
{
#line 60 "testcase.vala"
	return gee_test_case_adaptor_construct (GEE_TEST_CASE_TYPE_ADAPTOR, name, test, test_target, test_target_destroy_notify, test_case);
#line 490 "testcase.c"
}

static void
gee_test_case_adaptor_set_up (GeeTestCaseAdaptor* self,
                              void* fixture)
{
	GeeTestCase* _tmp0_;
#line 68 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 69 "testcase.vala"
	_tmp0_ = self->priv->test_case;
#line 69 "testcase.vala"
	gee_test_case_set_up (_tmp0_);
#line 504 "testcase.c"
}

static void
gee_test_case_adaptor_run (GeeTestCaseAdaptor* self,
                           void* fixture)
{
	GeeTestCaseTestMethod _tmp0_;
	gpointer _tmp0__target;
#line 72 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 73 "testcase.vala"
	_tmp0_ = self->priv->test;
#line 73 "testcase.vala"
	_tmp0__target = self->priv->test_target;
#line 73 "testcase.vala"
	_tmp0_ (_tmp0__target);
#line 521 "testcase.c"
}

static void
gee_test_case_adaptor_tear_down (GeeTestCaseAdaptor* self,
                                 void* fixture)
{
	GeeTestCase* _tmp0_;
#line 76 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 77 "testcase.vala"
	_tmp0_ = self->priv->test_case;
#line 77 "testcase.vala"
	gee_test_case_tear_down (_tmp0_);
#line 535 "testcase.c"
}

static const gchar*
gee_test_case_adaptor_get_name (GeeTestCaseAdaptor* self)
{
	const gchar* result;
	const gchar* _tmp0_;
#line 56 "testcase.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 56 "testcase.vala"
	_tmp0_ = self->priv->_name;
#line 56 "testcase.vala"
	result = _tmp0_;
#line 56 "testcase.vala"
	return result;
#line 551 "testcase.c"
}

static void
gee_test_case_adaptor_set_name (GeeTestCaseAdaptor* self,
                                const gchar* value)
{
	gchar* _tmp0_;
#line 56 "testcase.vala"
	g_return_if_fail (self != NULL);
#line 56 "testcase.vala"
	_tmp0_ = g_strdup (value);
#line 56 "testcase.vala"
	_g_free0 (self->priv->_name);
#line 56 "testcase.vala"
	self->priv->_name = _tmp0_;
#line 567 "testcase.c"
}

static void
gee_test_case_value_adaptor_init (GValue* value)
{
#line 54 "testcase.vala"
	value->data[0].v_pointer = NULL;
#line 575 "testcase.c"
}

static void
gee_test_case_value_adaptor_free_value (GValue* value)
{
#line 54 "testcase.vala"
	if (value->data[0].v_pointer) {
#line 54 "testcase.vala"
		gee_test_case_adaptor_unref (value->data[0].v_pointer);
#line 585 "testcase.c"
	}
}

static void
gee_test_case_value_adaptor_copy_value (const GValue* src_value,
                                        GValue* dest_value)
{
#line 54 "testcase.vala"
	if (src_value->data[0].v_pointer) {
#line 54 "testcase.vala"
		dest_value->data[0].v_pointer = gee_test_case_adaptor_ref (src_value->data[0].v_pointer);
#line 597 "testcase.c"
	} else {
#line 54 "testcase.vala"
		dest_value->data[0].v_pointer = NULL;
#line 601 "testcase.c"
	}
}

static gpointer
gee_test_case_value_adaptor_peek_pointer (const GValue* value)
{
#line 54 "testcase.vala"
	return value->data[0].v_pointer;
#line 610 "testcase.c"
}

static gchar*
gee_test_case_value_adaptor_collect_value (GValue* value,
                                           guint n_collect_values,
                                           GTypeCValue* collect_values,
                                           guint collect_flags)
{
#line 54 "testcase.vala"
	if (collect_values[0].v_pointer) {
#line 621 "testcase.c"
		GeeTestCaseAdaptor * object;
		object = collect_values[0].v_pointer;
#line 54 "testcase.vala"
		if (object->parent_instance.g_class == NULL) {
#line 54 "testcase.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 628 "testcase.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 54 "testcase.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 632 "testcase.c"
		}
#line 54 "testcase.vala"
		value->data[0].v_pointer = gee_test_case_adaptor_ref (object);
#line 636 "testcase.c"
	} else {
#line 54 "testcase.vala"
		value->data[0].v_pointer = NULL;
#line 640 "testcase.c"
	}
#line 54 "testcase.vala"
	return NULL;
#line 644 "testcase.c"
}

static gchar*
gee_test_case_value_adaptor_lcopy_value (const GValue* value,
                                         guint n_collect_values,
                                         GTypeCValue* collect_values,
                                         guint collect_flags)
{
	GeeTestCaseAdaptor ** object_p;
	object_p = collect_values[0].v_pointer;
#line 54 "testcase.vala"
	if (!object_p) {
#line 54 "testcase.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 659 "testcase.c"
	}
#line 54 "testcase.vala"
	if (!value->data[0].v_pointer) {
#line 54 "testcase.vala"
		*object_p = NULL;
#line 665 "testcase.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 54 "testcase.vala"
		*object_p = value->data[0].v_pointer;
#line 669 "testcase.c"
	} else {
#line 54 "testcase.vala"
		*object_p = gee_test_case_adaptor_ref (value->data[0].v_pointer);
#line 673 "testcase.c"
	}
#line 54 "testcase.vala"
	return NULL;
#line 677 "testcase.c"
}

static GParamSpec*
gee_test_case_param_spec_adaptor (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags)
{
	GeeTestCaseParamSpecAdaptor* spec;
#line 54 "testcase.vala"
	g_return_val_if_fail (g_type_is_a (object_type, GEE_TEST_CASE_TYPE_ADAPTOR), NULL);
#line 54 "testcase.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 54 "testcase.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 54 "testcase.vala"
	return G_PARAM_SPEC (spec);
#line 696 "testcase.c"
}

static gpointer
gee_test_case_value_get_adaptor (const GValue* value)
{
#line 54 "testcase.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TEST_CASE_TYPE_ADAPTOR), NULL);
#line 54 "testcase.vala"
	return value->data[0].v_pointer;
#line 706 "testcase.c"
}

static void
gee_test_case_value_set_adaptor (GValue* value,
                                 gpointer v_object)
{
	GeeTestCaseAdaptor * old;
#line 54 "testcase.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TEST_CASE_TYPE_ADAPTOR));
#line 54 "testcase.vala"
	old = value->data[0].v_pointer;
#line 54 "testcase.vala"
	if (v_object) {
#line 54 "testcase.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GEE_TEST_CASE_TYPE_ADAPTOR));
#line 54 "testcase.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 54 "testcase.vala"
		value->data[0].v_pointer = v_object;
#line 54 "testcase.vala"
		gee_test_case_adaptor_ref (value->data[0].v_pointer);
#line 728 "testcase.c"
	} else {
#line 54 "testcase.vala"
		value->data[0].v_pointer = NULL;
#line 732 "testcase.c"
	}
#line 54 "testcase.vala"
	if (old) {
#line 54 "testcase.vala"
		gee_test_case_adaptor_unref (old);
#line 738 "testcase.c"
	}
}

static void
gee_test_case_value_take_adaptor (GValue* value,
                                  gpointer v_object)
{
	GeeTestCaseAdaptor * old;
#line 54 "testcase.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TEST_CASE_TYPE_ADAPTOR));
#line 54 "testcase.vala"
	old = value->data[0].v_pointer;
#line 54 "testcase.vala"
	if (v_object) {
#line 54 "testcase.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GEE_TEST_CASE_TYPE_ADAPTOR));
#line 54 "testcase.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 54 "testcase.vala"
		value->data[0].v_pointer = v_object;
#line 759 "testcase.c"
	} else {
#line 54 "testcase.vala"
		value->data[0].v_pointer = NULL;
#line 763 "testcase.c"
	}
#line 54 "testcase.vala"
	if (old) {
#line 54 "testcase.vala"
		gee_test_case_adaptor_unref (old);
#line 769 "testcase.c"
	}
}

static void
gee_test_case_adaptor_class_init (GeeTestCaseAdaptorClass * klass,
                                  gpointer klass_data)
{
#line 54 "testcase.vala"
	gee_test_case_adaptor_parent_class = g_type_class_peek_parent (klass);
#line 54 "testcase.vala"
	((GeeTestCaseAdaptorClass *) klass)->finalize = gee_test_case_adaptor_finalize;
#line 54 "testcase.vala"
	g_type_class_adjust_private_offset (klass, &GeeTestCaseAdaptor_private_offset);
#line 783 "testcase.c"
}

static void
gee_test_case_adaptor_instance_init (GeeTestCaseAdaptor * self,
                                     gpointer klass)
{
#line 54 "testcase.vala"
	self->priv = gee_test_case_adaptor_get_instance_private (self);
#line 54 "testcase.vala"
	self->ref_count = 1;
#line 794 "testcase.c"
}

static void
gee_test_case_adaptor_finalize (GeeTestCaseAdaptor * obj)
{
	GeeTestCaseAdaptor * self;
#line 54 "testcase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TEST_CASE_TYPE_ADAPTOR, GeeTestCaseAdaptor);
#line 54 "testcase.vala"
	g_signal_handlers_destroy (self);
#line 56 "testcase.vala"
	_g_free0 (self->priv->_name);
#line 57 "testcase.vala"
	(self->priv->test_target_destroy_notify == NULL) ? NULL : (self->priv->test_target_destroy_notify (self->priv->test_target), NULL);
#line 57 "testcase.vala"
	self->priv->test = NULL;
#line 57 "testcase.vala"
	self->priv->test_target = NULL;
#line 57 "testcase.vala"
	self->priv->test_target_destroy_notify = NULL;
#line 58 "testcase.vala"
	_g_object_unref0 (self->priv->test_case);
#line 817 "testcase.c"
}

static GType
gee_test_case_adaptor_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { gee_test_case_value_adaptor_init, gee_test_case_value_adaptor_free_value, gee_test_case_value_adaptor_copy_value, gee_test_case_value_adaptor_peek_pointer, "p", gee_test_case_value_adaptor_collect_value, "p", gee_test_case_value_adaptor_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (GeeTestCaseAdaptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_test_case_adaptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTestCaseAdaptor), 0, (GInstanceInitFunc) gee_test_case_adaptor_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType gee_test_case_adaptor_type_id;
	gee_test_case_adaptor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GeeTestCaseAdaptor", &g_define_type_info, &g_define_type_fundamental_info, 0);
	GeeTestCaseAdaptor_private_offset = g_type_add_instance_private (gee_test_case_adaptor_type_id, sizeof (GeeTestCaseAdaptorPrivate));
	return gee_test_case_adaptor_type_id;
}

static GType
gee_test_case_adaptor_get_type (void)
{
	static volatile gsize gee_test_case_adaptor_type_id__once = 0;
	if (g_once_init_enter (&gee_test_case_adaptor_type_id__once)) {
		GType gee_test_case_adaptor_type_id;
		gee_test_case_adaptor_type_id = gee_test_case_adaptor_get_type_once ();
		g_once_init_leave (&gee_test_case_adaptor_type_id__once, gee_test_case_adaptor_type_id);
	}
	return gee_test_case_adaptor_type_id__once;
}

static gpointer
gee_test_case_adaptor_ref (gpointer instance)
{
	GeeTestCaseAdaptor * self;
	self = instance;
#line 54 "testcase.vala"
	g_atomic_int_inc (&self->ref_count);
#line 54 "testcase.vala"
	return instance;
#line 853 "testcase.c"
}

static void
gee_test_case_adaptor_unref (gpointer instance)
{
	GeeTestCaseAdaptor * self;
	self = instance;
#line 54 "testcase.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 54 "testcase.vala"
		GEE_TEST_CASE_ADAPTOR_GET_CLASS (self)->finalize (self);
#line 54 "testcase.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 867 "testcase.c"
	}
}

static void
gee_test_case_class_init (GeeTestCaseClass * klass,
                          gpointer klass_data)
{
#line 23 "testcase.vala"
	gee_test_case_parent_class = g_type_class_peek_parent (klass);
#line 23 "testcase.vala"
	g_type_class_adjust_private_offset (klass, &GeeTestCase_private_offset);
#line 23 "testcase.vala"
	((GeeTestCaseClass *) klass)->set_up = (void (*) (GeeTestCase*)) gee_test_case_real_set_up;
#line 23 "testcase.vala"
	((GeeTestCaseClass *) klass)->tear_down = (void (*) (GeeTestCase*)) gee_test_case_real_tear_down;
#line 23 "testcase.vala"
	G_OBJECT_CLASS (klass)->finalize = gee_test_case_finalize;
#line 885 "testcase.c"
}

static void
gee_test_case_instance_init (GeeTestCase * self,
                             gpointer klass)
{
	GeeTestCaseAdaptor** _tmp0_;
#line 23 "testcase.vala"
	self->priv = gee_test_case_get_instance_private (self);
#line 26 "testcase.vala"
	_tmp0_ = g_new0 (GeeTestCaseAdaptor*, 0 + 1);
#line 26 "testcase.vala"
	self->priv->adaptors = _tmp0_;
#line 26 "testcase.vala"
	self->priv->adaptors_length1 = 0;
#line 26 "testcase.vala"
	self->priv->_adaptors_size_ = self->priv->adaptors_length1;
#line 903 "testcase.c"
}

static void
gee_test_case_finalize (GObject * obj)
{
	GeeTestCase * self;
#line 23 "testcase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GEE_TEST_CASE, GeeTestCase);
#line 26 "testcase.vala"
	self->priv->adaptors = (_vala_array_free (self->priv->adaptors, self->priv->adaptors_length1, (GDestroyNotify) gee_test_case_adaptor_unref), NULL);
#line 23 "testcase.vala"
	G_OBJECT_CLASS (gee_test_case_parent_class)->finalize (obj);
#line 916 "testcase.c"
}

static GType
gee_test_case_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTestCaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_test_case_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTestCase), 0, (GInstanceInitFunc) gee_test_case_instance_init, NULL };
	GType gee_test_case_type_id;
	gee_test_case_type_id = g_type_register_static (G_TYPE_OBJECT, "GeeTestCase", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	GeeTestCase_private_offset = g_type_add_instance_private (gee_test_case_type_id, sizeof (GeeTestCasePrivate));
	return gee_test_case_type_id;
}

GType
gee_test_case_get_type (void)
{
	static volatile gsize gee_test_case_type_id__once = 0;
	if (g_once_init_enter (&gee_test_case_type_id__once)) {
		GType gee_test_case_type_id;
		gee_test_case_type_id = gee_test_case_get_type_once ();
		g_once_init_leave (&gee_test_case_type_id__once, gee_test_case_type_id);
	}
	return gee_test_case_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}