testsuite: Improve coverage for GtkBoolFilter

This commit is contained in:
Matthias Clasen 2020-10-30 18:17:50 -04:00
parent b23cae9643
commit d35a21873e

View File

@ -326,9 +326,11 @@ test_bool_simple (void)
assert_model (model, "3 6 9 12 15 18");
gtk_bool_filter_set_invert (GTK_BOOL_FILTER (filter), TRUE);
g_assert_true (gtk_bool_filter_get_invert (GTK_BOOL_FILTER (filter)));
assert_model (model, "1 2 4 5 7 8 10 11 13 14 16 17 19 20");
gtk_bool_filter_set_invert (GTK_BOOL_FILTER (filter), FALSE);
g_assert_false (gtk_bool_filter_get_invert (GTK_BOOL_FILTER (filter)));
assert_model (model, "3 6 9 12 15 18");
expr = gtk_cclosure_expression_new (G_TYPE_BOOLEAN,
@ -337,6 +339,7 @@ test_bool_simple (void)
G_CALLBACK (divisible_by),
GUINT_TO_POINTER (5), NULL);
gtk_bool_filter_set_expression (GTK_BOOL_FILTER (filter), expr);
g_assert_true (expr == gtk_bool_filter_get_expression (GTK_BOOL_FILTER (filter)));
gtk_expression_unref (expr);
assert_model (model, "5 10 15 20");