[gtk/matthiasc/for-main] slicelistmodel: Improve a test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-main] slicelistmodel: Improve a test
- Date: Sun, 17 Jul 2022 10:32:27 +0000 (UTC)
commit d840e082e6a376a13613060d13b32c60ab9c63e0
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 17 06:27:39 2022 -0400
slicelistmodel: Improve a test
Make sure that replacements in the underlying model
don't affect the slice list model if they are outside
the slice window.
testsuite/gtk/slicelistmodel.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/testsuite/gtk/slicelistmodel.c b/testsuite/gtk/slicelistmodel.c
index da87c8bd30..84a4ac72ba 100644
--- a/testsuite/gtk/slicelistmodel.c
+++ b/testsuite/gtk/slicelistmodel.c
@@ -305,6 +305,15 @@ test_changes (void)
g_list_store_remove (store, 19);
assert_changes (slice, "");
+ splice (store, 1, 1, (guint[]) { 111 }, 1);
+ assert_changes (slice, "");
+
+ splice (store, 18, 1, (guint[]) { 19, 20 }, 2);
+ assert_changes (slice, "");
+
+ g_list_store_remove (store, 19);
+ assert_changes (slice, "");
+
g_list_store_remove (store, 1);
assert_model (slice, "12 13 14 15 16");
assert_changes (slice, "0-5+5");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]