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

/* testconcurrentset.vala
 *
 * Copyright (C) 2012  Maciej Piechotka
 *
 * 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:
 * 	Maciej Piechotka <uzytkownik2@gmail.com>
 */

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

#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))

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

#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))

typedef struct _CollectionTests CollectionTests;
typedef struct _CollectionTestsClass CollectionTestsClass;
typedef struct _CollectionTestsPrivate CollectionTestsPrivate;

#define TYPE_SET_TESTS (set_tests_get_type ())
#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))

typedef struct _SetTests SetTests;
typedef struct _SetTestsClass SetTestsClass;
typedef struct _SetTestsPrivate SetTestsPrivate;

#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))

typedef struct _SortedSetTests SortedSetTests;
typedef struct _SortedSetTestsClass SortedSetTestsClass;
typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;

#define TYPE_CONCURRENT_SET_TESTS (concurrent_set_tests_get_type ())
#define CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTests))
#define CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))
#define IS_CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONCURRENT_SET_TESTS))
#define IS_CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONCURRENT_SET_TESTS))
#define CONCURRENT_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))

typedef struct _ConcurrentSetTests ConcurrentSetTests;
typedef struct _ConcurrentSetTestsClass ConcurrentSetTestsClass;
typedef struct _ConcurrentSetTestsPrivate ConcurrentSetTestsPrivate;
enum  {
	CONCURRENT_SET_TESTS_0_PROPERTY,
	CONCURRENT_SET_TESTS_NUM_PROPERTIES
};
static GParamSpec* concurrent_set_tests_properties[CONCURRENT_SET_TESTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

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

struct _CollectionTests {
	GeeTestCase parent_instance;
	CollectionTestsPrivate * priv;
	GeeCollection* test_collection;
};

struct _CollectionTestsClass {
	GeeTestCaseClass parent_class;
};

struct _SetTests {
	CollectionTests parent_instance;
	SetTestsPrivate * priv;
};

struct _SetTestsClass {
	CollectionTestsClass parent_class;
	void (*test_duplicates_are_ignored) (SetTests* self);
};

struct _SortedSetTests {
	SetTests parent_instance;
	SortedSetTestsPrivate * priv;
};

struct _SortedSetTestsClass {
	SetTestsClass parent_class;
};

struct _ConcurrentSetTests {
	SortedSetTests parent_instance;
	ConcurrentSetTestsPrivate * priv;
};

struct _ConcurrentSetTestsClass {
	SortedSetTestsClass parent_class;
};

static gpointer concurrent_set_tests_parent_class = NULL;

GType gee_test_case_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCase, g_object_unref)
GType collection_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CollectionTests, g_object_unref)
GType set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SetTests, g_object_unref)
GType sorted_set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SortedSetTests, g_object_unref)
GType concurrent_set_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConcurrentSetTests, g_object_unref)
void gee_test_case_set_up (GeeTestCase* self);
void gee_test_case_tear_down (GeeTestCase* self);
ConcurrentSetTests* concurrent_set_tests_new (void);
ConcurrentSetTests* concurrent_set_tests_construct (GType object_type);
SortedSetTests* sorted_set_tests_construct (GType object_type,
                                            const gchar* name,
                                            gboolean strict);
static void concurrent_set_tests_real_set_up (GeeTestCase* base);
static void concurrent_set_tests_real_tear_down (GeeTestCase* base);
static GType concurrent_set_tests_get_type_once (void);

ConcurrentSetTests*
concurrent_set_tests_construct (GType object_type)
{
	ConcurrentSetTests * self = NULL;
	self = (ConcurrentSetTests*) sorted_set_tests_construct (object_type, "ConcurrentSet", FALSE);
	return self;
}

ConcurrentSetTests*
concurrent_set_tests_new (void)
{
	return concurrent_set_tests_construct (TYPE_CONCURRENT_SET_TESTS);
}

static void
concurrent_set_tests_real_set_up (GeeTestCase* base)
{
	ConcurrentSetTests * self;
	GeeConcurrentSet* _tmp0_;
	self = (ConcurrentSetTests*) base;
	_tmp0_ = gee_concurrent_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_g_object_unref0 (((CollectionTests*) self)->test_collection);
	((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}

static void
concurrent_set_tests_real_tear_down (GeeTestCase* base)
{
	ConcurrentSetTests * self;
	self = (ConcurrentSetTests*) base;
	_g_object_unref0 (((CollectionTests*) self)->test_collection);
	((CollectionTests*) self)->test_collection = NULL;
}

static void
concurrent_set_tests_class_init (ConcurrentSetTestsClass * klass,
                                 gpointer klass_data)
{
	concurrent_set_tests_parent_class = g_type_class_peek_parent (klass);
	((GeeTestCaseClass *) klass)->set_up = (void (*) (GeeTestCase*)) concurrent_set_tests_real_set_up;
	((GeeTestCaseClass *) klass)->tear_down = (void (*) (GeeTestCase*)) concurrent_set_tests_real_tear_down;
}

static void
concurrent_set_tests_instance_init (ConcurrentSetTests * self,
                                    gpointer klass)
{
}

static GType
concurrent_set_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConcurrentSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) concurrent_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConcurrentSetTests), 0, (GInstanceInitFunc) concurrent_set_tests_instance_init, NULL };
	GType concurrent_set_tests_type_id;
	concurrent_set_tests_type_id = g_type_register_static (TYPE_SORTED_SET_TESTS, "ConcurrentSetTests", &g_define_type_info, 0);
	return concurrent_set_tests_type_id;
}

GType
concurrent_set_tests_get_type (void)
{
	static volatile gsize concurrent_set_tests_type_id__volatile = 0;
	if (g_once_init_enter (&concurrent_set_tests_type_id__volatile)) {
		GType concurrent_set_tests_type_id;
		concurrent_set_tests_type_id = concurrent_set_tests_get_type_once ();
		g_once_init_leave (&concurrent_set_tests_type_id__volatile, concurrent_set_tests_type_id);
	}
	return concurrent_set_tests_type_id__volatile;
}

