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

/* monitor-test.vala
 *
 * Copyright © 2012 Christian Dywan <christian@twotoasts.de>
 *
 * 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"
#include "zeitgeist.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 _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);



gint _vala_main (gchar** argv, int argv_length1);
void monitor_create_test (void);
static void _monitor_create_test_gtest_func (void);
static void _g_object_unref0_ (gpointer var);


static void _monitor_create_test_gtest_func (void) {
#line 27 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	monitor_create_test ();
#line 46 "monitor-test.c"
}


gint _vala_main (gchar** argv, int argv_length1) {
	gint result = 0;
	gint _tmp0_ = 0;
#line 25 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	g_test_init (&argv_length1, &argv, NULL);
#line 27 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	g_test_add_func ("/Monitor/Create", _monitor_create_test_gtest_func);
#line 29 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp0_ = g_test_run ();
#line 29 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	result = _tmp0_;
#line 29 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	return result;
#line 63 "monitor-test.c"
}


int main (int argc, char ** argv) {
#line 23 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	g_type_init ();
#line 23 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	return _vala_main (argv, argc);
#line 72 "monitor-test.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 34 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 79 "monitor-test.c"
}


static gpointer _g_ptr_array_ref0 (gpointer self) {
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	return self ? g_ptr_array_ref (self) : NULL;
#line 86 "monitor-test.c"
}


void monitor_create_test (void) {
	GPtrArray* _tmp0_;
	GPtrArray* event_templates;
	ZeitgeistTimeRange* _tmp1_;
	ZeitgeistTimeRange* _tmp2_;
	GPtrArray* _tmp3_;
	ZeitgeistMonitor* _tmp4_;
	ZeitgeistMonitor* _tmp5_;
	ZeitgeistMonitor* mon;
	ZeitgeistTimeRange* _tmp6_;
	ZeitgeistTimeRange* _tmp7_;
	gint64 _tmp8_;
	gint64 _tmp9_;
	ZeitgeistTimeRange* _tmp10_;
	ZeitgeistTimeRange* _tmp11_;
	gint64 _tmp12_;
	gint64 _tmp13_;
	GPtrArray* _tmp14_ = NULL;
	GPtrArray* _tmp15_;
#line 34 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp0_ = g_ptr_array_new_with_free_func (_g_object_unref0_);
#line 34 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	event_templates = _tmp0_;
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp1_ = zeitgeist_time_range_new ((gint64) 27, (gint64) 68);
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp2_ = _tmp1_;
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp3_ = _g_ptr_array_ref0 (event_templates);
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp4_ = zeitgeist_monitor_new (_tmp2_, _tmp3_);
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp5_ = _tmp4_;
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_g_object_unref0 (_tmp2_);
#line 35 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	mon = _tmp5_;
#line 36 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp6_ = zeitgeist_monitor_get_time_range (mon);
#line 36 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp7_ = _tmp6_;
#line 36 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp8_ = zeitgeist_time_range_get_start (_tmp7_);
#line 36 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp9_ = _tmp8_;
#line 36 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_vala_assert (((gint64) 27) == _tmp9_, "27 == mon.time_range.start");
#line 37 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp10_ = zeitgeist_monitor_get_time_range (mon);
#line 37 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp11_ = _tmp10_;
#line 37 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp12_ = zeitgeist_time_range_get_end (_tmp11_);
#line 37 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp13_ = _tmp12_;
#line 37 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_vala_assert (((gint64) 68) == _tmp13_, "68 == mon.time_range.end");
#line 39 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp14_ = zeitgeist_monitor_get_templates (mon);
#line 39 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_tmp15_ = _tmp14_;
#line 39 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_vala_assert (event_templates == _tmp15_, "event_templates == mon.get_templates()");
#line 39 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_g_ptr_array_unref0 (_tmp15_);
#line 32 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_g_object_unref0 (mon);
#line 32 "/home/manish/code/zeitgeist/test/direct/monitor-test.vala"
	_g_ptr_array_unref0 (event_templates);
#line 159 "monitor-test.c"
}



