/* datasource-test.c generated by valac 0.35.5, the Vala compiler
 * generated from datasource-test.vala, do not modify */

/* datamodel-test.vala
 *
 * Copyright © 2012 Canonical Ltd.
 *             By Siegfried-A. Gevatter <siegfried.gevatter@collabora.co.uk>
 *
 * This program 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 program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include "zeitgeist-datamodel.h"

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (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);



gint _vala_main (gchar** argv, int argv_length1);
void create_empty_test (void);
static void _create_empty_test_gtest_func (void);
void create_full_test (void);
static void _create_full_test_gtest_func (void);
void to_from_variant_test (void);
static void _to_from_variant_test_gtest_func (void);
static void _g_object_unref0_ (gpointer var);


static void _create_empty_test_gtest_func (void) {
#line 28 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	create_empty_test ();
#line 54 "datasource-test.c"
}


static void _create_full_test_gtest_func (void) {
#line 29 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	create_full_test ();
#line 61 "datasource-test.c"
}


static void _to_from_variant_test_gtest_func (void) {
#line 30 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	to_from_variant_test ();
#line 68 "datasource-test.c"
}


gint _vala_main (gchar** argv, int argv_length1) {
	gint result = 0;
	gint _tmp0_;
#line 26 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_test_init (&argv_length1, &argv, NULL);
#line 28 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_test_add_func ("/Datasource/CreateEmpty", _create_empty_test_gtest_func);
#line 29 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_test_add_func ("/Datasource/CreateFull", _create_full_test_gtest_func);
#line 30 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_test_add_func ("/Datasource/ToFromVariant", _to_from_variant_test_gtest_func);
#line 32 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp0_ = g_test_run ();
#line 32 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	result = _tmp0_;
#line 32 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	return result;
#line 89 "datasource-test.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 24 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	return _vala_main (argv, argc);
#line 99 "datasource-test.c"
}


void create_empty_test (void) {
	ZeitgeistDataSource* src;
	ZeitgeistDataSource* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GPtrArray* _tmp7_;
	GPtrArray* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	gint64 _tmp11_;
	gint64 _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
#line 37 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp0_ = zeitgeist_data_source_new ();
#line 37 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	src = _tmp0_;
#line 38 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp1_ = zeitgeist_data_source_get_unique_id (src);
#line 38 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp2_ = _tmp1_;
#line 38 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp2_, ==, NULL);
#line 39 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp3_ = zeitgeist_data_source_get_name (src);
#line 39 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp4_ = _tmp3_;
#line 39 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp4_, ==, NULL);
#line 40 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp5_ = zeitgeist_data_source_get_description (src);
#line 40 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp6_ = _tmp5_;
#line 40 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp6_, ==, NULL);
#line 41 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp7_ = zeitgeist_data_source_get_event_templates (src);
#line 41 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp8_ = _tmp7_;
#line 41 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp8_ == NULL, "src.event_templates == null");
#line 42 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp9_ = zeitgeist_data_source_get_running (src);
#line 42 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp10_ = _tmp9_;
#line 42 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp10_ == FALSE, "src.running == false");
#line 43 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp11_ = zeitgeist_data_source_get_timestamp (src);
#line 43 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp12_ = _tmp11_;
#line 43 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp12_ == ((gint64) 0), "src.timestamp == 0");
#line 44 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp13_ = zeitgeist_data_source_get_enabled (src);
#line 44 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp14_ = _tmp13_;
#line 44 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp14_ == TRUE, "src.enabled == true");
#line 35 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_object_unref0 (src);
#line 168 "datasource-test.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 67 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 175 "datasource-test.c"
}


void create_full_test (void) {
	ZeitgeistDataSource* src;
	ZeitgeistDataSource* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GPtrArray* _tmp7_;
	GPtrArray* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	gint64 _tmp11_;
	gint64 _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	gint64 now;
	gint64 _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	gint64 _tmp18_;
	gint64 _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	GPtrArray* event_templates;
	GPtrArray* _tmp22_;
	ZeitgeistEvent* _tmp23_;
	GPtrArray* _tmp24_;
	GPtrArray* _tmp25_;
#line 49 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp0_ = zeitgeist_data_source_new_full ("my-id", "my-name", "my-desc", NULL);
#line 49 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	src = _tmp0_;
#line 51 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp1_ = zeitgeist_data_source_get_unique_id (src);
#line 51 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp2_ = _tmp1_;
#line 51 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp2_, ==, "my-id");
#line 52 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp3_ = zeitgeist_data_source_get_name (src);
#line 52 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp4_ = _tmp3_;
#line 52 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp4_, ==, "my-name");
#line 53 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp5_ = zeitgeist_data_source_get_description (src);
#line 53 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp6_ = _tmp5_;
#line 53 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp6_, ==, "my-desc");
#line 54 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp7_ = zeitgeist_data_source_get_event_templates (src);
#line 54 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp8_ = _tmp7_;
#line 54 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp8_ == NULL, "src.event_templates == null");
#line 55 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp9_ = zeitgeist_data_source_get_running (src);
#line 55 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp10_ = _tmp9_;
#line 55 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp10_ == FALSE, "src.running == false");
#line 56 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp11_ = zeitgeist_data_source_get_timestamp (src);
#line 56 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp12_ = _tmp11_;
#line 56 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp12_ == ((gint64) 0), "src.timestamp ==  0");
#line 57 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp13_ = zeitgeist_data_source_get_enabled (src);
#line 57 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp14_ = _tmp13_;
#line 57 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp14_ == TRUE, "src.enabled == true");
#line 59 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp15_ = zeitgeist_timestamp_from_now ();
#line 59 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	now = _tmp15_;
#line 60 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_running (src, TRUE);
#line 61 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_timestamp (src, now);
#line 62 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_enabled (src, FALSE);
#line 63 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp16_ = zeitgeist_data_source_get_running (src);
#line 63 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp17_ = _tmp16_;
#line 63 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp17_ == TRUE, "src.running == true");
#line 64 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp18_ = zeitgeist_data_source_get_timestamp (src);
#line 64 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp19_ = _tmp18_;
#line 64 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp19_ == now, "src.timestamp == now");
#line 65 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp20_ = zeitgeist_data_source_get_enabled (src);
#line 65 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp21_ = _tmp20_;
#line 65 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp21_ == FALSE, "src.enabled == false");
#line 67 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp22_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
#line 67 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	event_templates = _tmp22_;
#line 68 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp23_ = zeitgeist_event_new ();
#line 68 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_ptr_array_add (event_templates, _tmp23_);
#line 69 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_event_templates (src, event_templates);
#line 70 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp24_ = zeitgeist_data_source_get_event_templates (src);
#line 70 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp25_ = _tmp24_;
#line 70 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp25_ == event_templates, "src.event_templates == event_templates");
#line 47 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_ptr_array_unref0 (event_templates);
#line 47 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_object_unref0 (src);
#line 303 "datasource-test.c"
}


static gpointer _g_ptr_array_ref0 (gpointer self) {
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	return self ? g_ptr_array_ref (self) : NULL;
#line 310 "datasource-test.c"
}


static gint g_ptr_array_get_length (GPtrArray* self) {
	gint result;
	guint _tmp0_;
#line 4933 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 4933 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = self->len;
#line 4933 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	result = (gint) _tmp0_;
#line 4933 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 325 "datasource-test.c"
}


static void g_ptr_array_set_length (GPtrArray* self, gint value) {
	gint _tmp0_;
#line 4934 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4934 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = value;
#line 4934 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, _tmp0_);
#line 337 "datasource-test.c"
}


void to_from_variant_test (void) {
	ZeitgeistDataSource* orig;
	ZeitgeistDataSource* _tmp0_;
	gint64 now;
	gint64 _tmp1_;
	GPtrArray* event_templates;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	ZeitgeistEvent* _tmp4_;
	GPtrArray* _tmp5_;
	ZeitgeistDataSource* src;
	GVariant* _tmp6_;
	GVariant* _tmp7_;
	ZeitgeistDataSource* _tmp8_;
	ZeitgeistDataSource* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	GPtrArray* _tmp16_;
	GPtrArray* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	gint64 _tmp20_;
	gint64 _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	GPtrArray* _tmp24_;
	GPtrArray* _tmp25_;
	GPtrArray* _tmp26_;
	GPtrArray* _tmp27_;
	gint _tmp28_;
	gint _tmp29_;
	GPtrArray* _tmp30_;
	gconstpointer _tmp31_;
	GError * _inner_error_ = NULL;
#line 75 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp0_ = zeitgeist_data_source_new_full ("my-id", "my-name", "my-desc", NULL);
#line 75 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	orig = _tmp0_;
#line 76 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp1_ = zeitgeist_timestamp_from_now ();
#line 76 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	now = _tmp1_;
#line 77 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_timestamp (orig, now);
#line 79 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp2_ = g_ptr_array_new_full ((guint) 0, _g_object_unref0_);
#line 79 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	event_templates = _tmp2_;
#line 80 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp3_ = event_templates;
#line 80 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp4_ = zeitgeist_event_new ();
#line 80 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_ptr_array_add (_tmp3_, _tmp4_);
#line 81 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp5_ = event_templates;
#line 81 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	zeitgeist_data_source_set_event_templates (orig, _tmp5_);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp6_ = zeitgeist_data_source_to_variant (orig);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp7_ = _tmp6_;
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp8_ = zeitgeist_data_source_new_from_variant (_tmp7_, FALSE, &_inner_error_);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp9_ = _tmp8_;
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_variant_unref0 (_tmp7_);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	src = _tmp9_;
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
		_g_ptr_array_unref0 (event_templates);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
		_g_object_unref0 (orig);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
		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);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
		g_clear_error (&_inner_error_);
#line 83 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
		return;
#line 427 "datasource-test.c"
	}
#line 84 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp10_ = zeitgeist_data_source_get_unique_id (src);
#line 84 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp11_ = _tmp10_;
#line 84 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp11_, ==, "my-id");
#line 85 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp12_ = zeitgeist_data_source_get_name (src);
#line 85 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp13_ = _tmp12_;
#line 85 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp13_, ==, "my-name");
#line 86 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp14_ = zeitgeist_data_source_get_description (src);
#line 86 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp15_ = _tmp14_;
#line 86 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpstr (_tmp15_, ==, "my-desc");
#line 87 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp16_ = zeitgeist_data_source_get_event_templates (src);
#line 87 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp17_ = _tmp16_;
#line 87 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp17_ != NULL, "src.event_templates != null");
#line 88 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp18_ = zeitgeist_data_source_get_running (src);
#line 88 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp19_ = _tmp18_;
#line 88 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp19_ == FALSE, "src.running == false");
#line 89 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp20_ = zeitgeist_data_source_get_timestamp (src);
#line 89 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp21_ = _tmp20_;
#line 89 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp21_ == now, "src.timestamp == now");
#line 90 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp22_ = zeitgeist_data_source_get_enabled (src);
#line 90 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp23_ = _tmp22_;
#line 90 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (_tmp23_ == TRUE, "src.enabled == true");
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp24_ = zeitgeist_data_source_get_event_templates (src);
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp25_ = _tmp24_;
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp26_ = _g_ptr_array_ref0 (_tmp25_);
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_ptr_array_unref0 (event_templates);
#line 92 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	event_templates = _tmp26_;
#line 93 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp27_ = event_templates;
#line 93 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp28_ = g_ptr_array_get_length (_tmp27_);
#line 93 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp29_ = _tmp28_;
#line 93 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	g_assert_cmpint (_tmp29_, ==, 1);
#line 94 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp30_ = event_templates;
#line 94 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_tmp31_ = g_ptr_array_index (_tmp30_, (guint) 0);
#line 94 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE ((ZeitgeistEvent*) _tmp31_, ZEITGEIST_TYPE_EVENT), "event_templates.get (0) is Event");
#line 73 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_object_unref0 (src);
#line 73 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_ptr_array_unref0 (event_templates);
#line 73 "/home/rico/sources/repos-git/zeitgeist/zeitgeist/test/direct/datasource-test.vala"
	_g_object_unref0 (orig);
#line 501 "datasource-test.c"
}



