[gtk/matthiasc/expression] Add some more tests
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/expression] Add some more tests
- Date: Thu, 28 Nov 2019 18:32:06 +0000 (UTC)
commit 54ef0eb422fe28b65c4efbabfc5627dfeaaf9ad7
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 28 13:31:10 2019 -0500
Add some more tests
The nested one fails now.
testsuite/gtk/expression.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/gtk/expression.c b/testsuite/gtk/expression.c
index b86f848760..da452f1afd 100644
--- a/testsuite/gtk/expression.c
+++ b/testsuite/gtk/expression.c
@@ -206,13 +206,25 @@ test_nested (void)
g_assert_cmpstr (g_value_get_string (&value), ==, "salad");
g_value_unset (&value);
+ gtk_filter_list_model_set_filter (filtered, filter);
+ g_assert_cmpint (counter, ==, 0);
+
g_clear_object (&filter);
filter = gtk_string_filter_new ();
- gtk_string_filter_set_search (GTK_STRING_FILTER (filter), "bar");
+ gtk_string_filter_set_search (GTK_STRING_FILTER (filter), "salad");
gtk_filter_list_model_set_filter (filtered, filter);
g_assert_cmpint (counter, >, 0);
counter = 0;
+ res = gtk_expression_evaluate (expr, NULL, &value);
+ g_assert_true (res);
+ g_assert_cmpstr (g_value_get_string (&value), ==, "salad");
+ g_value_unset (&value);
+
+ gtk_string_filter_set_search (GTK_STRING_FILTER (filter), "bar");
+ g_assert_cmpint (counter, >, 0);
+ counter = 0;
+
res = gtk_expression_evaluate (expr, NULL, &value);
g_assert_true (res);
g_assert_cmpstr (g_value_get_string (&value), ==, "bar");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]