Exemple #1
0
static void keymap_tests_test_creation (KeymapTests* self) {
	KkcRuleMetadata* metadata = NULL;
	KkcRuleMetadata* _tmp0_ = NULL;
	KkcRuleMetadata* _tmp1_ = NULL;
	KkcRuleMetadata* _tmp2_ = NULL;
	KkcRuleMetadata* _tmp3_ = NULL;
#line 10 "/home/ueno/devel/libkkc/tests/keymap.vala"
	g_return_if_fail (self != NULL);
#line 13 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp0_ = kkc_rule_metadata_find ("nonexistent");
#line 13 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (metadata);
#line 13 "/home/ueno/devel/libkkc/tests/keymap.vala"
	metadata = _tmp0_;
#line 14 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp1_ = metadata;
#line 14 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_vala_assert (_tmp1_ == NULL, "metadata == null");
#line 16 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp2_ = kkc_rule_metadata_find ("kana");
#line 16 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (metadata);
#line 16 "/home/ueno/devel/libkkc/tests/keymap.vala"
	metadata = _tmp2_;
#line 17 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp3_ = metadata;
#line 17 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_vala_assert (_tmp3_ != NULL, "metadata != null");
#line 10 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (metadata);
#line 132 "keymap.c"
}
Exemple #2
0
void soy_fields_shockwave_activate (soyfieldsShockwave* self) {
	gfloat _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_t0;
	_vala_assert (_tmp0_ != ((gfloat) 0), "self._t0 != 0");
	self->priv->_t0 = (gfloat) 0;
	self->priv->_inner = (gfloat) 0;
	self->priv->_outer = (gfloat) 0;
}
void clutter_box2_d_tests_clutter_box2_dlayout_manager_tests_test_clutterbox2d_layout_manager_new (ClutterBox2DTestsClutterBox2DLayoutManagerTests* self) {
	ClutterBox2DLayoutManager* lm = NULL;
	ClutterBox2DLayoutManager* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = clutter_box2_d_layout_manager_new ();
	g_object_ref_sink (_tmp0_);
	lm = _tmp0_;
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (lm, CLUTTER_BOX2_D_TYPE_LAYOUT_MANAGER), "lm is LayoutManager");
	_g_object_unref0 (lm);
}
Exemple #4
0
void plank_tests_drawing_docksurface_gaussian_blur (void) {
	PlankDrawingColor color = {0};
	PlankDrawingColor color2 = {0};
	PlankDrawingDockSurface* surface = NULL;
	PlankDrawingDockSurface* surface2 = NULL;
	GdkPixbuf* pixbuf = NULL;
	GdkPixbuf* _tmp0_ = NULL;
	PlankDrawingDockSurface* _tmp1_ = NULL;
	PlankDrawingDockSurface* _tmp2_ = NULL;
	cairo_t* cr = NULL;
	cairo_t* _tmp3_ = NULL;
	cairo_t* _tmp4_ = NULL;
	cairo_t* cr2 = NULL;
	cairo_t* _tmp5_ = NULL;
	cairo_t* _tmp6_ = NULL;
	PlankDrawingColor _tmp7_ = {0};
	PlankDrawingColor _tmp8_ = {0};
	PlankDrawingColor _tmp9_ = {0};
	PlankDrawingColor _tmp10_ = {0};
	_tmp0_ = plank_drawing_drawing_service_load_icon (PLANK_TESTS_TEST_ICON, 256, 256);
	_g_object_unref0 (pixbuf);
	pixbuf = _tmp0_;
	_tmp1_ = plank_drawing_dock_surface_new (256, 256);
	_g_object_unref0 (surface);
	surface = _tmp1_;
	_tmp2_ = plank_drawing_dock_surface_new (256, 256);
	_g_object_unref0 (surface2);
	surface2 = _tmp2_;
	_tmp3_ = plank_drawing_dock_surface_get_Context (surface);
	_tmp4_ = _tmp3_;
	cr = _tmp4_;
	gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble) 0, (gdouble) 0);
	cairo_paint (cr);
	_tmp5_ = plank_drawing_dock_surface_get_Context (surface2);
	_tmp6_ = _tmp5_;
	cr2 = _tmp6_;
	gdk_cairo_set_source_pixbuf (cr2, pixbuf, (gdouble) 0, (gdouble) 0);
	cairo_paint (cr2);
	plank_drawing_dock_surface_gaussian_blur (surface, 7);
	plank_drawing_dock_surface_gaussian_blur (surface, 15);
	plank_drawing_dock_surface_gaussian_blur (surface, 31);
	plank_drawing_dock_surface_gaussian_blur (surface2, 7);
	plank_drawing_dock_surface_gaussian_blur (surface2, 15);
	plank_drawing_dock_surface_gaussian_blur (surface2, 31);
	plank_drawing_dock_surface_average_color (surface, &_tmp7_);
	color = _tmp7_;
	plank_drawing_dock_surface_average_color (surface2, &_tmp8_);
	color2 = _tmp8_;
	_tmp9_ = color;
	_tmp10_ = color2;
	_vala_assert (_plank_drawing_color_equal (&_tmp9_, &_tmp10_) == TRUE, "color == color2");
	_g_object_unref0 (pixbuf);
	_g_object_unref0 (surface2);
	_g_object_unref0 (surface);
}
Exemple #5
0
void object_tests_new_object (ObjectTests* self) {
	ValaradeObject* obj = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_ = NULL;
	ValaradeObject* _tmp2_ = NULL;
	ValaradeObject* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
#line 23 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	g_return_if_fail (self != NULL);
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp0_ = (GtkLabel*) gtk_label_new ("Hello World");
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	g_object_ref_sink (_tmp0_);
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp1_ = _tmp0_;
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp2_ = valarade_object_new (gtk_widget_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, (GtkWidget*) _tmp1_, NULL);
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp3_ = _tmp2_;
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_g_object_unref0 (_tmp1_);
#line 24 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	obj = _tmp3_;
#line 25 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (obj, VALARADE_TYPE_OBJECT), "obj is Valarade.Object");
#line 26 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	valarade_object_set_name (obj, "NewFangledObject");
#line 27 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp4_ = valarade_object_get_name (obj);
#line 27 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_tmp5_ = _tmp4_;
#line 27 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_vala_assert (g_strcmp0 (_tmp5_, "NewFangledObject") == 0, "obj.name == \"NewFangledObject\"");
#line 23 "/home/bizarro/Documents/projects/valarade/tests/libvalarade/test-object.vala"
	_g_object_unref0 (obj);
#line 134 "test-object.c"
}
Exemple #6
0
static void key_event_tests_test_keyname (KeyEventTests* self) {
	gchar* name = NULL;
	gchar* _tmp0_ = NULL;
	guint keyval = 0U;
	guint _tmp1_ = 0U;
#line 57 "/home/ueno/devel/libkkc/tests/key-event.vala"
	g_return_if_fail (self != NULL);
#line 58 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp0_ = kkc_key_event_utils_keyval_name (KKC_KEYSYMS_VoidSymbol);
#line 58 "/home/ueno/devel/libkkc/tests/key-event.vala"
	name = _tmp0_;
#line 59 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_vala_assert (g_strcmp0 (name, "VoidSymbol") == 0, "name == \"VoidSymbol\"");
#line 61 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp1_ = kkc_key_event_utils_keyval_from_name ("VoidSymbol");
#line 61 "/home/ueno/devel/libkkc/tests/key-event.vala"
	keyval = _tmp1_;
#line 62 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_vala_assert (keyval == KKC_KEYSYMS_VoidSymbol, "keyval == Kkc.Keysyms.VoidSymbol");
#line 57 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_free0 (name);
#line 439 "key-event.c"
}
Exemple #7
0
static void key_event_tests_test_properties (KeyEventTests* self) {
	KkcKeyEvent* key = NULL;
	KkcKeyEvent* _tmp0_ = NULL;
	gchar* name = NULL;
	guint unicode = 0U;
	guint keyval = 0U;
	guint keycode = 0U;
	KkcModifierType modifiers = 0;
	const gchar* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 13 "/home/ueno/devel/libkkc/tests/key-event.vala"
	g_return_if_fail (self != NULL);
#line 14 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp0_ = kkc_key_event_new_from_string ("(control a)", &_inner_error_);
#line 14 "/home/ueno/devel/libkkc/tests/key-event.vala"
	key = _tmp0_;
#line 14 "/home/ueno/devel/libkkc/tests/key-event.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 14 "/home/ueno/devel/libkkc/tests/key-event.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 14 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_clear_error (&_inner_error_);
#line 14 "/home/ueno/devel/libkkc/tests/key-event.vala"
		return;
#line 157 "key-event.c"
	}
#line 20 "/home/ueno/devel/libkkc/tests/key-event.vala"
	g_object_get ((GObject*) key, "name", &name, "unicode", &unicode, "keyval", &keyval, "keycode", &keycode, "modifiers", &modifiers, NULL);
#line 25 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp1_ = name;
#line 25 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_vala_assert (g_strcmp0 (_tmp1_, "a") == 0, "name == \"a\"");
#line 13 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_free0 (name);
#line 13 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_object_unref0 (key);
#line 169 "key-event.c"
}
Exemple #8
0
static void key_event_tests_test_kana_filter (KeyEventTests* self) {
	KkcKanaKeyEventFilter* filter = NULL;
	KkcKanaKeyEventFilter* _tmp0_ = NULL;
	KkcKeyEvent* from_key = NULL;
	KkcKeyEvent* _tmp1_ = NULL;
	KkcKeyEvent* to_key = NULL;
	KkcKeyEvent* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	guint _tmp4_ = 0U;
#line 69 "/home/ueno/devel/libkkc/tests/key-event.vala"
	g_return_if_fail (self != NULL);
#line 70 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp0_ = kkc_kana_key_event_filter_new ();
#line 70 "/home/ueno/devel/libkkc/tests/key-event.vala"
	filter = _tmp0_;
#line 71 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp1_ = kkc_key_event_new_from_x_event (KKC_KEYSYMS_backslash, (guint) 124, 0);
#line 71 "/home/ueno/devel/libkkc/tests/key-event.vala"
	from_key = _tmp1_;
#line 74 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp2_ = kkc_key_event_filter_filter_key_event ((KkcKeyEventFilter*) filter, from_key);
#line 74 "/home/ueno/devel/libkkc/tests/key-event.vala"
	to_key = _tmp2_;
#line 75 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp3_ = kkc_key_event_get_keyval (to_key);
#line 75 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_tmp4_ = _tmp3_;
#line 75 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_vala_assert (_tmp4_ == KKC_KEYSYMS_yen, "to_key.keyval == Kkc.Keysyms.yen");
#line 69 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_object_unref0 (to_key);
#line 69 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_object_unref0 (from_key);
#line 69 "/home/ueno/devel/libkkc/tests/key-event.vala"
	_g_object_unref0 (filter);
#line 493 "key-event.c"
}
Exemple #9
0
static void key_event_tests_test_parse (KeyEventTests* self) {
	GError * _inner_error_ = NULL;
#line 28 "/home/ueno/devel/libkkc/tests/key-event.vala"
	g_return_if_fail (self != NULL);
#line 177 "key-event.c"
	{
		gchar* from_str = NULL;
		gchar* _tmp0_ = NULL;
		gchar* to_str = NULL;
		gchar* _tmp1_ = NULL;
		KkcKeyEvent* key = NULL;
		KkcKeyEvent* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 30 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp0_ = g_strdup ("(shift control meta hyper super alt lshift rshift release a)");
#line 30 "/home/ueno/devel/libkkc/tests/key-event.vala"
		from_str = _tmp0_;
#line 31 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp1_ = g_strdup ("(control meta hyper super alt lshift rshift release a)");
#line 31 "/home/ueno/devel/libkkc/tests/key-event.vala"
		to_str = _tmp1_;
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp2_ = kkc_key_event_new_from_string (from_str, &_inner_error_);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
		key = _tmp2_;
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			_g_free0 (to_str);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			_g_free0 (from_str);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 207 "key-event.c"
				goto __catch0_kkc_key_event_format_error;
			}
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			_g_free0 (to_str);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			_g_free0 (from_str);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_clear_error (&_inner_error_);
#line 32 "/home/ueno/devel/libkkc/tests/key-event.vala"
			return;
#line 220 "key-event.c"
		}
#line 33 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp3_ = kkc_key_event_to_string (key);
#line 33 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp4_ = _tmp3_;
#line 33 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_vala_assert (g_strcmp0 (_tmp4_, to_str) == 0, "key.to_string () == to_str");
#line 33 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_free0 (_tmp4_);
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_object_unref0 (key);
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_free0 (to_str);
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_free0 (from_str);
#line 236 "key-event.c"
	}
	goto __finally0;
	__catch0_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		e = _inner_error_;
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_inner_error_ = NULL;
#line 35 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_assert_not_reached ();
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_error_free0 (e);
#line 250 "key-event.c"
	}
	__finally0:
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 29 "/home/ueno/devel/libkkc/tests/key-event.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 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_clear_error (&_inner_error_);
#line 29 "/home/ueno/devel/libkkc/tests/key-event.vala"
		return;
#line 261 "key-event.c"
	}
	{
		KkcKeyEvent* _tmp5_ = NULL;
		KkcKeyEvent* _tmp6_ = NULL;
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp5_ = kkc_key_event_new_from_string ("(nonexistent a)", &_inner_error_);
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp6_ = _tmp5_;
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_object_unref0 (_tmp6_);
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 276 "key-event.c"
				goto __catch1_kkc_key_event_format_error;
			}
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_clear_error (&_inner_error_);
#line 39 "/home/ueno/devel/libkkc/tests/key-event.vala"
			return;
#line 285 "key-event.c"
		}
#line 40 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_assert_not_reached ();
#line 289 "key-event.c"
	}
	goto __finally1;
	__catch1_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
		e = _inner_error_;
#line 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_inner_error_ = NULL;
#line 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_error_free0 (e);
#line 301 "key-event.c"
	}
	__finally1:
#line 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 38 "/home/ueno/devel/libkkc/tests/key-event.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 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_clear_error (&_inner_error_);
#line 38 "/home/ueno/devel/libkkc/tests/key-event.vala"
		return;
#line 312 "key-event.c"
	}
	{
		KkcKeyEvent* _tmp7_ = NULL;
		KkcKeyEvent* _tmp8_ = NULL;
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp7_ = kkc_key_event_new_from_string ("(control foo)", &_inner_error_);
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp8_ = _tmp7_;
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_object_unref0 (_tmp8_);
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 327 "key-event.c"
				goto __catch2_kkc_key_event_format_error;
			}
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_clear_error (&_inner_error_);
#line 45 "/home/ueno/devel/libkkc/tests/key-event.vala"
			return;
#line 336 "key-event.c"
		}
#line 46 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_assert_not_reached ();
#line 340 "key-event.c"
	}
	goto __finally2;
	__catch2_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
		e = _inner_error_;
#line 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_inner_error_ = NULL;
#line 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_error_free0 (e);
#line 352 "key-event.c"
	}
	__finally2:
#line 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 44 "/home/ueno/devel/libkkc/tests/key-event.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 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_clear_error (&_inner_error_);
#line 44 "/home/ueno/devel/libkkc/tests/key-event.vala"
		return;
#line 363 "key-event.c"
	}
	{
		KkcKeyEvent* _tmp9_ = NULL;
		KkcKeyEvent* _tmp10_ = NULL;
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp9_ = kkc_key_event_new_from_string ("S-C-M-G-a", &_inner_error_);
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_tmp10_ = _tmp9_;
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_object_unref0 (_tmp10_);
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
			if (_inner_error_->domain == KKC_KEY_EVENT_FORMAT_ERROR) {
#line 378 "key-event.c"
				goto __catch3_kkc_key_event_format_error;
			}
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
			g_clear_error (&_inner_error_);
#line 51 "/home/ueno/devel/libkkc/tests/key-event.vala"
			return;
#line 387 "key-event.c"
		}
	}
	goto __finally3;
	__catch3_kkc_key_event_format_error:
	{
		GError* e = NULL;
#line 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
		e = _inner_error_;
#line 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_inner_error_ = NULL;
#line 53 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_assert_not_reached ();
#line 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
		_g_error_free0 (e);
#line 402 "key-event.c"
	}
	__finally3:
#line 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 50 "/home/ueno/devel/libkkc/tests/key-event.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 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
		g_clear_error (&_inner_error_);
#line 50 "/home/ueno/devel/libkkc/tests/key-event.vala"
		return;
#line 413 "key-event.c"
	}
}
static void system_dictionary_tests_test_properties (SystemDictionaryTests* self) {
	KkcSystemSegmentDictionary* system_segment_dictionary = NULL;
	gchar* srcdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 9 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 10 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	system_segment_dictionary = NULL;
#line 11 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_tmp0_ = g_getenv ("srcdir");
#line 11 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 11 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	srcdir = _tmp1_;
#line 12 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 108 "system-dictionary.c"
	{
		KkcSystemSegmentDictionary* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		KkcSystemSegmentDictionary* _tmp5_ = NULL;
		KkcSystemSegmentDictionary* _tmp6_ = NULL;
		KkcSystemSegmentDictionary* _tmp7_ = NULL;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp3_ = g_build_filename (srcdir, "system-segment-dictionary", NULL);
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp4_ = _tmp3_;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp5_ = kkc_system_segment_dictionary_new (_tmp4_, "EUC-JP", &_inner_error_);
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp6_ = _tmp5_;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (_tmp4_);
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp2_ = _tmp6_;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 130 "system-dictionary.c"
			goto __catch0_g_error;
		}
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp7_ = _tmp2_;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp2_ = NULL;
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (system_segment_dictionary);
#line 15 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		system_segment_dictionary = _tmp7_;
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp2_);
#line 143 "system-dictionary.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FILE* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 18 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp8_ = stderr;
#line 18 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp9_ = e;
#line 18 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp10_ = _tmp9_->message;
#line 18 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		fprintf (_tmp8_, "%s\n", _tmp10_);
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 166 "system-dictionary.c"
	}
	__finally0:
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (srcdir);
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (system_segment_dictionary);
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.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 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 14 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 181 "system-dictionary.c"
	}
#line 9 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_g_free0 (srcdir);
#line 9 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_g_object_unref0 (system_segment_dictionary);
#line 187 "system-dictionary.c"
}
static void system_dictionary_tests_test_load (SystemDictionaryTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
#line 22 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	g_return_if_fail (self != NULL);
#line 198 "system-dictionary.c"
	{
		KkcSystemSegmentDictionary* _tmp0_ = NULL;
		KkcSystemSegmentDictionary* _tmp1_ = NULL;
#line 24 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp0_ = kkc_system_segment_dictionary_new ("nonexistent-system-segment-dictionary", "EUC-JP", &_inner_error_);
#line 24 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp1_ = _tmp0_;
#line 24 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp1_);
#line 24 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 210 "system-dictionary.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 224 "system-dictionary.c"
	}
	__finally1:
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.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 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 23 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 235 "system-dictionary.c"
	}
#line 29 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_tmp2_ = g_getenv ("srcdir");
#line 29 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 29 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	srcdir = _tmp3_;
#line 30 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 245 "system-dictionary.c"
	{
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		KkcSystemSegmentDictionary* _tmp6_ = NULL;
		KkcSystemSegmentDictionary* _tmp7_ = NULL;
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp4_ = g_build_filename (srcdir, "system-segment-dictionary", NULL);
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp5_ = _tmp4_;
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp6_ = kkc_system_segment_dictionary_new (_tmp5_, "unknown encoding", &_inner_error_);
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp7_ = _tmp6_;
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp7_);
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (_tmp5_);
#line 33 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 265 "system-dictionary.c"
			goto __catch2_g_error;
		}
#line 36 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_assert_not_reached ();
#line 270 "system-dictionary.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 282 "system-dictionary.c"
	}
	__finally2:
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (srcdir);
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.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 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 32 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 295 "system-dictionary.c"
	}
	{
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		KkcSystemSegmentDictionary* _tmp10_ = NULL;
		KkcSystemSegmentDictionary* _tmp11_ = NULL;
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp8_ = g_build_filename (srcdir, "system-segment-dictionary-bad1", NULL);
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp9_ = _tmp8_;
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp10_ = kkc_system_segment_dictionary_new (_tmp9_, "EUC-JP", &_inner_error_);
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp11_ = _tmp10_;
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp11_);
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (_tmp9_);
#line 41 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 316 "system-dictionary.c"
			goto __catch3_g_error;
		}
#line 43 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_assert_not_reached ();
#line 321 "system-dictionary.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 333 "system-dictionary.c"
	}
	__finally3:
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (srcdir);
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.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 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 40 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 346 "system-dictionary.c"
	}
	{
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		KkcSystemSegmentDictionary* _tmp14_ = NULL;
		KkcSystemSegmentDictionary* _tmp15_ = NULL;
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp12_ = g_build_filename (srcdir, "system-segment-dictionary-bad2", NULL);
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp13_ = _tmp12_;
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp14_ = kkc_system_segment_dictionary_new (_tmp13_, "EUC-JP", &_inner_error_);
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp15_ = _tmp14_;
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp15_);
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (_tmp13_);
#line 48 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 367 "system-dictionary.c"
			goto __catch4_g_error;
		}
#line 50 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_assert_not_reached ();
#line 372 "system-dictionary.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 384 "system-dictionary.c"
	}
	__finally4:
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (srcdir);
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.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 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 47 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 397 "system-dictionary.c"
	}
	{
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		KkcSystemSegmentDictionary* _tmp18_ = NULL;
		KkcSystemSegmentDictionary* _tmp19_ = NULL;
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp16_ = g_build_filename (srcdir, "system-segment-dictionary-bad3", NULL);
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp17_ = _tmp16_;
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp18_ = kkc_system_segment_dictionary_new (_tmp17_, "EUC-JP", &_inner_error_);
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_tmp19_ = _tmp18_;
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_object_unref0 (_tmp19_);
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (_tmp17_);
#line 55 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 418 "system-dictionary.c"
			goto __catch5_g_error;
		}
#line 57 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_assert_not_reached ();
#line 423 "system-dictionary.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		e = _inner_error_;
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_inner_error_ = NULL;
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_error_free0 (e);
#line 435 "system-dictionary.c"
	}
	__finally5:
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		_g_free0 (srcdir);
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.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 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		g_clear_error (&_inner_error_);
#line 54 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
		return;
#line 448 "system-dictionary.c"
	}
#line 22 "/home/ueno/devel/libkkc/tests/system-dictionary.vala"
	_g_free0 (srcdir);
#line 452 "system-dictionary.c"
}
Exemple #12
0
GeeArrayList* graph_media_modelos_sentimientos_lista_sentimientos (GraphMediaModelosSentimientos* self) {
	GeeArrayList* result = NULL;
	sqlite3_stmt* query = NULL;
	gchar* sql = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gint res = 0;
	sqlite3* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	sqlite3_stmt* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	GeeArrayList* sentimientos = NULL;
	GeeArrayList* _tmp10_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = ((GraphMediaModelosTablas*) self)->nombre_tabla;
	_tmp1_ = g_strdup_printf ("FROM %s WHERE 1", _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat ("SELECT id, nombre, descripcion ", _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	sql = _tmp4_;
	_tmp5_ = graph_media_modelos_tablas_bd;
	_tmp6_ = sql;
	_tmp8_ = sqlite3_prepare_v2 (_tmp5_, _tmp6_, -1, &_tmp7_, NULL);
	_sqlite3_finalize0 (query);
	query = _tmp7_;
	res = _tmp8_;
	_tmp9_ = res;
	_vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp10_ = gee_array_list_new (GRAPH_MEDIA_MODELOS_TYPE_SENTIMIENTO, (GBoxedCopyFunc) graph_media_modelos_sentimiento_ref, graph_media_modelos_sentimiento_unref, NULL, NULL, NULL);
	sentimientos = _tmp10_;
	while (TRUE) {
		sqlite3_stmt* _tmp11_ = NULL;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
		GraphMediaModelosSentimiento* celda = NULL;
		GraphMediaModelosSentimiento* _tmp14_ = NULL;
		GraphMediaModelosSentimiento* _tmp15_ = NULL;
		sqlite3_stmt* _tmp16_ = NULL;
		gint64 _tmp17_ = 0LL;
		GraphMediaModelosSentimiento* _tmp18_ = NULL;
		sqlite3_stmt* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		GraphMediaModelosSentimiento* _tmp22_ = NULL;
		sqlite3_stmt* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		gchar* _tmp25_ = NULL;
		GeeArrayList* _tmp26_ = NULL;
		GraphMediaModelosSentimiento* _tmp27_ = NULL;
		_tmp11_ = query;
		_tmp12_ = sqlite3_step (_tmp11_);
		res = _tmp12_;
		_tmp13_ = res;
		if (!(_tmp13_ == SQLITE_ROW)) {
			break;
		}
		_tmp14_ = graph_media_modelos_sentimiento_new ();
		celda = _tmp14_;
		_tmp15_ = celda;
		_tmp16_ = query;
		_tmp17_ = sqlite3_column_int64 (_tmp16_, 0);
		_tmp15_->id = _tmp17_;
		_tmp18_ = celda;
		_tmp19_ = query;
		_tmp20_ = sqlite3_column_text (_tmp19_, 1);
		_tmp21_ = g_strdup (_tmp20_);
		_g_free0 (_tmp18_->nombre);
		_tmp18_->nombre = _tmp21_;
		_tmp22_ = celda;
		_tmp23_ = query;
		_tmp24_ = sqlite3_column_text (_tmp23_, 2);
		_tmp25_ = g_strdup (_tmp24_);
		_g_free0 (_tmp22_->descripcion);
		_tmp22_->descripcion = _tmp25_;
		_tmp26_ = sentimientos;
		_tmp27_ = celda;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp27_);
		_graph_media_modelos_sentimiento_unref0 (celda);
	}
	result = sentimientos;
	_g_free0 (sql);
	_sqlite3_finalize0 (query);
	return result;
}
Exemple #13
0
static void metadata_file_tests_test_properties (MetadataFileTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	KkcMetadataFile* metadata = NULL;
	gchar* name = NULL;
	gchar* label = NULL;
	gchar* description = NULL;
	gchar* filename = NULL;
	GError * _inner_error_ = NULL;
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	g_return_if_fail (self != NULL);
#line 58 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_tmp0_ = g_getenv ("srcdir");
#line 58 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 58 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	srcdir = _tmp1_;
#line 59 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_vala_assert (srcdir != NULL, "srcdir != null");
#line 421 "metadata-file.c"
	{
		EmptyMetadata* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		EmptyMetadata* _tmp5_ = NULL;
		EmptyMetadata* _tmp6_ = NULL;
		EmptyMetadata* _tmp7_ = NULL;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp3_ = g_build_filename (srcdir, "metadata.json", NULL);
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp4_ = _tmp3_;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp5_ = empty_metadata_new ("metadata", _tmp4_, &_inner_error_);
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp6_ = _tmp5_;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_free0 (_tmp4_);
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp2_ = _tmp6_;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 443 "metadata-file.c"
			goto __catch2_g_error;
		}
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp7_ = _tmp2_;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_tmp2_ = NULL;
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_object_unref0 (metadata);
#line 63 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		metadata = (KkcMetadataFile*) _tmp7_;
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_object_unref0 (_tmp2_);
#line 456 "metadata-file.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		e = _inner_error_;
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_inner_error_ = NULL;
#line 67 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		g_assert_not_reached ();
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_error_free0 (e);
#line 470 "metadata-file.c"
	}
	__finally2:
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_object_unref0 (metadata);
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		_g_free0 (srcdir);
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.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 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		g_clear_error (&_inner_error_);
#line 62 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		return;
#line 485 "metadata-file.c"
	}
#line 75 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	g_object_get ((GObject*) metadata, "name", &name, "label", &label, "description", &description, "filename", &filename, NULL);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (filename);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (description);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (label);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (name);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_object_unref0 (metadata);
#line 57 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (srcdir);
#line 501 "metadata-file.c"
}
Exemple #14
0
GraphMediaModelosSentimiento* graph_media_modelos_sentimientos_agregar (GraphMediaModelosSentimientos* self, GraphMediaModelosSentimiento* sentimiento) {
	GraphMediaModelosSentimiento* result = NULL;
	GraphMediaModelosSentimiento* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	sqlite3_stmt* query = NULL;
	gchar* sql = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gint res = 0;
	sqlite3* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	sqlite3_stmt* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	sqlite3_stmt* _tmp14_ = NULL;
	GraphMediaModelosSentimiento* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	GDestroyNotify _tmp18_ = NULL;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	sqlite3_stmt* _tmp21_ = NULL;
	GraphMediaModelosSentimiento* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	GDestroyNotify _tmp25_ = NULL;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	sqlite3_stmt* _tmp28_ = NULL;
	gint _tmp29_ = 0;
	gint _tmp30_ = 0;
	GraphMediaModelosSentimiento* _tmp31_ = NULL;
	sqlite3* _tmp32_ = NULL;
	gint64 _tmp33_ = 0LL;
	GraphMediaModelosSentimiento* _tmp34_ = NULL;
	GraphMediaModelosSentimiento* _tmp35_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (sentimiento != NULL, NULL);
	_tmp0_ = sentimiento;
	_tmp1_ = graph_media_modelos_sentimientos_existe_sentimiento (self, _tmp0_);
	if (_tmp1_) {
		GraphMediaModelosSentimiento* _tmp2_ = NULL;
		GraphMediaModelosSentimiento* _tmp3_ = NULL;
		_tmp2_ = sentimiento;
		_tmp3_ = _graph_media_modelos_sentimiento_ref0 (_tmp2_);
		result = _tmp3_;
		return result;
	}
	_tmp4_ = ((GraphMediaModelosTablas*) self)->nombre_tabla;
	_tmp5_ = g_strdup_printf ("INSERT INTO %s (nombre, descripcion) ", _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, "VALUES (?, ?)", NULL);
	_tmp8_ = _tmp7_;
	_g_free0 (_tmp6_);
	sql = _tmp8_;
	_tmp9_ = graph_media_modelos_tablas_bd;
	_tmp10_ = sql;
	_tmp12_ = sqlite3_prepare_v2 (_tmp9_, _tmp10_, -1, &_tmp11_, NULL);
	_sqlite3_finalize0 (query);
	query = _tmp11_;
	res = _tmp12_;
	_tmp13_ = res;
	_vala_assert (_tmp13_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp14_ = query;
	_tmp15_ = sentimiento;
	_tmp16_ = _tmp15_->nombre;
	_tmp17_ = g_strdup (_tmp16_);
	_tmp18_ = g_free;
	_tmp19_ = sqlite3_bind_text (_tmp14_, 1, _tmp17_, -1, _tmp18_);
	res = _tmp19_;
	_tmp20_ = res;
	_vala_assert (_tmp20_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp21_ = query;
	_tmp22_ = sentimiento;
	_tmp23_ = _tmp22_->descripcion;
	_tmp24_ = g_strdup (_tmp23_);
	_tmp25_ = g_free;
	_tmp26_ = sqlite3_bind_text (_tmp21_, 2, _tmp24_, -1, _tmp25_);
	res = _tmp26_;
	_tmp27_ = res;
	_vala_assert (_tmp27_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp28_ = query;
	_tmp29_ = sqlite3_step (_tmp28_);
	res = _tmp29_;
	_tmp30_ = res;
	if (_tmp30_ != SQLITE_DONE) {
		result = NULL;
		_g_free0 (sql);
		_sqlite3_finalize0 (query);
		return result;
	}
	_tmp31_ = sentimiento;
	_tmp32_ = graph_media_modelos_tablas_bd;
	_tmp33_ = sqlite3_last_insert_rowid (_tmp32_);
	_tmp31_->id = _tmp33_;
	_tmp34_ = sentimiento;
	_tmp35_ = _graph_media_modelos_sentimiento_ref0 (_tmp34_);
	result = _tmp35_;
	_g_free0 (sql);
	_sqlite3_finalize0 (query);
	return result;
}
Exemple #15
0
gboolean graph_media_modelos_sentimientos_editar (GraphMediaModelosSentimientos* self, GraphMediaModelosSentimiento* sentimiento) {
	gboolean result = FALSE;
	GraphMediaModelosSentimiento* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gchar* columnas = NULL;
	gchar* _tmp2_ = NULL;
	sqlite3_stmt* query = NULL;
	gchar* sql = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gint res = 0;
	sqlite3* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	sqlite3_stmt* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	sqlite3_stmt* _tmp11_ = NULL;
	GraphMediaModelosSentimiento* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	GDestroyNotify _tmp15_ = NULL;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	sqlite3_stmt* _tmp18_ = NULL;
	GraphMediaModelosSentimiento* _tmp19_ = NULL;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	GDestroyNotify _tmp22_ = NULL;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	sqlite3_stmt* _tmp25_ = NULL;
	GraphMediaModelosSentimiento* _tmp26_ = NULL;
	gint64 _tmp27_ = 0LL;
	gint _tmp28_ = 0;
	gint _tmp29_ = 0;
	sqlite3_stmt* _tmp30_ = NULL;
	gint _tmp31_ = 0;
	gint _tmp32_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (sentimiento != NULL, FALSE);
	_tmp0_ = sentimiento;
	_tmp1_ = graph_media_modelos_sentimiento_es_valido (_tmp0_);
	if (!_tmp1_) {
		result = FALSE;
		return result;
	}
	_tmp2_ = g_strdup ("nombre=?, descripcion=?");
	columnas = _tmp2_;
	_tmp3_ = ((GraphMediaModelosTablas*) self)->nombre_tabla;
	_tmp4_ = columnas;
	_tmp5_ = g_strdup_printf ("UPDATE %s SET %s WHERE id=?", _tmp3_, _tmp4_);
	sql = _tmp5_;
	_tmp6_ = graph_media_modelos_tablas_bd;
	_tmp7_ = sql;
	_tmp9_ = sqlite3_prepare_v2 (_tmp6_, _tmp7_, -1, &_tmp8_, NULL);
	_sqlite3_finalize0 (query);
	query = _tmp8_;
	res = _tmp9_;
	_tmp10_ = res;
	_vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp11_ = query;
	_tmp12_ = sentimiento;
	_tmp13_ = _tmp12_->nombre;
	_tmp14_ = g_strdup (_tmp13_);
	_tmp15_ = g_free;
	_tmp16_ = sqlite3_bind_text (_tmp11_, 1, _tmp14_, -1, _tmp15_);
	res = _tmp16_;
	_tmp17_ = res;
	_vala_assert (_tmp17_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp18_ = query;
	_tmp19_ = sentimiento;
	_tmp20_ = _tmp19_->descripcion;
	_tmp21_ = g_strdup (_tmp20_);
	_tmp22_ = g_free;
	_tmp23_ = sqlite3_bind_text (_tmp18_, 2, _tmp21_, -1, _tmp22_);
	res = _tmp23_;
	_tmp24_ = res;
	_vala_assert (_tmp24_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp25_ = query;
	_tmp26_ = sentimiento;
	_tmp27_ = _tmp26_->id;
	_tmp28_ = sqlite3_bind_int64 (_tmp25_, 3, _tmp27_);
	res = _tmp28_;
	_tmp29_ = res;
	_vala_assert (_tmp29_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp30_ = query;
	_tmp31_ = sqlite3_step (_tmp30_);
	res = _tmp31_;
	_tmp32_ = res;
	result = _tmp32_ == SQLITE_DONE;
	_g_free0 (sql);
	_sqlite3_finalize0 (query);
	_g_free0 (columnas);
	return result;
}
Exemple #16
0
void plank_tests_drawing_drawingservice (void) {
	GdkPixbuf* icon = NULL;
	GdkPixbuf* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	GdkPixbuf* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GdkPixbuf* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	GdkPixbuf* _tmp8_ = NULL;
	GdkPixbuf* _tmp9_ = NULL;
	GdkPixbuf* _tmp10_ = NULL;
	GdkPixbuf* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	GdkPixbuf* _tmp14_ = NULL;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	GdkPixbuf* icon2 = NULL;
	GdkPixbuf* _tmp17_ = NULL;
	GdkPixbuf* _tmp18_ = NULL;
	GdkPixbuf* _tmp19_ = NULL;
	GdkPixbuf* _tmp20_ = NULL;
	GdkPixbuf* _tmp21_ = NULL;
	gint _tmp22_ = 0;
	gint _tmp23_ = 0;
	GdkPixbuf* _tmp24_ = NULL;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	GdkPixbuf* icon_copy = NULL;
	GdkPixbuf* _tmp27_ = NULL;
	GdkPixbuf* _tmp28_ = NULL;
	PlankDrawingColor color = {0};
	GdkPixbuf* _tmp29_ = NULL;
	PlankDrawingColor _tmp30_ = {0};
	PlankDrawingColor color_copy = {0};
	PlankDrawingColor _tmp31_ = {0};
	PlankDrawingColor _tmp32_ = {0};
	PlankDrawingColor _tmp33_ = {0};
	_tmp0_ = plank_drawing_drawing_service_load_icon (PLANK_TESTS_TEST_ICON, 256, 256);
	icon = _tmp0_;
	_tmp1_ = icon;
	_vala_assert (_tmp1_ != NULL, "icon != null");
	_tmp2_ = icon;
	_tmp3_ = gdk_pixbuf_get_width (_tmp2_);
	_tmp4_ = _tmp3_;
	_vala_assert (_tmp4_ == 256, "icon.width == 256");
	_tmp5_ = icon;
	_tmp6_ = gdk_pixbuf_get_height (_tmp5_);
	_tmp7_ = _tmp6_;
	_vala_assert (_tmp7_ == 256, "icon.height == 256");
	_tmp8_ = icon;
	_tmp9_ = plank_drawing_drawing_service_ar_scale (_tmp8_, 127, 127);
	_g_object_unref0 (icon);
	icon = _tmp9_;
	_tmp10_ = icon;
	_vala_assert (_tmp10_ != NULL, "icon != null");
	_tmp11_ = icon;
	_tmp12_ = gdk_pixbuf_get_width (_tmp11_);
	_tmp13_ = _tmp12_;
	_vala_assert (_tmp13_ == 127, "icon.width == 127");
	_tmp14_ = icon;
	_tmp15_ = gdk_pixbuf_get_height (_tmp14_);
	_tmp16_ = _tmp15_;
	_vala_assert (_tmp16_ == 127, "icon.height == 127");
	_tmp17_ = plank_drawing_drawing_service_load_icon (PLANK_TESTS_TEST_ICON, 256, 256);
	icon2 = _tmp17_;
	_tmp18_ = icon2;
	_tmp19_ = plank_drawing_drawing_service_ar_scale (_tmp18_, 1, 1);
	_g_object_unref0 (icon2);
	icon2 = _tmp19_;
	_tmp20_ = icon2;
	_vala_assert (_tmp20_ != NULL, "icon2 != null");
	_tmp21_ = icon2;
	_tmp22_ = gdk_pixbuf_get_width (_tmp21_);
	_tmp23_ = _tmp22_;
	_vala_assert (_tmp23_ == 1, "icon2.width == 1");
	_tmp24_ = icon2;
	_tmp25_ = gdk_pixbuf_get_height (_tmp24_);
	_tmp26_ = _tmp25_;
	_vala_assert (_tmp26_ == 1, "icon2.height == 1");
	_tmp27_ = icon;
	_tmp28_ = gdk_pixbuf_copy (_tmp27_);
	icon_copy = _tmp28_;
	_tmp29_ = icon;
	plank_drawing_drawing_service_average_color (_tmp29_, &_tmp30_);
	color = _tmp30_;
	plank_drawing_drawing_service_average_color (icon_copy, &_tmp31_);
	color_copy = _tmp31_;
	_tmp32_ = color;
	_tmp33_ = color_copy;
	_vala_assert (_plank_drawing_color_equal (&_tmp32_, &_tmp33_) == TRUE, "color == color_copy");
	_g_object_unref0 (icon_copy);
	_g_object_unref0 (icon2);
	_g_object_unref0 (icon);
}
Exemple #17
0
void plank_tests_drawing_color (void) {
	PlankDrawingColor color = {0};
	PlankDrawingColor color2 = {0};
	PlankDrawingColor color3 = {0};
	GdkRGBA gdkrgba = {0};
	GdkColor gdkcolor = {0};
	gdouble h = 0.0;
	gdouble s = 0.0;
	gdouble v = 0.0;
	PlankDrawingColor _tmp0_ = {0};
	PlankDrawingColor _tmp1_ = {0};
	PlankDrawingColor _tmp2_ = {0};
	PlankDrawingColor _tmp3_ = {0};
	PlankDrawingColor _tmp4_ = {0};
	PlankDrawingColor _tmp5_ = {0};
	PlankDrawingColor _tmp6_ = {0};
	gdouble _tmp7_ = 0.0;
	gdouble _tmp8_ = 0.0;
	gdouble _tmp9_ = 0.0;
	PlankDrawingColor _tmp10_ = {0};
	PlankDrawingColor _tmp11_ = {0};
	gdouble _tmp12_ = 0.0;
	PlankDrawingColor _tmp13_ = {0};
	gdouble _tmp14_ = 0.0;
	PlankDrawingColor _tmp15_ = {0};
	gdouble _tmp16_ = 0.0;
	PlankDrawingColor _tmp17_ = {0};
	gdouble _tmp18_ = 0.0;
	PlankDrawingColor _tmp19_ = {0};
	gdouble _tmp20_ = 0.0;
	PlankDrawingColor _tmp21_ = {0};
	gdouble _tmp22_ = 0.0;
	PlankDrawingColor _tmp23_ = {0};
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	GdkRGBA _tmp26_ = {0};
	GdkRGBA _tmp27_ = {0};
	PlankDrawingColor _tmp28_ = {0};
	GdkRGBA _tmp29_ = {0};
	GdkRGBA _tmp30_ = {0};
	GdkColor _tmp31_ = {0};
	GdkColor _tmp32_ = {0};
	GdkColor _tmp33_ = {0};
	PlankDrawingColor _tmp34_ = {0};
	GdkColor _tmp35_ = {0};
	GdkColor _tmp36_ = {0};
	_tmp0_.R = 0.5;
	_tmp0_.G = 0.5;
	_tmp0_.B = 0.5;
	_tmp0_.A = 0.5;
	color = _tmp0_;
	_tmp1_.R = 0.5;
	_tmp1_.G = 0.5;
	_tmp1_.B = 0.5;
	_tmp1_.A = 0.5;
	color2 = _tmp1_;
	_tmp2_ = color;
	_tmp3_ = color2;
	_vala_assert (_plank_drawing_color_equal (&_tmp2_, &_tmp3_) == TRUE, "color == color2");
	_tmp4_ = color;
	color3 = _tmp4_;
	color3.R = 0.75;
	color3.G = 0.37;
	color3.B = 0.66;
	color3.A = 0.97;
	_tmp5_ = color;
	_tmp6_ = color3;
	_vala_assert (_plank_drawing_color_equal (&_tmp5_, &_tmp6_) != TRUE, "color != color3");
	plank_drawing_color_get_hsv (&color, &_tmp7_, &_tmp8_, &_tmp9_);
	h = _tmp7_;
	s = _tmp8_;
	v = _tmp9_;
	plank_drawing_color_set_hsv (&color2, h, s, v);
	_tmp10_ = color;
	_tmp11_ = color2;
	_vala_assert (_plank_drawing_color_equal (&_tmp10_, &_tmp11_) == TRUE, "color == color2");
	_tmp12_ = plank_drawing_color_get_hue (&color);
	_vala_assert (_tmp12_ == 0.0, "color.get_hue () == 0.0");
	_tmp13_ = color3;
	color = _tmp13_;
	plank_drawing_color_set_hue (&color, (gdouble) 187);
	_tmp14_ = plank_drawing_color_get_hue (&color);
	_vala_assert (_tmp14_ == ((gdouble) 187), "color.get_hue () == 187");
	_tmp15_ = color3;
	color = _tmp15_;
	plank_drawing_color_set_sat (&color, 0.75);
	_tmp16_ = plank_drawing_color_get_sat (&color);
	_vala_assert (_tmp16_ == 0.75, "color.get_sat () == 0.75");
	_tmp17_ = color3;
	color = _tmp17_;
	plank_drawing_color_set_val (&color, 0.75);
	_tmp18_ = plank_drawing_color_get_val (&color);
	_vala_assert (_tmp18_ == 0.75, "color.get_val () == 0.75");
	_tmp19_ = color3;
	color = _tmp19_;
	plank_drawing_color_set_hue (&color, (gdouble) 187);
	plank_drawing_color_add_hue (&color, (gdouble) 15);
	_tmp20_ = plank_drawing_color_get_hue (&color);
	_vala_assert (_tmp20_ == ((gdouble) 202), "color.get_hue () == 202");
	_tmp21_ = color3;
	color = _tmp21_;
	plank_drawing_color_set_sat (&color, 0.35);
	plank_drawing_color_multiply_sat (&color, 2.0);
	_tmp22_ = plank_drawing_color_get_sat (&color);
	_vala_assert (_tmp22_ == 0.7, "color.get_sat () == 0.7");
	plank_drawing_color_from_string ("123;;234;;123;;234", &_tmp23_);
	color = _tmp23_;
	_tmp24_ = plank_drawing_color_to_string (&color);
	_tmp25_ = _tmp24_;
	_vala_assert (g_strcmp0 (_tmp25_, "123;;234;;123;;234") == 0, "color.to_string () == \"123;;234;;123;;234\"");
	_g_free0 (_tmp25_);
	_tmp26_.red = 0.5;
	_tmp26_.green = 0.5;
	_tmp26_.blue = 0.5;
	_tmp26_.alpha = 0.5;
	gdkrgba = _tmp26_;
	_tmp27_ = gdkrgba;
	plank_drawing_color_from_gdk_rgba (&_tmp27_, &_tmp28_);
	color = _tmp28_;
	plank_drawing_color_to_gdk_rgba (&color, &_tmp29_);
	_tmp30_ = gdkrgba;
	_vala_assert (_gdk_rgba_equal (&_tmp29_, &_tmp30_) == TRUE, "color.to_gdk_rgba () == gdkrgba");
	memset (&_tmp31_, 0, sizeof (GdkColor));
	_tmp31_.red = (guint16) 32768;
	_tmp31_.green = (guint16) 32768;
	_tmp31_.blue = (guint16) 32768;
	gdkcolor = _tmp31_;
	_tmp32_ = gdkcolor;
	_tmp33_ = gdkcolor;
	plank_drawing_color_from_gdk_color (&_tmp33_, &_tmp34_);
	color = _tmp34_;
	plank_drawing_color_to_gdk_color (&color, &_tmp35_);
	_tmp36_ = gdkcolor;
	_vala_assert (_gdk_color_equal (&_tmp35_, &_tmp36_) == TRUE, "color.to_gdk_color () == gdkcolor");
}
static void language_model_tests_test_load (LanguageModelTests* self) {
	gchar* srcdir = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GError * _inner_error_ = NULL;
#line 8 "/home/ueno/devel/libkkc/tests/language-model.vala"
	g_return_if_fail (self != NULL);
#line 86 "language-model.c"
	{
		KkcLanguageModel* _tmp0_ = NULL;
		KkcLanguageModel* _tmp1_ = NULL;
#line 10 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp0_ = kkc_language_model_load ("nonexistent", &_inner_error_);
#line 10 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp1_ = _tmp0_;
#line 10 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_object_unref0 (_tmp1_);
#line 10 "/home/ueno/devel/libkkc/tests/language-model.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 10 "/home/ueno/devel/libkkc/tests/language-model.vala"
			if (_inner_error_->domain == KKC_LANGUAGE_MODEL_ERROR) {
#line 100 "language-model.c"
				goto __catch0_kkc_language_model_error;
			}
			goto __finally0;
		}
#line 11 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_assert_not_reached ();
#line 107 "language-model.c"
	}
	goto __finally0;
	__catch0_kkc_language_model_error:
	{
		GError* e = NULL;
#line 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
		e = _inner_error_;
#line 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_inner_error_ = NULL;
#line 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_error_free0 (e);
#line 119 "language-model.c"
	}
	__finally0:
#line 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 9 "/home/ueno/devel/libkkc/tests/language-model.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 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_clear_error (&_inner_error_);
#line 9 "/home/ueno/devel/libkkc/tests/language-model.vala"
		return;
#line 130 "language-model.c"
	}
	{
		KkcLanguageModel* _tmp2_ = NULL;
		KkcLanguageModel* _tmp3_ = NULL;
#line 16 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp2_ = kkc_language_model_load ("text3", &_inner_error_);
#line 16 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp3_ = _tmp2_;
#line 16 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_object_unref0 (_tmp3_);
#line 16 "/home/ueno/devel/libkkc/tests/language-model.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 16 "/home/ueno/devel/libkkc/tests/language-model.vala"
			if (_inner_error_->domain == KKC_LANGUAGE_MODEL_ERROR) {
#line 145 "language-model.c"
				goto __catch1_kkc_language_model_error;
			}
			goto __finally1;
		}
	}
	goto __finally1;
	__catch1_kkc_language_model_error:
	{
		GError* e = NULL;
#line 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
		e = _inner_error_;
#line 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_inner_error_ = NULL;
#line 18 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_assert_not_reached ();
#line 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_error_free0 (e);
#line 163 "language-model.c"
	}
	__finally1:
#line 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15 "/home/ueno/devel/libkkc/tests/language-model.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 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_clear_error (&_inner_error_);
#line 15 "/home/ueno/devel/libkkc/tests/language-model.vala"
		return;
#line 174 "language-model.c"
	}
#line 21 "/home/ueno/devel/libkkc/tests/language-model.vala"
	_tmp4_ = g_getenv ("srcdir");
#line 21 "/home/ueno/devel/libkkc/tests/language-model.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 21 "/home/ueno/devel/libkkc/tests/language-model.vala"
	srcdir = _tmp5_;
#line 22 "/home/ueno/devel/libkkc/tests/language-model.vala"
	_tmp6_ = srcdir;
#line 22 "/home/ueno/devel/libkkc/tests/language-model.vala"
	_vala_assert (_tmp6_ != NULL, "srcdir != null");
#line 186 "language-model.c"
	{
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		KkcLanguageModelMetadata* _tmp10_ = NULL;
		KkcLanguageModelMetadata* _tmp11_ = NULL;
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp7_ = srcdir;
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp8_ = g_build_filename (_tmp7_, "language-model-metadata-bad1.json", NULL);
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp9_ = _tmp8_;
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp10_ = kkc_language_model_metadata_new ("bad1", _tmp9_, &_inner_error_);
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp11_ = _tmp10_;
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_object_unref0 (_tmp11_);
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_free0 (_tmp9_);
#line 25 "/home/ueno/devel/libkkc/tests/language-model.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 209 "language-model.c"
			goto __catch2_g_error;
		}
#line 29 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_assert_not_reached ();
#line 214 "language-model.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		e = _inner_error_;
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_inner_error_ = NULL;
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_error_free0 (e);
#line 226 "language-model.c"
	}
	__finally2:
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_free0 (srcdir);
#line 24 "/home/ueno/devel/libkkc/tests/language-model.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 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_clear_error (&_inner_error_);
#line 24 "/home/ueno/devel/libkkc/tests/language-model.vala"
		return;
#line 239 "language-model.c"
	}
	{
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		KkcLanguageModelMetadata* _tmp15_ = NULL;
		KkcLanguageModelMetadata* _tmp16_ = NULL;
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp12_ = srcdir;
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp13_ = g_build_filename (_tmp12_, "language-model-metadata-bad2.json", NULL);
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp14_ = _tmp13_;
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp15_ = kkc_language_model_metadata_new ("bad2", _tmp14_, &_inner_error_);
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_tmp16_ = _tmp15_;
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_object_unref0 (_tmp16_);
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_free0 (_tmp14_);
#line 34 "/home/ueno/devel/libkkc/tests/language-model.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 263 "language-model.c"
			goto __catch3_g_error;
		}
#line 38 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_assert_not_reached ();
#line 268 "language-model.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		e = _inner_error_;
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_inner_error_ = NULL;
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_error_free0 (e);
#line 280 "language-model.c"
	}
	__finally3:
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		_g_free0 (srcdir);
#line 33 "/home/ueno/devel/libkkc/tests/language-model.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 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		g_clear_error (&_inner_error_);
#line 33 "/home/ueno/devel/libkkc/tests/language-model.vala"
		return;
#line 293 "language-model.c"
	}
#line 8 "/home/ueno/devel/libkkc/tests/language-model.vala"
	_g_free0 (srcdir);
#line 297 "language-model.c"
}
Exemple #19
0
static void keymap_tests_test_lookup (KeymapTests* self) {
	KkcRuleMetadata* metadata = NULL;
	KkcRuleMetadata* _tmp0_ = NULL;
	KkcRule* rule = NULL;
	KkcRuleMetadata* _tmp1_ = NULL;
	KkcRule* _tmp2_ = NULL;
	KkcKeymap* keymap = NULL;
	KkcRule* _tmp3_ = NULL;
	KkcKeymap* _tmp4_ = NULL;
	gchar* command = NULL;
	KkcKeyEvent* _tmp5_ = NULL;
	KkcKeyEvent* _tmp6_ = NULL;
	KkcKeymap* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	KkcKeyEvent* key = NULL;
	KkcKeymap* _tmp10_ = NULL;
	KkcKeyEvent* _tmp11_ = NULL;
	KkcKeyEvent* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar** commands = NULL;
	KkcKeymap* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	gchar** _tmp17_ = NULL;
	gint commands_length1 = 0;
	gint _commands_size_ = 0;
	KkcKeymapEntry* entries = NULL;
	KkcKeymap* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	KkcKeymapEntry* _tmp20_ = NULL;
	gint entries_length1 = 0;
	gint _entries_size_ = 0;
	KkcKeymap* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	GError * _inner_error_ = NULL;
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	g_return_if_fail (self != NULL);
#line 30 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp0_ = kkc_rule_metadata_find ("kana");
#line 30 "/home/ueno/devel/libkkc/tests/keymap.vala"
	metadata = _tmp0_;
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp1_ = metadata;
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp2_ = kkc_rule_new (_tmp1_, &_inner_error_);
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
	rule = _tmp2_;
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
		_g_object_unref0 (metadata);
#line 31 "/home/ueno/devel/libkkc/tests/keymap.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 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
		g_clear_error (&_inner_error_);
#line 31 "/home/ueno/devel/libkkc/tests/keymap.vala"
		return;
#line 282 "keymap.c"
	}
#line 32 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp3_ = rule;
#line 32 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp4_ = kkc_rule_get_keymap (_tmp3_, KKC_INPUT_MODE_HIRAGANA);
#line 32 "/home/ueno/devel/libkkc/tests/keymap.vala"
	keymap = _tmp4_;
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp6_ = kkc_key_event_new_from_string ("(alt r)", &_inner_error_);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp5_ = _tmp6_;
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		_g_free0 (command);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		_g_object_unref0 (keymap);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		_g_object_unref0 (rule);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		_g_object_unref0 (metadata);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.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 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		g_clear_error (&_inner_error_);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
		return;
#line 310 "keymap.c"
	}
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp7_ = keymap;
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp8_ = kkc_keymap_lookup_key (_tmp7_, _tmp5_);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_free0 (command);
#line 35 "/home/ueno/devel/libkkc/tests/keymap.vala"
	command = _tmp8_;
#line 36 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp9_ = command;
#line 36 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_vala_assert (g_strcmp0 (_tmp9_, "register") == 0, "command == \"register\"");
#line 39 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp10_ = keymap;
#line 39 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp11_ = kkc_keymap_where_is (_tmp10_, "register");
#line 39 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (key);
#line 39 "/home/ueno/devel/libkkc/tests/keymap.vala"
	key = _tmp11_;
#line 40 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp12_ = key;
#line 40 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp13_ = kkc_key_event_to_string (_tmp12_);
#line 40 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp14_ = _tmp13_;
#line 40 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_vala_assert (g_strcmp0 (_tmp14_, "(alt r)") == 0, "key.to_string () == \"(alt r)\"");
#line 40 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_free0 (_tmp14_);
#line 42 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp15_ = keymap;
#line 42 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp17_ = kkc_keymap_commands (&_tmp16_);
#line 42 "/home/ueno/devel/libkkc/tests/keymap.vala"
	commands = _tmp17_;
#line 42 "/home/ueno/devel/libkkc/tests/keymap.vala"
	commands_length1 = _tmp16_;
#line 42 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_commands_size_ = commands_length1;
#line 43 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp18_ = keymap;
#line 43 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp20_ = kkc_keymap_entries (_tmp18_, &_tmp19_);
#line 43 "/home/ueno/devel/libkkc/tests/keymap.vala"
	entries = _tmp20_;
#line 43 "/home/ueno/devel/libkkc/tests/keymap.vala"
	entries_length1 = _tmp19_;
#line 43 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_entries_size_ = entries_length1;
#line 45 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp21_ = keymap;
#line 45 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp22_ = kkc_keymap_get_command_label ("register");
#line 45 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_tmp23_ = _tmp22_;
#line 45 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_vala_assert (g_strcmp0 (_tmp23_, "Register Word") == 0, "keymap.get_command_label (\"register\") == \"Register Word\"");
#line 45 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_free0 (_tmp23_);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	entries = (_vala_KkcKeymapEntry_array_free (entries, entries_length1), NULL);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	commands = (_vala_array_free (commands, commands_length1, (GDestroyNotify) g_free), NULL);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (key);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (_tmp5_);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_free0 (command);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (keymap);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (rule);
#line 29 "/home/ueno/devel/libkkc/tests/keymap.vala"
	_g_object_unref0 (metadata);
#line 388 "keymap.c"
}
Exemple #20
0
static gboolean graph_media_modelos_sentimientos_existe_sentimiento (GraphMediaModelosSentimientos* self, GraphMediaModelosSentimiento* s) {
	gboolean result = FALSE;
	sqlite3_stmt* query = NULL;
	GraphMediaModelosSentimiento* _tmp0_ = NULL;
	gint64 _tmp1_ = 0LL;
	gchar* sql = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gint res = 0;
	sqlite3* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	sqlite3_stmt* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	sqlite3_stmt* _tmp15_ = NULL;
	GraphMediaModelosSentimiento* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	GDestroyNotify _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	sqlite3_stmt* _tmp22_ = NULL;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (s != NULL, FALSE);
	_tmp0_ = s;
	_tmp1_ = _tmp0_->id;
	if (_tmp1_ != ((gint64) (-1))) {
		GraphMediaModelosSentimiento* _tmp2_ = NULL;
		gint64 _tmp3_ = 0LL;
		gboolean _tmp4_ = FALSE;
		_tmp2_ = s;
		_tmp3_ = _tmp2_->id;
		_tmp4_ = graph_media_modelos_tablas_existe_id ((GraphMediaModelosTablas*) self, _tmp3_);
		result = _tmp4_;
		_sqlite3_finalize0 (query);
		return result;
	}
	_tmp5_ = ((GraphMediaModelosTablas*) self)->nombre_tabla;
	_tmp6_ = g_strdup_printf ("FROM %s WHERE nombre=?", _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strconcat ("SELECT id, nombre, descripcion ", _tmp7_, NULL);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	sql = _tmp9_;
	_tmp10_ = graph_media_modelos_tablas_bd;
	_tmp11_ = sql;
	_tmp13_ = sqlite3_prepare_v2 (_tmp10_, _tmp11_, -1, &_tmp12_, NULL);
	_sqlite3_finalize0 (query);
	query = _tmp12_;
	res = _tmp13_;
	_tmp14_ = res;
	_vala_assert (_tmp14_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp15_ = query;
	_tmp16_ = s;
	_tmp17_ = _tmp16_->nombre;
	_tmp18_ = g_strdup (_tmp17_);
	_tmp19_ = g_free;
	_tmp20_ = sqlite3_bind_text (_tmp15_, 1, _tmp18_, -1, _tmp19_);
	res = _tmp20_;
	_tmp21_ = res;
	_vala_assert (_tmp21_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp22_ = query;
	_tmp23_ = sqlite3_step (_tmp22_);
	res = _tmp23_;
	_tmp24_ = res;
	result = _tmp24_ == SQLITE_ROW;
	_g_free0 (sql);
	_sqlite3_finalize0 (query);
	return result;
}
Exemple #21
0
GraphMediaModelosSentimiento* graph_media_modelos_sentimientos_eliminar (GraphMediaModelosSentimientos* self, GraphMediaModelosSentimiento* p, GError** error) {
	GraphMediaModelosSentimiento* result = NULL;
	GraphMediaModelosSentimiento* _tmp0_ = NULL;
	gint64 _tmp1_ = 0LL;
	FILE* _tmp2_ = NULL;
	GraphMediaModelosSentimiento* _tmp3_ = NULL;
	gint64 _tmp4_ = 0LL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GraphMediaModelosSentimiento* _tmp9_ = NULL;
	gint64 _tmp10_ = 0LL;
	gboolean _tmp11_ = FALSE;
	GraphMediaModelosSentimiento* _tmp18_ = NULL;
	GraphMediaModelosSentimiento* _tmp19_ = NULL;
	GraphMediaModelosSentimiento* _tmp20_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (p != NULL, NULL);
	_tmp0_ = p;
	_tmp1_ = _tmp0_->id;
	_vala_assert (_tmp1_ != ((gint64) (-1)), "p.id != -1");
	_tmp2_ = stdout;
	_tmp3_ = p;
	_tmp4_ = _tmp3_->id;
	_tmp5_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat ("id: ", _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	fprintf (_tmp2_, "%s", _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_tmp9_ = p;
	_tmp10_ = _tmp9_->id;
	_tmp11_ = graph_media_modelos_tablas_eliminar_celda_por_id ((GraphMediaModelosTablas*) self, _tmp10_);
	if (!_tmp11_) {
		GraphMediaModelosSentimiento* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		GError* _tmp16_ = NULL;
		GError* _tmp17_ = NULL;
		_tmp12_ = p;
		_tmp13_ = _tmp12_->nombre;
		_tmp14_ = g_strdup_printf ("No se pudo eliminar a %s", _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_error_new_literal (GRAPH_MEDIA_MODELOS_ERROR_BASE_DATOS, GRAPH_MEDIA_MODELOS_ERROR_BASE_DATOS_CONSULTA, _tmp15_);
		_tmp17_ = _tmp16_;
		_g_free0 (_tmp15_);
		_inner_error_ = _tmp17_;
		if (_inner_error_->domain == GRAPH_MEDIA_MODELOS_ERROR_BASE_DATOS) {
			g_propagate_error (error, _inner_error_);
			return NULL;
		} else {
			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 NULL;
		}
	}
	_tmp18_ = p;
	_tmp18_->id = (gint64) (-1);
	_tmp19_ = p;
	_tmp20_ = _graph_media_modelos_sentimiento_ref0 (_tmp19_);
	result = _tmp20_;
	return result;
}
Exemple #22
0
static void metadata_file_tests_test_load (MetadataFileTests* self) {
#line 20 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	static const gchar* good[] = {"metadata"};
#line 24 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	static const gchar* bad[] = {"metadata-bad1", "metadata-bad2", "metadata-bad3", "metadata-bad4"};
#line 201 "metadata-file.c"
	gchar* srcdir = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 19 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	g_return_if_fail (self != NULL);
#line 31 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_tmp0_ = g_getenv ("srcdir");
#line 31 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 31 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	srcdir = _tmp1_;
#line 32 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_tmp2_ = srcdir;
#line 32 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_vala_assert (_tmp2_ != NULL, "srcdir != null");
#line 219 "metadata-file.c"
	{
		const gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
#line 34 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		name_collection = good;
#line 34 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		name_collection_length1 = G_N_ELEMENTS (good);
#line 34 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		for (name_it = 0; name_it < G_N_ELEMENTS (good); name_it = name_it + 1) {
#line 231 "metadata-file.c"
			const gchar* name = NULL;
#line 34 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
			name = name_collection[name_it];
#line 235 "metadata-file.c"
			{
				{
					const gchar* _tmp3_ = NULL;
					const gchar* _tmp4_ = NULL;
					const gchar* _tmp5_ = NULL;
					gchar* _tmp6_ = NULL;
					gchar* _tmp7_ = NULL;
					gchar* _tmp8_ = NULL;
					gchar* _tmp9_ = NULL;
					EmptyMetadata* _tmp10_ = NULL;
					EmptyMetadata* _tmp11_ = NULL;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp3_ = name;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp4_ = srcdir;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp5_ = name;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp6_ = g_strconcat (_tmp5_, ".json", NULL);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp7_ = _tmp6_;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp8_ = g_build_filename (_tmp4_, _tmp7_, NULL);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp9_ = _tmp8_;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp10_ = empty_metadata_new (_tmp3_, _tmp9_, &_inner_error_);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp11_ = _tmp10_;
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_object_unref0 (_tmp11_);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (_tmp9_);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (_tmp7_);
#line 36 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 273 "metadata-file.c"
						goto __catch0_g_error;
					}
				}
				goto __finally0;
				__catch0_g_error:
				{
					GError* e = NULL;
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					e = _inner_error_;
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_inner_error_ = NULL;
#line 41 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					g_assert_not_reached ();
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_error_free0 (e);
#line 289 "metadata-file.c"
				}
				__finally0:
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (srcdir);
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.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 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					g_clear_error (&_inner_error_);
#line 35 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					return;
#line 302 "metadata-file.c"
				}
			}
		}
	}
	{
		const gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
#line 45 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		name_collection = bad;
#line 45 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		name_collection_length1 = G_N_ELEMENTS (bad);
#line 45 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
		for (name_it = 0; name_it < G_N_ELEMENTS (bad); name_it = name_it + 1) {
#line 318 "metadata-file.c"
			const gchar* name = NULL;
#line 45 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
			name = name_collection[name_it];
#line 322 "metadata-file.c"
			{
				{
					const gchar* _tmp12_ = NULL;
					const gchar* _tmp13_ = NULL;
					const gchar* _tmp14_ = NULL;
					gchar* _tmp15_ = NULL;
					gchar* _tmp16_ = NULL;
					gchar* _tmp17_ = NULL;
					gchar* _tmp18_ = NULL;
					EmptyMetadata* _tmp19_ = NULL;
					EmptyMetadata* _tmp20_ = NULL;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp12_ = name;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp13_ = srcdir;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp14_ = name;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp15_ = g_strconcat (_tmp14_, ".json", NULL);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp16_ = _tmp15_;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp17_ = g_build_filename (_tmp13_, _tmp16_, NULL);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp18_ = _tmp17_;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp19_ = empty_metadata_new (_tmp12_, _tmp18_, &_inner_error_);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_tmp20_ = _tmp19_;
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_object_unref0 (_tmp20_);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (_tmp18_);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (_tmp16_);
#line 47 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 360 "metadata-file.c"
						goto __catch1_g_error;
					}
#line 51 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					g_assert_not_reached ();
#line 365 "metadata-file.c"
				}
				goto __finally1;
				__catch1_g_error:
				{
					GError* e = NULL;
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					e = _inner_error_;
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_inner_error_ = NULL;
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_error_free0 (e);
#line 377 "metadata-file.c"
				}
				__finally1:
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					_g_free0 (srcdir);
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.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 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					g_clear_error (&_inner_error_);
#line 46 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
					return;
#line 390 "metadata-file.c"
				}
			}
		}
	}
#line 19 "/home/ueno/devel/libkkc/tests/metadata-file.vala"
	_g_free0 (srcdir);
#line 397 "metadata-file.c"
}
Exemple #23
0
void plank_tests_drawing_theme (void) {
	PlankDrawingDockSurface* surface = NULL;
	PlankDrawingDockSurface* surface2 = NULL;
	PlankDrawingDockSurface* surface3 = NULL;
	PlankDrawingDockTheme* docktheme = NULL;
	PlankDrawingDockSurface* _tmp0_ = NULL;
	PlankDrawingDockTheme* _tmp1_ = NULL;
	PlankDrawingColor color = {0};
	PlankDrawingColor _tmp2_ = {0};
	PlankDrawingColor _tmp3_ = {0};
	PlankDrawingColor _tmp4_ = {0};
	PlankDrawingColor _tmp5_ = {0};
	PlankDrawingDockSurface* _tmp6_ = NULL;
	PlankDrawingColor _tmp7_ = {0};
	PlankDrawingDockSurface* _tmp8_ = NULL;
	PlankDrawingDockSurface* _tmp9_ = NULL;
	PlankDrawingDockSurface* _tmp10_ = NULL;
	PlankDrawingDockSurface* _tmp11_ = NULL;
	GdkPixbuf* _tmp12_ = NULL;
	GdkPixbuf* _tmp13_ = NULL;
	PlankDrawingColor _tmp14_ = {0};
	GdkPixbuf* _tmp15_ = NULL;
	GdkPixbuf* _tmp16_ = NULL;
	PlankDrawingColor _tmp17_ = {0};
	_tmp0_ = plank_drawing_dock_surface_new (512, 512);
	_g_object_unref0 (surface);
	surface = _tmp0_;
	plank_drawing_dock_surface_clear (surface);
	_tmp1_ = plank_drawing_dock_theme_new ("Test");
	_g_object_unref0 (docktheme);
	docktheme = _tmp1_;
	plank_drawing_theme_draw_background ((PlankDrawingTheme*) docktheme, surface);
	plank_drawing_dock_surface_clear (surface);
	_tmp2_.R = 0.5;
	_tmp2_.G = 0.4;
	_tmp2_.B = 0.3;
	_tmp2_.A = 1.0;
	color = _tmp2_;
	_tmp3_ = color;
	plank_drawing_dock_theme_draw_item_count (docktheme, surface, 64, &_tmp3_, (gint64) 42);
	_tmp4_ = color;
	plank_drawing_dock_theme_draw_item_progress (docktheme, surface, 64, &_tmp4_, 0.7);
	_tmp5_ = color;
	_tmp6_ = plank_drawing_dock_theme_create_indicator (docktheme, 64, &_tmp5_, surface);
	_g_object_unref0 (surface2);
	surface2 = _tmp6_;
	_tmp7_ = color;
	_tmp8_ = plank_drawing_dock_theme_create_urgent_glow (docktheme, 512, &_tmp7_, surface);
	_g_object_unref0 (surface2);
	surface2 = _tmp8_;
	_tmp9_ = plank_drawing_dock_theme_create_background (docktheme, 1024, 256, GTK_POS_RIGHT, surface);
	_g_object_unref0 (surface2);
	surface2 = _tmp9_;
	_tmp10_ = plank_drawing_dock_theme_create_background (docktheme, 256, 1024, GTK_POS_BOTTOM, surface);
	_g_object_unref0 (surface3);
	surface3 = _tmp10_;
	_tmp11_ = surface2;
	_tmp12_ = plank_drawing_dock_surface_to_pixbuf (_tmp11_);
	_tmp13_ = _tmp12_;
	plank_drawing_drawing_service_average_color (_tmp13_, &_tmp14_);
	_tmp15_ = plank_drawing_dock_surface_to_pixbuf (surface3);
	_tmp16_ = _tmp15_;
	plank_drawing_drawing_service_average_color (_tmp16_, &_tmp17_);
	_vala_assert (_plank_drawing_color_equal (&_tmp14_, &_tmp17_) == TRUE, "DrawingService.average_color (surface2.to_pixbuf ()) == DrawingService.average_color (surface3.to_pixbuf ())");
	_g_object_unref0 (_tmp16_);
	_g_object_unref0 (_tmp13_);
	_g_object_unref0 (docktheme);
	_g_object_unref0 (surface3);
	_g_object_unref0 (surface2);
	_g_object_unref0 (surface);
}
Exemple #24
0
void plank_tests_drawing_drawingservice_average_color_helper (PlankDrawingColor* color, gdouble delta) {
	PlankDrawingColor average = {0};
	PlankDrawingDockSurface* surface = NULL;
	PlankDrawingDockSurface* _tmp0_ = NULL;
	cairo_t* cr = NULL;
	PlankDrawingDockSurface* _tmp1_ = NULL;
	cairo_t* _tmp2_ = NULL;
	cairo_t* _tmp3_ = NULL;
	cairo_t* _tmp4_ = NULL;
	PlankDrawingColor _tmp5_ = {0};
	gdouble _tmp6_ = 0.0;
	PlankDrawingColor _tmp7_ = {0};
	gdouble _tmp8_ = 0.0;
	PlankDrawingColor _tmp9_ = {0};
	gdouble _tmp10_ = 0.0;
	PlankDrawingColor _tmp11_ = {0};
	gdouble _tmp12_ = 0.0;
	cairo_t* _tmp13_ = NULL;
	cairo_t* _tmp14_ = NULL;
	PlankDrawingDockSurface* _tmp15_ = NULL;
	PlankDrawingColor _tmp16_ = {0};
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	PlankDrawingColor _tmp20_ = {0};
	gdouble _tmp21_ = 0.0;
	PlankDrawingColor _tmp22_ = {0};
	gdouble _tmp23_ = 0.0;
	gdouble _tmp24_ = 0.0;
	gdouble _tmp25_ = 0.0;
	g_return_if_fail (color != NULL);
	_tmp0_ = plank_drawing_dock_surface_new (256, 256);
	_g_object_unref0 (surface);
	surface = _tmp0_;
	_tmp1_ = surface;
	_tmp2_ = plank_drawing_dock_surface_get_Context (_tmp1_);
	_tmp3_ = _tmp2_;
	cr = _tmp3_;
	_tmp4_ = cr;
	_tmp5_ = *color;
	_tmp6_ = _tmp5_.R;
	_tmp7_ = *color;
	_tmp8_ = _tmp7_.G;
	_tmp9_ = *color;
	_tmp10_ = _tmp9_.B;
	_tmp11_ = *color;
	_tmp12_ = _tmp11_.A;
	cairo_set_source_rgba (_tmp4_, _tmp6_, _tmp8_, _tmp10_, _tmp12_);
	_tmp13_ = cr;
	cairo_set_operator (_tmp13_, CAIRO_OPERATOR_SOURCE);
	_tmp14_ = cr;
	cairo_paint (_tmp14_);
	_tmp15_ = surface;
	plank_drawing_dock_surface_average_color (_tmp15_, &_tmp16_);
	average = _tmp16_;
	_tmp20_ = average;
	_tmp21_ = _tmp20_.R;
	_tmp22_ = *color;
	_tmp23_ = _tmp22_.R;
	_tmp24_ = fabs (_tmp21_ - _tmp23_);
	_tmp25_ = delta;
	if (_tmp24_ <= _tmp25_) {
		PlankDrawingColor _tmp26_ = {0};
		gdouble _tmp27_ = 0.0;
		PlankDrawingColor _tmp28_ = {0};
		gdouble _tmp29_ = 0.0;
		gdouble _tmp30_ = 0.0;
		gdouble _tmp31_ = 0.0;
		_tmp26_ = average;
		_tmp27_ = _tmp26_.G;
		_tmp28_ = *color;
		_tmp29_ = _tmp28_.G;
		_tmp30_ = fabs (_tmp27_ - _tmp29_);
		_tmp31_ = delta;
		_tmp19_ = _tmp30_ <= _tmp31_;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		PlankDrawingColor _tmp32_ = {0};
		gdouble _tmp33_ = 0.0;
		PlankDrawingColor _tmp34_ = {0};
		gdouble _tmp35_ = 0.0;
		gdouble _tmp36_ = 0.0;
		gdouble _tmp37_ = 0.0;
		_tmp32_ = average;
		_tmp33_ = _tmp32_.B;
		_tmp34_ = *color;
		_tmp35_ = _tmp34_.B;
		_tmp36_ = fabs (_tmp33_ - _tmp35_);
		_tmp37_ = delta;
		_tmp18_ = _tmp36_ <= _tmp37_;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		PlankDrawingColor _tmp38_ = {0};
		gdouble _tmp39_ = 0.0;
		PlankDrawingColor _tmp40_ = {0};
		gdouble _tmp41_ = 0.0;
		gdouble _tmp42_ = 0.0;
		gdouble _tmp43_ = 0.0;
		_tmp38_ = average;
		_tmp39_ = _tmp38_.A;
		_tmp40_ = *color;
		_tmp41_ = _tmp40_.A;
		_tmp42_ = fabs (_tmp39_ - _tmp41_);
		_tmp43_ = delta;
		_tmp17_ = _tmp42_ <= _tmp43_;
	} else {
		_tmp17_ = FALSE;
	}
	_vala_assert (_tmp17_, "(Math.fabs (average.R - color.R) <= delta) && (Math.fabs (average.G - color.G) <= delta) \t\t\t&& (Math.fabs (average.B - color.B) <= delta) && (Math.fabs (average.A - color.A) <= delta)");
	_g_object_unref0 (surface);
}
Exemple #25
0
GraphMediaModelosSentimiento* graph_media_modelos_sentimientos_get_sentimiento_por_id (GraphMediaModelosSentimientos* self, gint64 id) {
	GraphMediaModelosSentimiento* result = NULL;
	sqlite3_stmt* query = NULL;
	gint64 _tmp0_ = 0LL;
	gboolean _tmp1_ = FALSE;
	gchar* sql = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gint res = 0;
	sqlite3* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	sqlite3_stmt* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	sqlite3_stmt* _tmp9_ = NULL;
	gint64 _tmp10_ = 0LL;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	sqlite3_stmt* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	GraphMediaModelosSentimiento* celda = NULL;
	GraphMediaModelosSentimiento* _tmp16_ = NULL;
	GraphMediaModelosSentimiento* _tmp17_ = NULL;
	sqlite3_stmt* _tmp18_ = NULL;
	gint64 _tmp19_ = 0LL;
	GraphMediaModelosSentimiento* _tmp20_ = NULL;
	sqlite3_stmt* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	GraphMediaModelosSentimiento* _tmp24_ = NULL;
	sqlite3_stmt* _tmp25_ = NULL;
	const gchar* _tmp26_ = NULL;
	gchar* _tmp27_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = id;
	_tmp1_ = graph_media_modelos_tablas_existe_id ((GraphMediaModelosTablas*) self, _tmp0_);
	if (!_tmp1_) {
		result = NULL;
		_sqlite3_finalize0 (query);
		return result;
	}
	_tmp2_ = ((GraphMediaModelosTablas*) self)->nombre_tabla;
	_tmp3_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", "*", _tmp2_);
	sql = _tmp3_;
	_tmp4_ = graph_media_modelos_tablas_bd;
	_tmp5_ = sql;
	_tmp7_ = sqlite3_prepare_v2 (_tmp4_, _tmp5_, -1, &_tmp6_, NULL);
	_sqlite3_finalize0 (query);
	query = _tmp6_;
	res = _tmp7_;
	_tmp8_ = res;
	_vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp9_ = query;
	_tmp10_ = id;
	_tmp11_ = sqlite3_bind_int64 (_tmp9_, 1, _tmp10_);
	res = _tmp11_;
	_tmp12_ = res;
	_vala_assert (_tmp12_ == SQLITE_OK, "res == Sqlite.OK");
	_tmp13_ = query;
	_tmp14_ = sqlite3_step (_tmp13_);
	res = _tmp14_;
	_tmp15_ = res;
	_vala_assert (_tmp15_ == SQLITE_ROW, "res == Sqlite.ROW");
	_tmp16_ = graph_media_modelos_sentimiento_new ();
	celda = _tmp16_;
	_tmp17_ = celda;
	_tmp18_ = query;
	_tmp19_ = sqlite3_column_int64 (_tmp18_, 0);
	_tmp17_->id = _tmp19_;
	_tmp20_ = celda;
	_tmp21_ = query;
	_tmp22_ = sqlite3_column_text (_tmp21_, 1);
	_tmp23_ = g_strdup (_tmp22_);
	_g_free0 (_tmp20_->nombre);
	_tmp20_->nombre = _tmp23_;
	_tmp24_ = celda;
	_tmp25_ = query;
	_tmp26_ = sqlite3_column_text (_tmp25_, 2);
	_tmp27_ = g_strdup (_tmp26_);
	_g_free0 (_tmp24_->descripcion);
	_tmp24_->descripcion = _tmp27_;
	result = celda;
	_g_free0 (sql);
	_sqlite3_finalize0 (query);
	return result;
}
Exemple #26
0
void plank_tests_drawing_docksurface (void) {
	PlankDrawingDockSurface* surface = NULL;
	PlankDrawingDockSurface* surface2 = NULL;
	PlankDrawingDockSurface* surface3 = NULL;
	GdkPixbuf* pixbuf = NULL;
	PlankDrawingDockSurface* _tmp0_ = NULL;
	PlankDrawingDockSurface* _tmp1_ = NULL;
	PlankDrawingDockSurface* _tmp2_ = NULL;
	PlankDrawingDockSurface* _tmp3_ = NULL;
	PlankDrawingDockSurface* _tmp4_ = NULL;
	PlankDrawingDockSurface* _tmp5_ = NULL;
	cairo_surface_t* _tmp6_ = NULL;
	cairo_surface_t* _tmp7_ = NULL;
	PlankDrawingDockSurface* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
	GdkPixbuf* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gint _tmp28_ = 0;
	gint _tmp29_ = 0;
	gint _tmp30_ = 0;
	gint _tmp31_ = 0;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	_tmp0_ = plank_drawing_dock_surface_new (256, 256);
	_g_object_unref0 (surface);
	surface = _tmp0_;
	_tmp1_ = plank_drawing_dock_surface_new (1, 1);
	_tmp2_ = _tmp1_;
	_tmp3_ = plank_drawing_dock_surface_new_with_dock_surface (256, 256, _tmp2_);
	_g_object_unref0 (surface2);
	surface2 = _tmp3_;
	_g_object_unref0 (_tmp2_);
	_tmp4_ = plank_drawing_dock_surface_new (1, 1);
	_tmp5_ = _tmp4_;
	_tmp6_ = plank_drawing_dock_surface_get_Internal (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = plank_drawing_dock_surface_new_with_surface (256, 256, _tmp7_);
	_g_object_unref0 (surface3);
	surface3 = _tmp8_;
	_g_object_unref0 (_tmp5_);
	plank_drawing_dock_surface_clear (surface);
	plank_drawing_dock_surface_clear (surface2);
	plank_drawing_dock_surface_clear (surface3);
	_tmp9_ = plank_drawing_dock_surface_get_Width (surface);
	_tmp10_ = _tmp9_;
	_tmp11_ = plank_drawing_dock_surface_get_Width (surface2);
	_tmp12_ = _tmp11_;
	_vala_assert (_tmp10_ == _tmp12_, "surface.Width == surface2.Width");
	_tmp13_ = plank_drawing_dock_surface_get_Height (surface);
	_tmp14_ = _tmp13_;
	_tmp15_ = plank_drawing_dock_surface_get_Height (surface2);
	_tmp16_ = _tmp15_;
	_vala_assert (_tmp14_ == _tmp16_, "surface.Height == surface2.Height");
	_tmp17_ = plank_drawing_dock_surface_get_Width (surface);
	_tmp18_ = _tmp17_;
	_tmp19_ = plank_drawing_dock_surface_get_Width (surface3);
	_tmp20_ = _tmp19_;
	_vala_assert (_tmp18_ == _tmp20_, "surface.Width == surface3.Width");
	_tmp21_ = plank_drawing_dock_surface_get_Height (surface);
	_tmp22_ = _tmp21_;
	_tmp23_ = plank_drawing_dock_surface_get_Height (surface3);
	_tmp24_ = _tmp23_;
	_vala_assert (_tmp22_ == _tmp24_, "surface.Height == surface3.Height");
	_tmp25_ = plank_drawing_dock_surface_to_pixbuf (surface);
	_g_object_unref0 (pixbuf);
	pixbuf = _tmp25_;
	_tmp26_ = plank_drawing_dock_surface_get_Width (surface);
	_tmp27_ = _tmp26_;
	_tmp28_ = gdk_pixbuf_get_width (pixbuf);
	_tmp29_ = _tmp28_;
	_vala_assert (_tmp27_ == _tmp29_, "surface.Width == pixbuf.width");
	_tmp30_ = plank_drawing_dock_surface_get_Height (surface);
	_tmp31_ = _tmp30_;
	_tmp32_ = gdk_pixbuf_get_height (pixbuf);
	_tmp33_ = _tmp32_;
	_vala_assert (_tmp31_ == _tmp33_, "surface.Height == pixbuf.height");
	_g_object_unref0 (pixbuf);
	_g_object_unref0 (surface3);
	_g_object_unref0 (surface2);
	_g_object_unref0 (surface);
}
Exemple #27
0
static void __lambda5_ (Block9Data* _data9_) {
	GraphMediaModelosSentimientos* self;
	GList* paths = NULL;
	GtkIconView* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	GtkTreePath* path = NULL;
	GList* _tmp3_ = NULL;
	gconstpointer _tmp4_ = NULL;
	GtkTreePath* _tmp5_ = NULL;
	GValue title = {0};
	GValue icon = {0};
	GValue index = {0};
	gboolean tmp = FALSE;
	GtkListStore* _tmp6_ = NULL;
	GtkTreePath* _tmp7_ = NULL;
	GtkTreeIter _tmp8_ = {0};
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	GtkListStore* _tmp11_ = NULL;
	GtkTreeIter _tmp12_ = {0};
	GValue _tmp13_ = {0};
	GtkListStore* _tmp14_ = NULL;
	GtkTreeIter _tmp15_ = {0};
	GValue _tmp16_ = {0};
	GtkListStore* _tmp17_ = NULL;
	GtkTreeIter _tmp18_ = {0};
	GValue _tmp19_ = {0};
	GValue _tmp20_ = {0};
	GValue _tmp21_ = {0};
	GValue _tmp22_ = {0};
	GValue _tmp23_ = {0};
	self = _data9_->self;
	_tmp0_ = _data9_->vista;
	_tmp1_ = gtk_icon_view_get_selected_items (_tmp0_);
	paths = _tmp1_;
	_tmp2_ = paths;
	if (_tmp2_ == NULL) {
		__g_list_free__gtk_tree_path_free0_0 (paths);
		return;
	}
	_tmp3_ = paths;
	_tmp4_ = g_list_nth_data (_tmp3_, (guint) 0);
	_tmp5_ = _gtk_tree_path_copy0 ((GtkTreePath*) _tmp4_);
	path = _tmp5_;
	_tmp6_ = _data9_->model;
	_tmp7_ = path;
	_tmp9_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp6_, &_tmp8_, _tmp7_);
	_data9_->iter = _tmp8_;
	tmp = _tmp9_;
	_tmp10_ = tmp;
	_vala_assert (_tmp10_ == TRUE, "tmp == true");
	_tmp11_ = _data9_->model;
	_tmp12_ = _data9_->iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp11_, &_tmp12_, 0, &_tmp13_);
	G_IS_VALUE (&icon) ? (g_value_unset (&icon), NULL) : NULL;
	icon = _tmp13_;
	_tmp14_ = _data9_->model;
	_tmp15_ = _data9_->iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp14_, &_tmp15_, 1, &_tmp16_);
	G_IS_VALUE (&title) ? (g_value_unset (&title), NULL) : NULL;
	title = _tmp16_;
	_tmp17_ = _data9_->model;
	_tmp18_ = _data9_->iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp17_, &_tmp18_, 2, &_tmp19_);
	G_IS_VALUE (&index) ? (g_value_unset (&index), NULL) : NULL;
	index = _tmp19_;
	_tmp20_ = index;
	graph_media_modelos_app_gui_index_actual = g_value_get_int64 (&_tmp20_);
	_tmp21_ = title;
	_tmp22_ = icon;
	_tmp23_ = index;
	g_warning ("sentimientos.vala:220: %s: %p - %lld \n", g_value_get_string (&_tmp21_), g_value_get_object (&_tmp22_), g_value_get_int64 (&_tmp23_));
	G_IS_VALUE (&index) ? (g_value_unset (&index), NULL) : NULL;
	G_IS_VALUE (&icon) ? (g_value_unset (&icon), NULL) : NULL;
	G_IS_VALUE (&title) ? (g_value_unset (&title), NULL) : NULL;
	_gtk_tree_path_free0 (path);
	__g_list_free__gtk_tree_path_free0_0 (paths);
}