diff options
| author | Kalev Lember <kalevlember@gmail.com> | 2013-07-04 12:15:22 (GMT) |
|---|---|---|
| committer | Kalev Lember <kalevlember@gmail.com> | 2013-07-04 13:19:47 (GMT) |
| commit | 1f9fd5a95269740ce60984dd80c6c939f890cac3 (patch) | |
| tree | bbc1a5533f9f8278a58a2824e58433e85be78cf3 | |
| parent | b46d583f87835c303ecc86f29bd601eb0b678863 (diff) | |
| download | gtk+-1f9fd5a95269740ce60984dd80c6c939f890cac3.zip gtk+-1f9fd5a95269740ce60984dd80c6c939f890cac3.tar.xz | |
testsuite: Add tests for gtk_list_box_row_get_index
https://bugzilla.gnome.org/show_bug.cgi?id=703618
| -rw-r--r-- | testsuite/gtk/listbox.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/gtk/listbox.c b/testsuite/gtk/listbox.c index 6db1276..4f5e22d 100644 --- a/testsuite/gtk/listbox.c +++ b/testsuite/gtk/listbox.c @@ -106,6 +106,7 @@ test_selection (void) gint i; gchar *s; gint count; + gint index; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); @@ -153,6 +154,16 @@ test_selection (void) row2 = gtk_list_box_get_selected_row (list); g_assert (row2 == NULL); + row = gtk_list_box_get_row_at_index (list, 20); + index = gtk_list_box_row_get_index (row); + g_assert_cmpint (index, ==, 20); + + row = GTK_LIST_BOX_ROW (gtk_list_box_row_new ()); + g_object_ref_sink (row); + index = gtk_list_box_row_get_index (row); + g_assert_cmpint (index, ==, -1); + g_object_unref (row); + g_object_unref (list); } |
