/* testassert.c generated by valac 0.16.1, the Vala compiler
 * generated from testassert.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <fsotest.h>
#include <stdlib.h>
#include <string.h>

#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))



void test_are_equal (void);
void test_are_not_equal (void);
void test_is_true (void);
void test_is_false (void);
void test_fail (void);
void _vala_main (gchar** args, int args_length1);
static void _test_are_equal_gcallback (void);
static void _test_are_not_equal_gcallback (void);
static void _test_is_true_gcallback (void);
static void _test_is_false_gcallback (void);
static void _test_fail_gcallback (void);


/**
 * Copyright (C) 2012 Simon Busch <morphis@gravedo.de>
 *
 * 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
 *
 */
void test_are_equal (void) {
	GError * _inner_error_ = NULL;
	{
		fso_framework_test_assert_are_equal (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "Test1", "Test2", "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_equal (G_TYPE_INT, NULL, NULL, GINT_TO_POINTER (101), GINT_TO_POINTER (102), "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_equal (G_TYPE_BOOLEAN, NULL, NULL, GINT_TO_POINTER (TRUE), GINT_TO_POINTER (FALSE), "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch2_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally2:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_equal (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "Test1", "Test1", "Should be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
		fso_framework_test_assert_are_equal (G_TYPE_INT, NULL, NULL, GINT_TO_POINTER (101), GINT_TO_POINTER (101), "Should be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
		fso_framework_test_assert_are_equal (G_TYPE_BOOLEAN, NULL, NULL, GINT_TO_POINTER (TRUE), GINT_TO_POINTER (TRUE), "Should be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
		fso_framework_test_assert_are_equal (G_TYPE_BOOLEAN, NULL, NULL, GINT_TO_POINTER (FALSE), GINT_TO_POINTER (FALSE), "Should be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		g_assert (FALSE);
		_g_error_free0 (err);
	}
	__finally3:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_are_not_equal (void) {
	GError * _inner_error_ = NULL;
	{
		fso_framework_test_assert_are_not_equal (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "Test1", "Test1", "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally4:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_not_equal (G_TYPE_INT, NULL, NULL, GINT_TO_POINTER (101), GINT_TO_POINTER (101), "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally5:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_not_equal (G_TYPE_BOOLEAN, NULL, NULL, GINT_TO_POINTER (TRUE), GINT_TO_POINTER (TRUE), "Should not be equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally6:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_are_not_equal (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, "Test1", "Test2", "Should be not equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
		fso_framework_test_assert_are_not_equal (G_TYPE_INT, NULL, NULL, GINT_TO_POINTER (101), GINT_TO_POINTER (102), "Should be not equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
		fso_framework_test_assert_are_not_equal (G_TYPE_BOOLEAN, NULL, NULL, GINT_TO_POINTER (TRUE), GINT_TO_POINTER (FALSE), "Should be not equal", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		g_assert (FALSE);
		_g_error_free0 (err);
	}
	__finally7:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_is_true (void) {
	GError * _inner_error_ = NULL;
	{
		fso_framework_test_assert_is_true (FALSE, "", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch8_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally8;
	__catch8_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally8:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_is_true (TRUE, "", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch9_g_error;
		}
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		g_assert (FALSE);
		_g_error_free0 (err);
	}
	__finally9:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_is_false (void) {
	GError * _inner_error_ = NULL;
	{
		fso_framework_test_assert_is_false (TRUE, "", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch10_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally10;
	__catch10_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally10:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		fso_framework_test_assert_is_false (FALSE, "", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch11_g_error;
		}
	}
	goto __finally11;
	__catch11_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		g_assert (FALSE);
		_g_error_free0 (err);
	}
	__finally11:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_fail (void) {
	GError * _inner_error_ = NULL;
	{
		fso_framework_test_assert_fail ("fail", &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch12_g_error;
		}
		g_assert (FALSE);
	}
	goto __finally12;
	__catch12_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (err);
	}
	__finally12:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void _test_are_equal_gcallback (void) {
	test_are_equal ();
}


static void _test_are_not_equal_gcallback (void) {
	test_are_not_equal ();
}


static void _test_is_true_gcallback (void) {
	test_is_true ();
}


static void _test_is_false_gcallback (void) {
	test_is_false ();
}


static void _test_fail_gcallback (void) {
	test_fail ();
}


void _vala_main (gchar** args, int args_length1) {
	g_test_init (&args_length1, &args, NULL);
	g_test_add_func ("/FsoFramework/Test/Assert/AreEqual", _test_are_equal_gcallback);
	g_test_add_func ("/FsoFramework/Test/Assert/AreNotEqual", _test_are_not_equal_gcallback);
	g_test_add_func ("/FsoFramework/Test/Assert/IsTrue", _test_is_true_gcallback);
	g_test_add_func ("/FsoFramework/Test/Assert/IsFalse", _test_is_false_gcallback);
	g_test_add_func ("/FsoFramework/Test/Assert/Fail", _test_fail_gcallback);
	g_test_run ();
}


int main (int argc, char ** argv) {
	g_type_init ();
	_vala_main (argv, argc);
	return 0;
}



