From ca42ec1a7a3a7b219477d6c16a0aff30d64efb1a Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 2 Dec 2010 16:08:10 +0200 Subject: [PATCH] tests: Add test for clutter_model_get_iter_at_row() http://bugzilla.clutter-project.org/show_bug.cgi?id=2460 --- tests/conform/test-model.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/conform/test-model.c b/tests/conform/test-model.c index c37f6b1a4..b9fb279c8 100644 --- a/tests/conform/test-model.c +++ b/tests/conform/test-model.c @@ -227,6 +227,23 @@ test_list_model_filter (TestConformSimpleFixture *fixture, g_object_unref (iter); + if (g_test_verbose ()) + g_print ("get_iter_at_row...\n"); + + clutter_model_set_filter (test_data.model, filter_odd_rows, NULL, NULL); + + for (i = 0; i < 5; i++) + { + iter = clutter_model_get_iter_at_row (test_data.model, i); + compare_iter (iter, i , + filter_odd[i].expected_foo, + filter_odd[i].expected_bar); + g_object_unref (iter); + } + + iter = clutter_model_get_iter_at_row (test_data.model, 5); + g_assert (iter == NULL); + g_object_unref (test_data.model); }