forked from AuroraMiddleware/gtk
testsuite: Improve coverage for GtkBoolFilter
This commit is contained in:
parent
b23cae9643
commit
d35a21873e
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user