[gtk/stack-fixes] add more autoselect tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/stack-fixes] add more autoselect tests
- Date: Mon, 11 Feb 2019 03:19:56 +0000 (UTC)
commit f496b4c07282d6e726cc8bc43253d931c5451702
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 10 22:19:28 2019 -0500
add more autoselect tests
testsuite/gtk/singleselection.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/testsuite/gtk/singleselection.c b/testsuite/gtk/singleselection.c
index 455683de09..b307e70715 100644
--- a/testsuite/gtk/singleselection.c
+++ b/testsuite/gtk/singleselection.c
@@ -257,6 +257,7 @@ new_model (GListStore *store, gboolean autoselect, gboolean can_unselect)
gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (result), FALSE);
gtk_single_selection_set_can_unselect (GTK_SINGLE_SELECTION (result), TRUE);
gtk_selection_model_unselect_item (result, 0);
+ assert_selection (result, "");
gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (result), autoselect);
gtk_single_selection_set_can_unselect (GTK_SINGLE_SELECTION (result), can_unselect);
@@ -402,6 +403,16 @@ test_autoselect (void)
assert_selection (selection, "97");
assert_selection_changes (selection, "0:1");
+ gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (selection), FALSE);
+ gtk_single_selection_set_can_unselect (GTK_SINGLE_SELECTION (selection), TRUE);
+ gtk_selection_model_unselect_item (selection, 0);
+ assert_selection (selection, "");
+ assert_selection_changes (selection, "0:1");
+
+ gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (selection), TRUE);
+ assert_selection (selection, "97");
+ assert_selection_changes (selection, "0:1");
+
ignore_changes (selection);
g_object_unref (store);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]