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

/* testreadonlymap.vala
 *
 * Copyright (C) 2008  Jürg Billeter
 * Copyright (C) 2009  Didier Villevalois
 *
 * 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:
 * 	Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
 */

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

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define 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_READ_ONLY_MAP_TESTS (read_only_map_tests_get_type ())
#define READ_ONLY_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTests))
#define READ_ONLY_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTestsClass))
#define IS_READ_ONLY_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READ_ONLY_MAP_TESTS))
#define IS_READ_ONLY_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READ_ONLY_MAP_TESTS))
#define READ_ONLY_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTestsClass))

typedef struct _ReadOnlyMapTests ReadOnlyMapTests;
typedef struct _ReadOnlyMapTestsClass ReadOnlyMapTestsClass;
typedef struct _ReadOnlyMapTestsPrivate ReadOnlyMapTestsPrivate;
enum  {
	READ_ONLY_MAP_TESTS_0_PROPERTY,
	READ_ONLY_MAP_TESTS_NUM_PROPERTIES
};
static GParamSpec* read_only_map_tests_properties[READ_ONLY_MAP_TESTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef void (*GeeTestCaseTestMethod) (gpointer user_data);
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

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

struct _ReadOnlyMapTests {
	GeeTestCase parent_instance;
	ReadOnlyMapTestsPrivate * priv;
	GeeMap* test_map;
	GeeMap* ro_map;
};

struct _ReadOnlyMapTestsClass {
	GeeTestCaseClass parent_class;
};

static gpointer read_only_map_tests_parent_class = NULL;

VALA_EXTERN GType gee_test_case_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeeTestCase, g_object_unref)
VALA_EXTERN GType read_only_map_tests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ReadOnlyMapTests, g_object_unref)
VALA_EXTERN void gee_test_case_set_up (GeeTestCase* self);
VALA_EXTERN void gee_test_case_tear_down (GeeTestCase* self);
VALA_EXTERN ReadOnlyMapTests* read_only_map_tests_new (void);
VALA_EXTERN ReadOnlyMapTests* read_only_map_tests_construct (GType object_type);
VALA_EXTERN GeeTestCase* gee_test_case_construct (GType object_type,
                                      const gchar* name);
VALA_EXTERN void gee_test_case_add_test (GeeTestCase* self,
                             const gchar* name,
                             GeeTestCaseTestMethod test,
                             gpointer test_target,
                             GDestroyNotify test_target_destroy_notify);
VALA_EXTERN void read_only_map_tests_test_unique_read_only_view_instance (ReadOnlyMapTests* self);
static void _read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method (gpointer self);
VALA_EXTERN void read_only_map_tests_test_immutable_iterator (ReadOnlyMapTests* self);
static void _read_only_map_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self);
VALA_EXTERN void read_only_map_tests_test_immutable (ReadOnlyMapTests* self);
static void _read_only_map_tests_test_immutable_gee_test_case_test_method (gpointer self);
VALA_EXTERN void read_only_map_tests_test_accurate_view (ReadOnlyMapTests* self);
static void _read_only_map_tests_test_accurate_view_gee_test_case_test_method (gpointer self);
static void read_only_map_tests_real_set_up (GeeTestCase* base);
static void read_only_map_tests_real_tear_down (GeeTestCase* base);
static void read_only_map_tests_finalize (GObject * obj);
static GType read_only_map_tests_get_type_once (void);

static void
_read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method (gpointer self)
{
	read_only_map_tests_test_unique_read_only_view_instance ((ReadOnlyMapTests*) self);
}

static void
_read_only_map_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self)
{
	read_only_map_tests_test_immutable_iterator ((ReadOnlyMapTests*) self);
}

static void
_read_only_map_tests_test_immutable_gee_test_case_test_method (gpointer self)
{
	read_only_map_tests_test_immutable ((ReadOnlyMapTests*) self);
}

static void
_read_only_map_tests_test_accurate_view_gee_test_case_test_method (gpointer self)
{
	read_only_map_tests_test_accurate_view ((ReadOnlyMapTests*) self);
}

ReadOnlyMapTests*
read_only_map_tests_construct (GType object_type)
{
	ReadOnlyMapTests * self = NULL;
	self = (ReadOnlyMapTests*) gee_test_case_construct (object_type, "ReadOnlyMap");
	gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] unique read-only view instance", _read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable iterator", _read_only_map_tests_test_immutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable", _read_only_map_tests_test_immutable_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] accurate view", _read_only_map_tests_test_accurate_view_gee_test_case_test_method, g_object_ref (self), g_object_unref);
	return self;
}

ReadOnlyMapTests*
read_only_map_tests_new (void)
{
	return read_only_map_tests_construct (TYPE_READ_ONLY_MAP_TESTS);
}

static void
read_only_map_tests_real_set_up (GeeTestCase* base)
{
	ReadOnlyMapTests * self;
	GeeTreeMap* _tmp0_;
	GeeMap* _tmp1_;
	GeeMap* _tmp2_;
	GeeMap* _tmp3_;
	self = (ReadOnlyMapTests*) base;
	_tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->test_map);
	self->test_map = (GeeMap*) _tmp0_;
	_tmp1_ = self->test_map;
	_tmp2_ = gee_map_get_read_only_view (_tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->ro_map);
	self->ro_map = _tmp3_;
}

static void
read_only_map_tests_real_tear_down (GeeTestCase* base)
{
	ReadOnlyMapTests * self;
	self = (ReadOnlyMapTests*) base;
	_g_object_unref0 (self->test_map);
	self->test_map = NULL;
	_g_object_unref0 (self->ro_map);
	self->ro_map = NULL;
}

void
read_only_map_tests_test_unique_read_only_view_instance (ReadOnlyMapTests* self)
{
	GeeMap* another_ro_map = NULL;
	GeeMap* _tmp0_;
	GeeMap* _tmp1_;
	GeeMap* _tmp2_;
	GeeMap* _tmp3_;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GObject* _tmp6_;
	GeeMap* _tmp7_;
	gconstpointer _tmp8_;
	GeeMap* _tmp9_;
	GeeMap* _tmp10_;
	GeeMap* _tmp11_;
	GeeMap* _tmp12_;
	gconstpointer _tmp13_;
	GeeMap* _tmp14_;
	GeeMap* _tmp15_;
	GeeMap* _tmp16_;
	GeeMap* _tmp17_;
	GeeMap* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->test_map;
	_tmp1_ = gee_map_get_read_only_view (_tmp0_);
	_tmp2_ = _tmp1_;
	another_ro_map = _tmp2_;
	_tmp3_ = self->ro_map;
	_tmp4_ = another_ro_map;
	_vala_assert (_tmp3_ == _tmp4_, "ro_map == another_ro_map");
	_tmp5_ = self->ro_map;
	_tmp6_ = g_object_new (G_TYPE_OBJECT, NULL);
	g_object_set_data_full ((GObject*) _tmp5_, "marker", _tmp6_, g_object_unref);
	_tmp7_ = another_ro_map;
	_tmp8_ = g_object_get_data ((GObject*) _tmp7_, "marker");
	_vala_assert (((GObject*) _tmp8_) != NULL, "another_ro_map.get_data<Object> (\"marker\") != null");
	_g_object_unref0 (another_ro_map);
	another_ro_map = NULL;
	_g_object_unref0 (self->ro_map);
	self->ro_map = NULL;
	_tmp9_ = self->test_map;
	_tmp10_ = gee_map_get_read_only_view (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_object_unref0 (another_ro_map);
	another_ro_map = _tmp11_;
	_tmp12_ = another_ro_map;
	_tmp13_ = g_object_get_data ((GObject*) _tmp12_, "marker");
	_vala_assert (((GObject*) _tmp13_) == NULL, "another_ro_map.get_data<Object> (\"marker\") == null");
	_tmp14_ = another_ro_map;
	_tmp15_ = another_ro_map;
	_tmp16_ = gee_map_get_read_only_view (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	_vala_assert (_tmp14_ == _tmp18_, "another_ro_map == another_ro_map.read_only_view");
	_g_object_unref0 (_tmp18_);
	_g_object_unref0 (another_ro_map);
}

void
read_only_map_tests_test_immutable_iterator (ReadOnlyMapTests* self)
{
	GeeMap* _tmp0_;
	GeeMap* _tmp1_;
	GeeMap* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	GeeMap* _tmp5_;
	GeeMap* _tmp6_;
	GeeMap* _tmp7_;
	GeeMap* _tmp8_;
	GeeIterator* iterator = NULL;
	GeeMap* _tmp9_;
	GeeSet* _tmp10_;
	GeeSet* _tmp11_;
	GeeSet* _tmp12_;
	GeeIterator* _tmp13_;
	GeeIterator* _tmp14_;
	GeeIterator* _tmp15_;
	GeeIterator* _tmp16_;
	GeeIterator* _tmp17_;
	gpointer _tmp18_;
	gchar* _tmp19_;
	GeeIterator* _tmp20_;
	GeeIterator* _tmp21_;
	GeeIterator* _tmp22_;
	gpointer _tmp23_;
	gchar* _tmp24_;
	GeeIterator* _tmp25_;
	GeeIterator* _tmp26_;
	GeeMap* _tmp27_;
	GeeSet* _tmp28_;
	GeeSet* _tmp29_;
	GeeSet* _tmp30_;
	GeeIterator* _tmp31_;
	GeeIterator* _tmp32_;
	GeeIterator* _tmp33_;
	GeeIterator* _tmp34_;
	gpointer _tmp35_;
	gchar* _tmp36_;
	GeeMap* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	GeeMap* _tmp41_;
	GeeMap* _tmp42_;
	GeeMap* _tmp43_;
	GeeMap* _tmp44_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->test_map;
	gee_map_set (_tmp0_, "one", "one");
	_tmp1_ = self->test_map;
	gee_map_set (_tmp1_, "two", "two");
	_tmp2_ = self->ro_map;
	_tmp3_ = gee_map_get_size (_tmp2_);
	_tmp4_ = _tmp3_;
	_vala_assert (_tmp4_ == 2, "ro_map.size == 2");
	_tmp5_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp5_, "one"), "ro_map.has_key (\"one\")");
	_tmp6_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp6_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_tmp7_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp7_, "two"), "ro_map.has_key (\"two\")");
	_tmp8_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp8_, "two", "two"), "ro_map.has (\"two\", \"two\")");
	_tmp9_ = self->ro_map;
	_tmp10_ = gee_map_get_keys (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
	_tmp14_ = _tmp13_;
	_g_object_unref0 (_tmp12_);
	iterator = _tmp14_;
	_tmp15_ = iterator;
	_vala_assert (gee_iterator_has_next (_tmp15_), "iterator.has_next ()");
	_tmp16_ = iterator;
	_vala_assert (gee_iterator_next (_tmp16_), "iterator.next ()");
	_tmp17_ = iterator;
	_tmp18_ = gee_iterator_get (_tmp17_);
	_tmp19_ = (gchar*) _tmp18_;
	_vala_assert (g_strcmp0 (_tmp19_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp19_);
	_tmp20_ = iterator;
	_vala_assert (gee_iterator_has_next (_tmp20_), "iterator.has_next ()");
	_tmp21_ = iterator;
	_vala_assert (gee_iterator_next (_tmp21_), "iterator.next ()");
	_tmp22_ = iterator;
	_tmp23_ = gee_iterator_get (_tmp22_);
	_tmp24_ = (gchar*) _tmp23_;
	_vala_assert (g_strcmp0 (_tmp24_, "two") == 0, "iterator.get () == \"two\"");
	_g_free0 (_tmp24_);
	_tmp25_ = iterator;
	_vala_assert (!gee_iterator_has_next (_tmp25_), "! iterator.has_next ()");
	_tmp26_ = iterator;
	_vala_assert (!gee_iterator_next (_tmp26_), "! iterator.next ()");
	_tmp27_ = self->ro_map;
	_tmp28_ = gee_map_get_keys (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = _tmp29_;
	_tmp31_ = gee_iterable_iterator ((GeeIterable*) _tmp30_);
	_g_object_unref0 (iterator);
	iterator = _tmp31_;
	_g_object_unref0 (_tmp30_);
	_tmp32_ = iterator;
	_vala_assert (gee_iterator_has_next (_tmp32_), "iterator.has_next ()");
	_tmp33_ = iterator;
	_vala_assert (gee_iterator_next (_tmp33_), "iterator.next ()");
	_tmp34_ = iterator;
	_tmp35_ = gee_iterator_get (_tmp34_);
	_tmp36_ = (gchar*) _tmp35_;
	_vala_assert (g_strcmp0 (_tmp36_, "one") == 0, "iterator.get () == \"one\"");
	_g_free0 (_tmp36_);
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeIterator* _tmp37_;
		_tmp37_ = iterator;
		gee_iterator_remove (_tmp37_);
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp38_ = self->ro_map;
	_tmp39_ = gee_map_get_size (_tmp38_);
	_tmp40_ = _tmp39_;
	_vala_assert (_tmp40_ == 2, "ro_map.size == 2");
	_tmp41_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp41_, "one"), "ro_map.has_key (\"one\")");
	_tmp42_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp42_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_tmp43_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp43_, "two"), "ro_map.has_key (\"two\")");
	_tmp44_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp44_, "two", "two"), "ro_map.has (\"two\", \"two\")");
	_g_object_unref0 (iterator);
}

void
read_only_map_tests_test_immutable (ReadOnlyMapTests* self)
{
	GeeMap* _tmp0_;
	GeeMap* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeMap* _tmp4_;
	GeeMap* _tmp5_;
	GeeMap* dummy = NULL;
	GeeHashMap* _tmp6_;
	GeeMap* _tmp7_;
	GeeMap* _tmp8_;
	GeeMap* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	GeeMap* _tmp13_;
	GeeMap* _tmp14_;
	GeeMap* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	GeeMap* _tmp19_;
	GeeMap* _tmp20_;
	GeeMap* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	GeeMap* _tmp25_;
	GeeMap* _tmp26_;
	GeeMap* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	GeeMap* _tmp32_;
	GeeMap* _tmp33_;
	GeeMap* _tmp36_;
	gint _tmp37_;
	gint _tmp38_;
	GeeMap* _tmp39_;
	GeeMap* _tmp40_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->test_map;
	gee_map_set (_tmp0_, "one", "one");
	_tmp1_ = self->ro_map;
	_tmp2_ = gee_map_get_size (_tmp1_);
	_tmp3_ = _tmp2_;
	_vala_assert (_tmp3_ == 1, "ro_map.size == 1");
	_tmp4_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp4_, "one"), "ro_map.has_key (\"one\")");
	_tmp5_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp5_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	dummy = (GeeMap*) _tmp6_;
	_tmp7_ = dummy;
	gee_map_set (_tmp7_, "one", "one");
	_tmp8_ = dummy;
	gee_map_set (_tmp8_, "two", "two");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeMap* _tmp9_;
		_tmp9_ = self->ro_map;
		gee_map_set (_tmp9_, "two", "two");
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp10_ = self->ro_map;
	_tmp11_ = gee_map_get_size (_tmp10_);
	_tmp12_ = _tmp11_;
	_vala_assert (_tmp12_ == 1, "ro_map.size == 1");
	_tmp13_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp13_, "one"), "ro_map.has_key (\"one\")");
	_tmp14_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp14_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeMap* _tmp15_;
		_tmp15_ = self->ro_map;
		gee_map_clear (_tmp15_);
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp16_ = self->ro_map;
	_tmp17_ = gee_map_get_size (_tmp16_);
	_tmp18_ = _tmp17_;
	_vala_assert (_tmp18_ == 1, "ro_map.size == 1");
	_tmp19_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp19_, "one"), "ro_map.has_key (\"one\")");
	_tmp20_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp20_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeMap* _tmp21_;
		_tmp21_ = self->ro_map;
		_vala_assert (gee_map_unset (_tmp21_, "one", NULL), "ro_map.unset (\"one\")");
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp22_ = self->ro_map;
	_tmp23_ = gee_map_get_size (_tmp22_);
	_tmp24_ = _tmp23_;
	_vala_assert (_tmp24_ == 1, "ro_map.size == 1");
	_tmp25_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp25_, "one"), "ro_map.has_key (\"one\")");
	_tmp26_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp26_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeMap* _tmp27_;
		GeeMap* _tmp28_;
		_tmp27_ = self->ro_map;
		_tmp28_ = dummy;
		gee_map_set_all (_tmp27_, _tmp28_);
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp29_ = self->ro_map;
	_tmp30_ = gee_map_get_size (_tmp29_);
	_tmp31_ = _tmp30_;
	_vala_assert (_tmp31_ == 1, "ro_map.size == 1");
	_tmp32_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp32_, "one"), "ro_map.has_key (\"one\")");
	_tmp33_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp33_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	if (g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
		GeeMap* _tmp34_;
		GeeMap* _tmp35_;
		_tmp34_ = self->ro_map;
		_tmp35_ = dummy;
		_vala_assert (gee_map_unset_all (_tmp34_, _tmp35_), "ro_map.unset_all (dummy)");
		exit (0);
	}
	g_test_trap_assert_failed ();
	_tmp36_ = self->ro_map;
	_tmp37_ = gee_map_get_size (_tmp36_);
	_tmp38_ = _tmp37_;
	_vala_assert (_tmp38_ == 1, "ro_map.size == 1");
	_tmp39_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp39_, "one"), "ro_map.has_key (\"one\")");
	_tmp40_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp40_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_g_object_unref0 (dummy);
}

void
read_only_map_tests_test_accurate_view (ReadOnlyMapTests* self)
{
	GeeMap* dummy = NULL;
	GeeHashMap* _tmp0_;
	GeeMap* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeMap* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GeeMap* _tmp7_;
	GeeMap* _tmp8_;
	GeeMap* _tmp9_;
	gpointer _tmp10_;
	gchar* _tmp11_;
	GeeMap* _tmp12_;
	GeeMap* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	GeeMap* _tmp16_;
	gboolean _tmp17_;
	gboolean _tmp18_;
	GeeMap* _tmp19_;
	GeeMap* _tmp20_;
	GeeMap* _tmp21_;
	gpointer _tmp22_;
	gchar* _tmp23_;
	GeeMap* _tmp24_;
	GeeMap* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	GeeMap* _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_;
	GeeMap* _tmp31_;
	GeeMap* _tmp32_;
	GeeMap* _tmp33_;
	gpointer _tmp34_;
	gchar* _tmp35_;
	GeeMap* _tmp36_;
	GeeMap* _tmp37_;
	GeeMap* _tmp38_;
	gpointer _tmp39_;
	gchar* _tmp40_;
	GeeMap* _tmp41_;
	GeeMap* _tmp42_;
	GeeMap* _tmp43_;
	gint _tmp44_;
	gint _tmp45_;
	GeeMap* _tmp46_;
	gboolean _tmp47_;
	gboolean _tmp48_;
	GeeMap* _tmp49_;
	GeeMap* _tmp50_;
	GeeMap* _tmp51_;
	gpointer _tmp52_;
	gchar* _tmp53_;
	GeeMap* _tmp54_;
	GeeMap* _tmp55_;
	GeeMap* _tmp56_;
	gpointer _tmp57_;
	gchar* _tmp58_;
	GeeMap* _tmp59_;
	GeeMap* _tmp60_;
	GeeMap* _tmp61_;
	gint _tmp62_;
	gint _tmp63_;
	GeeMap* _tmp64_;
	gboolean _tmp65_;
	gboolean _tmp66_;
	GeeMap* _tmp67_;
	GeeMap* _tmp68_;
	GeeMap* _tmp69_;
	gpointer _tmp70_;
	gchar* _tmp71_;
	GeeMap* _tmp72_;
	gpointer _tmp73_;
	gchar* _tmp74_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	dummy = (GeeMap*) _tmp0_;
	gee_map_set (dummy, "one", "one");
	gee_map_set (dummy, "two", "two");
	_tmp1_ = self->ro_map;
	_tmp2_ = gee_map_get_size (_tmp1_);
	_tmp3_ = _tmp2_;
	_vala_assert (_tmp3_ == 0, "ro_map.size == 0");
	_tmp4_ = self->ro_map;
	_tmp5_ = gee_map_get_is_empty (_tmp4_);
	_tmp6_ = _tmp5_;
	_vala_assert (_tmp6_, "ro_map.is_empty");
	_tmp7_ = self->ro_map;
	_vala_assert (!gee_map_has_key (_tmp7_, "one"), "! ro_map.has_key (\"one\")");
	_tmp8_ = self->ro_map;
	_vala_assert (!gee_map_has (_tmp8_, "one", "one"), "! ro_map.has (\"one\", \"one\")");
	_tmp9_ = self->ro_map;
	_tmp10_ = gee_map_get (_tmp9_, "one");
	_tmp11_ = (gchar*) _tmp10_;
	_vala_assert (_tmp11_ == NULL, "ro_map.get (\"one\") == null");
	_g_free0 (_tmp11_);
	_tmp12_ = self->test_map;
	gee_map_set (_tmp12_, "one", "one");
	_tmp13_ = self->ro_map;
	_tmp14_ = gee_map_get_size (_tmp13_);
	_tmp15_ = _tmp14_;
	_vala_assert (_tmp15_ == 1, "ro_map.size == 1");
	_tmp16_ = self->ro_map;
	_tmp17_ = gee_map_get_is_empty (_tmp16_);
	_tmp18_ = _tmp17_;
	_vala_assert (!_tmp18_, "! ro_map.is_empty");
	_tmp19_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp19_, "one"), "ro_map.has_key (\"one\")");
	_tmp20_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp20_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_tmp21_ = self->ro_map;
	_tmp22_ = gee_map_get (_tmp21_, "one");
	_tmp23_ = (gchar*) _tmp22_;
	_vala_assert (g_strcmp0 (_tmp23_, "one") == 0, "ro_map.get (\"one\") == \"one\"");
	_g_free0 (_tmp23_);
	_tmp24_ = self->test_map;
	gee_map_set (_tmp24_, "two", "two");
	_tmp25_ = self->ro_map;
	_tmp26_ = gee_map_get_size (_tmp25_);
	_tmp27_ = _tmp26_;
	_vala_assert (_tmp27_ == 2, "ro_map.size == 2");
	_tmp28_ = self->ro_map;
	_tmp29_ = gee_map_get_is_empty (_tmp28_);
	_tmp30_ = _tmp29_;
	_vala_assert (!_tmp30_, "! ro_map.is_empty");
	_tmp31_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp31_, "one"), "ro_map.has_key (\"one\")");
	_tmp32_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp32_, "one", "one"), "ro_map.has (\"one\", \"one\")");
	_tmp33_ = self->ro_map;
	_tmp34_ = gee_map_get (_tmp33_, "one");
	_tmp35_ = (gchar*) _tmp34_;
	_vala_assert (g_strcmp0 (_tmp35_, "one") == 0, "ro_map.get (\"one\") == \"one\"");
	_g_free0 (_tmp35_);
	_tmp36_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp36_, "two"), "ro_map.has_key (\"two\")");
	_tmp37_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp37_, "two", "two"), "ro_map.has (\"two\", \"two\")");
	_tmp38_ = self->ro_map;
	_tmp39_ = gee_map_get (_tmp38_, "two");
	_tmp40_ = (gchar*) _tmp39_;
	_vala_assert (g_strcmp0 (_tmp40_, "two") == 0, "ro_map.get (\"two\") == \"two\"");
	_g_free0 (_tmp40_);
	_tmp41_ = self->ro_map;
	_vala_assert (gee_map_has_all (_tmp41_, dummy), "ro_map.has_all (dummy)");
	_tmp42_ = self->test_map;
	_vala_assert (gee_map_unset (_tmp42_, "one", NULL), "test_map.unset (\"one\")");
	_tmp43_ = self->ro_map;
	_tmp44_ = gee_map_get_size (_tmp43_);
	_tmp45_ = _tmp44_;
	_vala_assert (_tmp45_ == 1, "ro_map.size == 1");
	_tmp46_ = self->ro_map;
	_tmp47_ = gee_map_get_is_empty (_tmp46_);
	_tmp48_ = _tmp47_;
	_vala_assert (!_tmp48_, "! ro_map.is_empty");
	_tmp49_ = self->ro_map;
	_vala_assert (!gee_map_has_key (_tmp49_, "one"), "! ro_map.has_key (\"one\")");
	_tmp50_ = self->ro_map;
	_vala_assert (!gee_map_has (_tmp50_, "one", "one"), "! ro_map.has (\"one\", \"one\")");
	_tmp51_ = self->ro_map;
	_tmp52_ = gee_map_get (_tmp51_, "one");
	_tmp53_ = (gchar*) _tmp52_;
	_vala_assert (_tmp53_ == NULL, "ro_map.get (\"one\") == null");
	_g_free0 (_tmp53_);
	_tmp54_ = self->ro_map;
	_vala_assert (gee_map_has_key (_tmp54_, "two"), "ro_map.has_key (\"two\")");
	_tmp55_ = self->ro_map;
	_vala_assert (gee_map_has (_tmp55_, "two", "two"), "ro_map.has (\"two\", \"two\")");
	_tmp56_ = self->ro_map;
	_tmp57_ = gee_map_get (_tmp56_, "two");
	_tmp58_ = (gchar*) _tmp57_;
	_vala_assert (g_strcmp0 (_tmp58_, "two") == 0, "ro_map.get (\"two\") == \"two\"");
	_g_free0 (_tmp58_);
	_tmp59_ = self->ro_map;
	_vala_assert (!gee_map_has_all (_tmp59_, dummy), "! ro_map.has_all (dummy)");
	_tmp60_ = self->test_map;
	gee_map_clear (_tmp60_);
	_tmp61_ = self->ro_map;
	_tmp62_ = gee_map_get_size (_tmp61_);
	_tmp63_ = _tmp62_;
	_vala_assert (_tmp63_ == 0, "ro_map.size == 0");
	_tmp64_ = self->ro_map;
	_tmp65_ = gee_map_get_is_empty (_tmp64_);
	_tmp66_ = _tmp65_;
	_vala_assert (_tmp66_, "ro_map.is_empty");
	_tmp67_ = self->ro_map;
	_vala_assert (!gee_map_has (_tmp67_, "one", "one"), "! ro_map.has (\"one\", \"one\")");
	_tmp68_ = self->ro_map;
	_vala_assert (!gee_map_has (_tmp68_, "two", "two"), "! ro_map.has (\"two\", \"two\")");
	_tmp69_ = self->ro_map;
	_tmp70_ = gee_map_get (_tmp69_, "one");
	_tmp71_ = (gchar*) _tmp70_;
	_vala_assert (_tmp71_ == NULL, "ro_map.get (\"one\") == null");
	_g_free0 (_tmp71_);
	_tmp72_ = self->ro_map;
	_tmp73_ = gee_map_get (_tmp72_, "two");
	_tmp74_ = (gchar*) _tmp73_;
	_vala_assert (_tmp74_ == NULL, "ro_map.get (\"two\") == null");
	_g_free0 (_tmp74_);
	_g_object_unref0 (dummy);
}

static void
read_only_map_tests_class_init (ReadOnlyMapTestsClass * klass,
                                gpointer klass_data)
{
	read_only_map_tests_parent_class = g_type_class_peek_parent (klass);
	((GeeTestCaseClass *) klass)->set_up = (void (*) (GeeTestCase*)) read_only_map_tests_real_set_up;
	((GeeTestCaseClass *) klass)->tear_down = (void (*) (GeeTestCase*)) read_only_map_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = read_only_map_tests_finalize;
}

static void
read_only_map_tests_instance_init (ReadOnlyMapTests * self,
                                   gpointer klass)
{
}

static void
read_only_map_tests_finalize (GObject * obj)
{
	ReadOnlyMapTests * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTests);
	_g_object_unref0 (self->test_map);
	_g_object_unref0 (self->ro_map);
	G_OBJECT_CLASS (read_only_map_tests_parent_class)->finalize (obj);
}

static GType
read_only_map_tests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ReadOnlyMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) read_only_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ReadOnlyMapTests), 0, (GInstanceInitFunc) read_only_map_tests_instance_init, NULL };
	GType read_only_map_tests_type_id;
	read_only_map_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "ReadOnlyMapTests", &g_define_type_info, 0);
	return read_only_map_tests_type_id;
}

GType
read_only_map_tests_get_type (void)
{
	static volatile gsize read_only_map_tests_type_id__once = 0;
	if (g_once_init_enter (&read_only_map_tests_type_id__once)) {
		GType read_only_map_tests_type_id;
		read_only_map_tests_type_id = read_only_map_tests_get_type_once ();
		g_once_init_leave (&read_only_map_tests_type_id__once, read_only_map_tests_type_id);
	}
	return read_only_map_tests_type_id__once;
}

