/* test-case.c generated by valac 0.15.1.20-908e, 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 (const gchar* text);
static void __folks_test_case_adaptor_printerr_func_stack_trace_gprint_func (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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 32 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self = (FolksTestCase*) g_object_new (object_type, NULL);
#line 34 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 34 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1_ = g_test_create_suite (_tmp0_);
#line 34 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv->_suite = _tmp1_;
#line 32 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return self;
#line 168 "test-case.c"
}


static gpointer _folks_test_case_adaptor_ref0 (gpointer self) {
#line 40 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return self ? folks_test_case_adaptor_ref (self) : NULL;
#line 175 "test-case.c"
}


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


static void _folks_test_case_adaptor_set_up_gtest_func (void* fixture, gpointer self) {
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_set_up (self, fixture);
#line 199 "test-case.c"
}


static void _folks_test_case_adaptor_run_gtest_func (void* fixture, gpointer self) {
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_run (self, fixture);
#line 206 "test-case.c"
}


static void _folks_test_case_adaptor_tear_down_gtest_func (void* fixture, gpointer self) {
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	folks_test_case_adaptor_tear_down (self, fixture);
#line 213 "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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 37 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (name != NULL);
#line 39 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 39 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1_ = test;
#line 39 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1__target = test_target;
#line 39 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp2_ = folks_test_case_adaptor_new (_tmp0_, _tmp1_, _tmp1__target, self);
#line 39 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	adaptor = _tmp2_;
#line 40 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp3_ = self->priv->_adaptors;
#line 40 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp3__length1 = self->priv->_adaptors_length1;
#line 40 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp4_ = _folks_test_case_adaptor_ref0 (adaptor);
#line 40 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_vala_array_add1 (&self->priv->_adaptors, &self->priv->_adaptors_length1, &self->priv->__adaptors_size_, _tmp4_);
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp5_ = self->priv->_suite;
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp6_ = folks_test_case_adaptor_get_name (adaptor);
#line 42 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp7_ = _tmp6_;
#line 42 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_test_suite_add (_tmp5_, _tmp8_);
#line 37 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_folks_test_case_adaptor_unref0 (adaptor);
#line 264 "test-case.c"
}


static void folks_test_case_real_set_up (FolksTestCase* self) {
}


void folks_test_case_set_up (FolksTestCase* self) {
#line 46 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 46 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_GET_CLASS (self)->set_up (self);
#line 277 "test-case.c"
}


static void folks_test_case_real_tear_down (FolksTestCase* self) {
}


void folks_test_case_tear_down (FolksTestCase* self) {
#line 50 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 50 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	FOLKS_TEST_CASE_GET_CLASS (self)->tear_down (self);
#line 290 "test-case.c"
}


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


static gpointer _g_object_ref0 (gpointer self) {
#line 69 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return self ? g_object_ref (self) : NULL;
#line 312 "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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 65 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_val_if_fail (test_case != NULL, NULL);
#line 65 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self = (FolksTestCaseAdaptor*) g_type_create_instance (object_type);
#line 67 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = name;
#line 67 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 67 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_g_free0 (self->priv->_name);
#line 67 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv->_name = _tmp1_;
#line 68 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp2_ = test;
#line 68 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp2__target = test_target;
#line 68 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv->_test = _tmp2_;
#line 68 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv->_test_target = _tmp2__target;
#line 69 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp3_ = test_case;
#line 69 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 69 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_g_object_unref0 (self->priv->_test_case);
#line 69 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv->_test_case = _tmp4_;
#line 65 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return self;
#line 356 "test-case.c"
}


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


static void __folks_test_case_adaptor_printerr_func_stack_trace_gprint_func (const gchar* text) {
#line 74 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_folks_test_case_adaptor_printerr_func_stack_trace (text);
#line 370 "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 75 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_folks_test_case_adaptor_log_func_stack_trace (self, log_domain, log_levels, message);
#line 377 "test-case.c"
}


static void folks_test_case_adaptor_set_up (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCase* _tmp0_;
#line 72 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 74 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_set_printerr_handler (__folks_test_case_adaptor_printerr_func_stack_trace_gprint_func);
#line 75 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_log_set_default_handler (__folks_test_case_adaptor_log_func_stack_trace_glog_func, self);
#line 77 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test_case;
#line 77 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	folks_test_case_set_up (_tmp0_);
#line 393 "test-case.c"
}


static void _folks_test_case_adaptor_printerr_func_stack_trace (const gchar* text) {
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gboolean _tmp5_;
	FILE* _tmp6_;
	const gchar* _tmp7_;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1_ = text;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (_tmp1_ == NULL) {
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		_tmp0_ = TRUE;
#line 409 "test-case.c"
	} else {
		GEqualFunc _tmp2_;
		const gchar* _tmp3_;
		gboolean _tmp4_ = FALSE;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		_tmp2_ = g_str_equal;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		_tmp3_ = text;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		_tmp4_ = _tmp2_ (_tmp3_, "");
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		_tmp0_ = _tmp4_;
#line 422 "test-case.c"
	}
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp5_ = _tmp0_;
#line 82 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (_tmp5_) {
#line 83 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		return;
#line 430 "test-case.c"
	}
#line 85 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp6_ = stderr;
#line 85 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp7_ = text;
#line 85 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	fprintf (_tmp6_, "%s", _tmp7_);
#line 88 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_on_error_stack_trace ("libtool --mode=execute gdb");
#line 440 "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 91 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 91 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (message != NULL);
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = g_log_default_handler;
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0__target = NULL;
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp1_ = log_domain;
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp2_ = log_levels;
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp3_ = message;
#line 95 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ (_tmp1_, _tmp2_, _tmp3_, _tmp0__target);
#line 99 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp4_ = log_levels;
#line 99 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if ((_tmp4_ & ((G_LOG_LEVEL_WARNING | G_LOG_LEVEL_ERROR) | G_LOG_LEVEL_CRITICAL)) != 0) {
#line 104 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		g_on_error_stack_trace ("libtool --mode=execute gdb");
#line 473 "test-case.c"
	}
}


static void folks_test_case_adaptor_run (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCaseTestMethod _tmp0_;
	void* _tmp0__target;
#line 108 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 110 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test;
#line 110 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0__target = self->priv->_test_target;
#line 110 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ (_tmp0__target);
#line 489 "test-case.c"
}


static void folks_test_case_adaptor_tear_down (FolksTestCaseAdaptor* self, void* fixture) {
	FolksTestCase* _tmp0_;
#line 113 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (self != NULL);
#line 115 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_tmp0_ = self->priv->_test_case;
#line 115 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	folks_test_case_tear_down (_tmp0_);
#line 501 "test-case.c"
}


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


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


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


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


static void folks_test_case_value_adaptor_copy_value (const GValue* src_value, GValue* dest_value) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (src_value->data[0].v_pointer) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		dest_value->data[0].v_pointer = folks_test_case_adaptor_ref (src_value->data[0].v_pointer);
#line 559 "test-case.c"
	} else {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		dest_value->data[0].v_pointer = NULL;
#line 563 "test-case.c"
	}
}


static gpointer folks_test_case_value_adaptor_peek_pointer (const GValue* value) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return value->data[0].v_pointer;
#line 571 "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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (collect_values[0].v_pointer) {
#line 578 "test-case.c"
		FolksTestCaseAdaptor* object;
		object = collect_values[0].v_pointer;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		if (object->parent_instance.g_class == NULL) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 585 "test-case.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 59 "/opt/gnome2/source/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 589 "test-case.c"
		}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = folks_test_case_adaptor_ref (object);
#line 593 "test-case.c"
	} else {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 597 "test-case.c"
	}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return NULL;
#line 601 "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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (!object_p) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 612 "test-case.c"
	}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (!value->data[0].v_pointer) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		*object_p = NULL;
#line 618 "test-case.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		*object_p = value->data[0].v_pointer;
#line 622 "test-case.c"
	} else {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		*object_p = folks_test_case_adaptor_ref (value->data[0].v_pointer);
#line 626 "test-case.c"
	}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return NULL;
#line 630 "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 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return G_PARAM_SPEC (spec);
#line 644 "test-case.c"
}


static gpointer folks_test_case_value_get_adaptor (const GValue* value) {
#line 59 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return value->data[0].v_pointer;
#line 653 "test-case.c"
}


static void folks_test_case_value_set_adaptor (GValue* value, gpointer v_object) {
	FolksTestCaseAdaptor* old;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	old = value->data[0].v_pointer;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (v_object) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = v_object;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_ref (value->data[0].v_pointer);
#line 673 "test-case.c"
	} else {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 677 "test-case.c"
	}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (old) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_unref (old);
#line 683 "test-case.c"
	}
}


static void folks_test_case_value_take_adaptor (GValue* value, gpointer v_object) {
	FolksTestCaseAdaptor* old;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	old = value->data[0].v_pointer;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (v_object) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_TEST_CASE_TYPE_ADAPTOR));
#line 59 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = v_object;
#line 702 "test-case.c"
	} else {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		value->data[0].v_pointer = NULL;
#line 706 "test-case.c"
	}
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	if (old) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
		folks_test_case_adaptor_unref (old);
#line 712 "test-case.c"
	}
}


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


static void folks_test_case_adaptor_instance_init (FolksTestCaseAdaptor * self) {
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->priv = FOLKS_TEST_CASE_ADAPTOR_GET_PRIVATE (self);
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self->ref_count = 1;
#line 733 "test-case.c"
}


static void folks_test_case_adaptor_finalize (FolksTestCaseAdaptor* obj) {
	FolksTestCaseAdaptor * self;
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self = FOLKS_TEST_CASE_ADAPTOR (obj);
#line 61 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_g_free0 (self->priv->_name);
#line 63 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	_g_object_unref0 (self->priv->_test_case);
#line 745 "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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	g_atomic_int_inc (&self->ref_count);
#line 59 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	return instance;
#line 770 "test-case.c"
}


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


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


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


static void folks_test_case_finalize (GObject* obj) {
	FolksTestCase * self;
#line 25 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	self = FOLKS_TEST_CASE (obj);
#line 28 "/opt/gnome2/source/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 "/opt/gnome2/source/folks/tests/lib/test-case.vala"
	G_OBJECT_CLASS (folks_test_case_parent_class)->finalize (obj);
#line 827 "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);
}



