[gtk+/gtk-3-4] tests/filtermodel: Add test for bug 679910
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] tests/filtermodel: Add test for bug 679910
- Date: Tue, 17 Jul 2012 08:54:55 +0000 (UTC)
commit 9414823356a7ddef018374f08e9b555dde543189
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Jul 16 19:14:17 2012 +0200
tests/filtermodel: Add test for bug 679910
gtk/tests/filtermodel.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c
index 507ceef..dcacf8d 100644
--- a/gtk/tests/filtermodel.c
+++ b/gtk/tests/filtermodel.c
@@ -6756,6 +6756,33 @@ specific_bug_659022_row_deleted_free_level (void)
g_object_unref (model);
}
+static void
+specific_bug_679910 (void)
+{
+ GtkTreeModel *filter;
+ GtkListStore *store;
+ GtkTreeIter iter, nil_iter;
+ GtkTreeIter filter_iter;
+
+ store = gtk_list_store_new (1, G_TYPE_POINTER);
+ filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (store), NULL);
+
+ gtk_list_store_append (store, &nil_iter);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_append (store, &nil_iter);
+
+ gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (filter),
+ &filter_iter,
+ &iter);
+ iter = filter_iter;
+ g_return_if_fail (gtk_tree_model_iter_next (filter, &iter));
+ iter = filter_iter;
+ g_return_if_fail (gtk_tree_model_iter_previous (filter, &iter));
+
+ g_object_unref (filter);
+ g_object_unref (store);
+}
+
/* main */
void
@@ -7115,4 +7142,6 @@ register_filter_model_tests (void)
specific_bug_659022_row_deleted_node_invisible);
g_test_add_func ("/TreeModelFilter/specific/bug-659022/row-deleted-free-level",
specific_bug_659022_row_deleted_free_level);
+ g_test_add_func ("/TreeModelFilter/specific/bug-679910",
+ specific_bug_679910);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]