/* test-case.c generated by valac 0.14.0.15-f8b5, the Vala compiler
 * generated from test-case.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>
 *
 * Copied from libgee/tests/testcase.vala.
 */

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


#define FOLKS_TYPE_TEST_CASE (folks_test_case_get_type ())
#define FOLKS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_TEST_CASE, FolksTestCase))
#define FOLKS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_TEST_CASE, FolksTestCaseClass))
#define FOLKS_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_TEST_CASE))
#define FOLKS_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_TEST_CASE))
#define FOLKS_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_TEST_CASE, FolksTestCaseClass))

typedef struct _FolksTestCase FolksTestCase;
typedef struct _FolksTestCaseClass FolksTestCaseClass;
typedef struct _FolksTestCasePrivate FolksTestCasePrivate;

#define FOLKS_TEST_CASE_TYPE_ADAPTOR (folks_test_case_adaptor_get_type ())
#define FOLKS_TEST_CASE_ADAPTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TEST_CASE_TYPE_ADAPTOR, FolksTestCaseAdaptor))
#define FOLKS_TEST_CASE_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TEST_CASE_TYPE_ADAPTOR, FolksTestCaseAdaptorClass))
#define FOLKS_TEST_CASE_IS_ADAPTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TEST_CASE_TYPE_ADAPTOR))
#define FOLKS_TEST_CASE_IS_ADAPTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TEST_CASE_TYPE_ADAPTOR))
#define FOLKS_TEST_CASE_ADAPTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TEST_CASE_TYPE_ADAPTOR, FolksTestCaseAdaptorClass))

typedef struct _FolksTestCaseAdaptor FolksTestCaseAdaptor;
typedef struct _FolksTestCaseAdaptorClass FolksTestCaseAdaptorClass;
#define _folks_test_case_adaptor_unref0(var) ((var == NULL) ? NULL : (var = (folks_test_case_adaptor_unref (var), NULL)))
typedef struct _FolksTestCaseAdaptorPrivate FolksTestCaseAdaptorPrivate;
#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 _FolksTestCaseParamSpecAdaptor FolksTestCaseParamSpecAdaptor;

struct _FolksTestCase {
	GObject parent_instance;
	FolksTestCasePrivate * priv;
};

struct _FolksTestCaseClass {
	GObjectClass parent_class;
	void (*set_up) (FolksTestCase* self);
	void (*tear_down) (FolksTestCase* self);
};

struct _FolksTestCasePrivate {
	GTestSuite* _suite;
	FolksTestCaseAdaptor** _adaptors;
	gint _adaptors_length1;
	gint __adaptors_size_;
};

typedef void (*FolksTestCaseTestMethod) (void* user_data);
struct _FolksTestCaseAdaptor {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FolksTestCaseAdaptorPrivate * priv;
};

struct _FolksTestCaseAdaptorClass {
	GTypeClass parent_class;
	void (*finalize) (FolksTestCaseAdaptor *self);
};

struct _FolksTestCaseAdaptorPrivate {
	gchar* _name;
	FolksTestCaseTestMethod _test;
	gpointer _test_target;
	FolksTestCase* _test_case;
};

struct _FolksTestCaseParamSpecAdaptor {
	GParamSpec parent_instance;
};


static gpointer folks_test_case_parent_class = NULL;
static gpointer folks_test_case_adaptor_parent_class = NULL;

GType folks_test_case_get_type (void) G_GNUC_CONST;
static gpointer folks_test_case_adaptor_ref (gpointer instance);
static void folks_test_case_adaptor_unref (gpointer instance);
static GParamSpec* folks_test_case_param_spec_adaptor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void folks_test_case_value_set_adaptor (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void folks_test_case_value_take_adaptor (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer folks_test_case_value_get_adaptor (const GValue* value) G_GNUC_UNUSED;
static GType folks_test_case_adaptor_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define FOLKS_TEST_CASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_TYPE_TEST_CASE, FolksTestCasePrivate))
enum  {
	FOLKS_TEST_CASE_DUMMY_PROPERTY
};
FolksTestCase* folks_test_case_construct (GType object_type, const gchar* name);
void folks_test_case_add_test (FolksTestCase* self, const gchar* name, FolksTestCaseTestMethod test, void* test_target);
static FolksTestCaseAdaptor* folks_test_case_adaptor_new (const gchar* name, FolksTestCaseTestMethod test, void* test_target, FolksTestCase* test_case);
static FolksTestCaseAdaptor* folks_test_case_adaptor_construct (GType object_type, const gchar* name, FolksTestCaseTestMethod test, void* test_target, FolksTestCase* test_case);
static void _vala_array_add1 (FolksTestCaseAdaptor*** array, int* length, int* size, FolksTestCaseAdaptor* value);
static const gchar* folks_test_case_adaptor_get_name (FolksTestCaseAdaptor* self);
static void folks_test_case_adaptor_set_up (FolksTestCaseAdaptor* self, void* fixture);
static void _folks_test_case_adaptor_set_up_gtest_func (void* fixture, gpointer self);
static void folks_test_case_adaptor_run (FolksTestCaseAdaptor* self, void* fixture);
static void _folks_test_case_adaptor_run_gtest_func (void* fixture, gpointer self);
static void folks_test_case_adaptor_tear_down (FolksTestCaseAdaptor* self, void* fixture);
static void _folks_test_case_adaptor_tear_down_gtest_func (void* fixture, gpointer self);
void folks_test_case_set_up (FolksTestCase* self);
static void folks_test_case_real_set_up (FolksTestCase* self);
void folks_test_case_tear_down (FolksTestCase* self);
static void folks_test_case_real_tear_down (FolksTestCase* self);
GTestSuite* folks_test_case_get_suite (FolksTestCase* self);
#define FOLKS_TEST_CASE_ADAPTOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_TEST_CASE_TYPE_ADAPTOR, FolksTestCaseAdaptorPrivate))
enum  {
	FOLKS_TEST_CASE_ADAPTOR_DUMMY_PROPERTY
};
static void _folks_test_case_adaptor_printerr_func_stack_trace (FolksTestCaseAdaptor* self, const gchar* text);
static void _folks_test_case_adaptor_log_func_stack_trace (FolksTestCaseAdaptor* self, const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message);
static void __folks_test_case_adaptor_log_func_stack_trace_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
static void folks_test_case_adaptor_set_name (FolksTestCaseAdaptor* self, const gchar* value);
static void folks_test_case_adaptor_finalize (FolksTestCaseAdaptor* obj);
static void folks_test_case_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


FolksTestCase* folks_test_case_construct (GType object_type, const gchar* name) {
	FolksTestCase * self = NULL;
	const gchar* _tmp0_;
	GTestSuite* _tmp1_;
#line 32 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 32 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self = (FolksTestCase*) g_object_new (object_type, NULL);
#line 34 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 34 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = g_test_create_suite (_tmp0_);
#line 34 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_suite = _tmp1_;
#line 32 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return self;
#line 167 "test-case.c"
}


static gpointer _folks_test_case_adaptor_ref0 (gpointer self) {
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return self ? folks_test_case_adaptor_ref (self) : NULL;
#line 174 "test-case.c"
}


static void _vala_array_add1 (FolksTestCaseAdaptor*** array, int* length, int* size, FolksTestCaseAdaptor* value) {
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if ((*length) == (*size)) {
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		*array = g_renew (FolksTestCaseAdaptor*, *array, (*size) + 1);
#line 185 "test-case.c"
	}
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	(*array)[(*length)++] = value;
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	(*array)[*length] = NULL;
#line 191 "test-case.c"
}


static void _folks_test_case_adaptor_set_up_gtest_func (void* fixture, gpointer self) {
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_set_up (self, fixture);
#line 198 "test-case.c"
}


static void _folks_test_case_adaptor_run_gtest_func (void* fixture, gpointer self) {
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_run (self, fixture);
#line 205 "test-case.c"
}


static void _folks_test_case_adaptor_tear_down_gtest_func (void* fixture, gpointer self) {
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_tear_down (self, fixture);
#line 212 "test-case.c"
}


void folks_test_case_add_test (FolksTestCase* self, const gchar* name, FolksTestCaseTestMethod test, void* test_target) {
	const gchar* _tmp0_;
	FolksTestCaseTestMethod _tmp1_;
	void* _tmp1__target;
	FolksTestCaseAdaptor* _tmp2_;
	FolksTestCaseAdaptor* adaptor;
	FolksTestCaseAdaptor** _tmp3_;
	gint _tmp3__length1;
	FolksTestCaseAdaptor* _tmp4_;
	GTestSuite* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GTestCase* _tmp8_;
#line 37 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 37 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (name != NULL);
#line 39 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 39 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = test;
#line 39 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1__target = test_target;
#line 39 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp2_ = folks_test_case_adaptor_new (_tmp0_, _tmp1_, _tmp1__target, self);
#line 39 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	adaptor = _tmp2_;
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp3_ = self->priv->_adaptors;
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp3__length1 = self->priv->_adaptors_length1;
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp4_ = _folks_test_case_adaptor_ref0 (adaptor);
#line 40 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_vala_array_add1 (&self->priv->_adaptors, &self->priv->_adaptors_length1, &self->priv->__adaptors_size_, _tmp4_);
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp5_ = self->priv->_suite;
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp6_ = folks_test_case_adaptor_get_name (adaptor);
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp7_ = _tmp6_;
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp8_ = g_test_create_case (_tmp7_, (gsize) 0, adaptor, (void (*) (void)) _folks_test_case_adaptor_set_up_gtest_func, (void (*) (void)) _folks_test_case_adaptor_run_gtest_func, (void (*) (void)) _folks_test_case_adaptor_tear_down_gtest_func);
#line 42 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_test_suite_add (_tmp5_, _tmp8_);
#line 37 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_folks_test_case_adaptor_unref0 (adaptor);
#line 263 "test-case.c"
}


static void folks_test_case_real_set_up (FolksTestCase* self) {
}


void folks_test_case_set_up (FolksTestCase* self) {
#line 46 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 46 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_GET_CLASS (self)->set_up (self);
#line 276 "test-case.c"
}


static void folks_test_case_real_tear_down (FolksTestCase* self) {
}


void folks_test_case_tear_down (FolksTestCase* self) {
#line 50 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 50 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_GET_CLASS (self)->tear_down (self);
#line 289 "test-case.c"
}


GTestSuite* folks_test_case_get_suite (FolksTestCase* self) {
	GTestSuite* result = NULL;
	GTestSuite* _tmp0_;
#line 54 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 56 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_suite;
#line 56 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	result = _tmp0_;
#line 56 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return result;
#line 304 "test-case.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 69 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return self ? g_object_ref (self) : NULL;
#line 311 "test-case.c"
}


static FolksTestCaseAdaptor* folks_test_case_adaptor_construct (GType object_type, const gchar* name, FolksTestCaseTestMethod test, void* test_target, FolksTestCase* test_case) {
	FolksTestCaseAdaptor* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	FolksTestCaseTestMethod _tmp2_;
	void* _tmp2__target;
	FolksTestCase* _tmp3_;
	FolksTestCase* _tmp4_;
#line 65 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 65 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (test_case != NULL, NULL);
#line 65 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self = (FolksTestCaseAdaptor*) g_type_create_instance (object_type);
#line 67 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 67 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 67 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_g_free0 (self->priv->_name);
#line 67 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_name = _tmp1_;
#line 68 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp2_ = test;
#line 68 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp2__target = test_target;
#line 68 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_test = _tmp2_;
#line 68 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_test_target = _tmp2__target;
#line 69 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp3_ = test_case;
#line 69 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 69 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_g_object_unref0 (self->priv->_test_case);
#line 69 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_test_case = _tmp4_;
#line 65 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return self;
#line 355 "test-case.c"
}


static FolksTestCaseAdaptor* folks_test_case_adaptor_new (const gchar* name, FolksTestCaseTestMethod test, void* test_target, FolksTestCase* test_case) {
#line 65 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return folks_test_case_adaptor_construct (FOLKS_TEST_CASE_TYPE_ADAPTOR, name, test, test_target, test_case);
#line 362 "test-case.c"
}


static void __folks_test_case_adaptor_log_func_stack_trace_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
#line 76 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_folks_test_case_adaptor_log_func_stack_trace (self, log_domain, log_levels, message);
#line 369 "test-case.c"
}


static void folks_test_case_adaptor_set_up (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCase* _tmp0_;
#line 72 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 74 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_set_printerr_handler ((GPrintFunc) _folks_test_case_adaptor_printerr_func_stack_trace);
#line 76 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_log_set_default_handler (__folks_test_case_adaptor_log_func_stack_trace_glog_func, self);
#line 78 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test_case;
#line 78 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_set_up (_tmp0_);
#line 385 "test-case.c"
}


static void _folks_test_case_adaptor_printerr_func_stack_trace (FolksTestCaseAdaptor* self, const gchar* text) {
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gboolean _tmp5_;
	FILE* _tmp6_;
	const gchar* _tmp7_;
#line 81 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = text;
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (_tmp1_ == NULL) {
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		_tmp0_ = TRUE;
#line 403 "test-case.c"
	} else {
		GEqualFunc _tmp2_;
		const gchar* _tmp3_;
		gboolean _tmp4_ = FALSE;
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		_tmp2_ = g_str_equal;
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		_tmp3_ = text;
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		_tmp4_ = _tmp2_ (_tmp3_, "");
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		_tmp0_ = _tmp4_;
#line 416 "test-case.c"
	}
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp5_ = _tmp0_;
#line 83 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (_tmp5_) {
#line 84 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		return;
#line 424 "test-case.c"
	}
#line 86 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp6_ = stderr;
#line 86 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp7_ = text;
#line 86 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	fprintf (_tmp6_, "%s", _tmp7_);
#line 89 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_on_error_stack_trace ("libtool --mode=execute gdb");
#line 434 "test-case.c"
}


static void _folks_test_case_adaptor_log_func_stack_trace (FolksTestCaseAdaptor* self, const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message) {
	GLogFunc _tmp0_;
	void* _tmp0__target;
	const gchar* _tmp1_;
	GLogLevelFlags _tmp2_;
	const gchar* _tmp3_;
	GLogLevelFlags _tmp4_;
#line 92 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 92 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (message != NULL);
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = g_log_default_handler;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0__target = NULL;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = log_domain;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp2_ = log_levels;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp3_ = message;
#line 96 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ (_tmp1_, _tmp2_, _tmp3_, _tmp0__target);
#line 100 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp4_ = log_levels;
#line 100 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if ((_tmp4_ & ((G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR) | G_LOG_LEVEL_CRITICAL)) != 0) {
#line 105 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_on_error_stack_trace ("libtool --mode=execute gdb");
#line 467 "test-case.c"
	}
}


static void folks_test_case_adaptor_run (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCaseTestMethod _tmp0_;
	void* _tmp0__target;
#line 109 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 111 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test;
#line 111 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0__target = self->priv->_test_target;
#line 111 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ (_tmp0__target);
#line 483 "test-case.c"
}


static void folks_test_case_adaptor_tear_down (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCase* _tmp0_;
#line 114 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 116 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test_case;
#line 116 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_tear_down (_tmp0_);
#line 495 "test-case.c"
}


static const gchar* folks_test_case_adaptor_get_name (FolksTestCaseAdaptor* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_name;
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	result = _tmp0_;
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return result;
#line 510 "test-case.c"
}


static void folks_test_case_adaptor_set_name (FolksTestCaseAdaptor* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = value;
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_g_free0 (self->priv->_name);
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_name = _tmp1_;
#line 527 "test-case.c"
}


static void folks_test_case_value_adaptor_init (GValue* value) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	value->data[0].v_pointer = NULL;
#line 534 "test-case.c"
}


static void folks_test_case_value_adaptor_free_value (GValue* value) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (value->data[0].v_pointer) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_unref (value->data[0].v_pointer);
#line 543 "test-case.c"
	}
}


static void folks_test_case_value_adaptor_copy_value (const GValue* src_value, GValue* dest_value) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (src_value->data[0].v_pointer) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		dest_value->data[0].v_pointer = folks_test_case_adaptor_ref (src_value->data[0].v_pointer);
#line 553 "test-case.c"
	} else {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		dest_value->data[0].v_pointer = NULL;
#line 557 "test-case.c"
	}
}


static gpointer folks_test_case_value_adaptor_peek_pointer (const GValue* value) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return value->data[0].v_pointer;
#line 565 "test-case.c"
}


static gchar* folks_test_case_value_adaptor_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (collect_values[0].v_pointer) {
#line 572 "test-case.c"
		FolksTestCaseAdaptor* object;
		object = collect_values[0].v_pointer;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		if (object->parent_instance.g_class == NULL) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 579 "test-case.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.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 583 "test-case.c"
		}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = folks_test_case_adaptor_ref (object);
#line 587 "test-case.c"
	} else {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 591 "test-case.c"
	}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return NULL;
#line 595 "test-case.c"
}


static gchar* folks_test_case_value_adaptor_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FolksTestCaseAdaptor** object_p;
	object_p = collect_values[0].v_pointer;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (!object_p) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 606 "test-case.c"
	}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (!value->data[0].v_pointer) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		*object_p = NULL;
#line 612 "test-case.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		*object_p = value->data[0].v_pointer;
#line 616 "test-case.c"
	} else {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		*object_p = folks_test_case_adaptor_ref (value->data[0].v_pointer);
#line 620 "test-case.c"
	}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return NULL;
#line 624 "test-case.c"
}


static GParamSpec* folks_test_case_param_spec_adaptor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FolksTestCaseParamSpecAdaptor* spec;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (g_type_is_a (object_type, FOLKS_TEST_CASE_TYPE_ADAPTOR), NULL);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return G_PARAM_SPEC (spec);
#line 638 "test-case.c"
}


static gpointer folks_test_case_value_get_adaptor (const GValue* value) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TEST_CASE_TYPE_ADAPTOR), NULL);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return value->data[0].v_pointer;
#line 647 "test-case.c"
}


static void folks_test_case_value_set_adaptor (GValue* value, gpointer v_object) {
	FolksTestCaseAdaptor* old;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	old = value->data[0].v_pointer;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (v_object) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = v_object;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_ref (value->data[0].v_pointer);
#line 667 "test-case.c"
	} else {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 671 "test-case.c"
	}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (old) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_unref (old);
#line 677 "test-case.c"
	}
}


static void folks_test_case_value_take_adaptor (GValue* value, gpointer v_object) {
	FolksTestCaseAdaptor* old;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	old = value->data[0].v_pointer;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (v_object) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = v_object;
#line 696 "test-case.c"
	} else {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 700 "test-case.c"
	}
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (old) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_unref (old);
#line 706 "test-case.c"
	}
}


static void folks_test_case_adaptor_class_init (FolksTestCaseAdaptorClass * klass) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_parent_class = g_type_class_peek_parent (klass);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_ADAPTOR_CLASS (klass)->finalize = folks_test_case_adaptor_finalize;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_type_class_add_private (klass, sizeof (FolksTestCaseAdaptorPrivate));
#line 718 "test-case.c"
}


static void folks_test_case_adaptor_instance_init (FolksTestCaseAdaptor * self) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv = FOLKS_TEST_CASE_ADAPTOR_GET_PRIVATE (self);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->ref_count = 1;
#line 727 "test-case.c"
}


static void folks_test_case_adaptor_finalize (FolksTestCaseAdaptor* obj) {
	FolksTestCaseAdaptor * self;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self = FOLKS_TEST_CASE_ADAPTOR (obj);
#line 61 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_g_free0 (self->priv->_name);
#line 63 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_g_object_unref0 (self->priv->_test_case);
#line 739 "test-case.c"
}


static GType folks_test_case_adaptor_get_type (void) {
	static volatile gsize folks_test_case_adaptor_type_id__volatile = 0;
	if (g_once_init_enter (&folks_test_case_adaptor_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { folks_test_case_value_adaptor_init, folks_test_case_value_adaptor_free_value, folks_test_case_value_adaptor_copy_value, folks_test_case_value_adaptor_peek_pointer, "p", folks_test_case_value_adaptor_collect_value, "p", folks_test_case_value_adaptor_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FolksTestCaseAdaptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_test_case_adaptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksTestCaseAdaptor), 0, (GInstanceInitFunc) folks_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 folks_test_case_adaptor_type_id;
		folks_test_case_adaptor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FolksTestCaseAdaptor", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&folks_test_case_adaptor_type_id__volatile, folks_test_case_adaptor_type_id);
	}
	return folks_test_case_adaptor_type_id__volatile;
}


static gpointer folks_test_case_adaptor_ref (gpointer instance) {
	FolksTestCaseAdaptor* self;
	self = instance;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_atomic_int_inc (&self->ref_count);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	return instance;
#line 764 "test-case.c"
}


static void folks_test_case_adaptor_unref (gpointer instance) {
	FolksTestCaseAdaptor* self;
	self = instance;
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		FOLKS_TEST_CASE_ADAPTOR_GET_CLASS (self)->finalize (self);
#line 59 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 777 "test-case.c"
	}
}


static void folks_test_case_class_init (FolksTestCaseClass * klass) {
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	folks_test_case_parent_class = g_type_class_peek_parent (klass);
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	g_type_class_add_private (klass, sizeof (FolksTestCasePrivate));
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = folks_test_case_real_set_up;
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = folks_test_case_real_tear_down;
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	G_OBJECT_CLASS (klass)->finalize = folks_test_case_finalize;
#line 793 "test-case.c"
}


static void folks_test_case_instance_init (FolksTestCase * self) {
	FolksTestCaseAdaptor** _tmp0_ = NULL;
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv = FOLKS_TEST_CASE_GET_PRIVATE (self);
#line 28 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	_tmp0_ = g_new0 (FolksTestCaseAdaptor*, 0 + 1);
#line 28 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_adaptors = _tmp0_;
#line 28 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_adaptors_length1 = 0;
#line 28 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->__adaptors_size_ = self->priv->_adaptors_length1;
#line 809 "test-case.c"
}


static void folks_test_case_finalize (GObject* obj) {
	FolksTestCase * self;
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self = FOLKS_TEST_CASE (obj);
#line 28 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	self->priv->_adaptors = (_vala_array_free (self->priv->_adaptors, self->priv->_adaptors_length1, (GDestroyNotify) folks_test_case_adaptor_unref), NULL);
#line 25 "/home/treitter/collabora/folks/tests/lib/test-case.vala"
	G_OBJECT_CLASS (folks_test_case_parent_class)->finalize (obj);
#line 821 "test-case.c"
}


GType folks_test_case_get_type (void) {
	static volatile gsize folks_test_case_type_id__volatile = 0;
	if (g_once_init_enter (&folks_test_case_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksTestCaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_test_case_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksTestCase), 0, (GInstanceInitFunc) folks_test_case_instance_init, NULL };
		GType folks_test_case_type_id;
		folks_test_case_type_id = g_type_register_static (G_TYPE_OBJECT, "FolksTestCase", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&folks_test_case_type_id__volatile, folks_test_case_type_id);
	}
	return folks_test_case_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



