[gtk/wip/otte/for-master: 9/12] testsuite: Use GtkTextDirection instead of GtkWindowType
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 9/12] testsuite: Use GtkTextDirection instead of GtkWindowType
- Date: Fri, 14 Feb 2020 20:22:47 +0000 (UTC)
commit 222e6e5d6e440785623987632101fc0ad9144513
Author: Benjamin Otte <otte redhat com>
Date: Fri Feb 14 21:15:45 2020 +0100
testsuite: Use GtkTextDirection instead of GtkWindowType
GtkWindowType is aout to be dropped, so use another enum for the enum
tests - one that is likely to survive for a long time.
testsuite/gtk/builder.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index 520b4e07d2..82bc92d3ed 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -1711,18 +1711,18 @@ test_value_from_string (void)
g_error_free (error);
error = NULL;
- g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WINDOW_TYPE, "toplevel", &value, &error)
== TRUE);
+ g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_TEXT_DIRECTION, "rtl", &value, &error) ==
TRUE);
g_assert (G_VALUE_HOLDS_ENUM (&value));
- g_assert (g_value_get_enum (&value) == GTK_WINDOW_TOPLEVEL);
+ g_assert (g_value_get_enum (&value) == GTK_TEXT_DIR_RTL);
g_value_unset (&value);
- g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WINDOW_TYPE, "sliff", &value, &error) ==
FALSE);
+ g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_TEXT_DIRECTION, "sliff", &value, &error)
== FALSE);
g_value_unset (&value);
g_assert_error (error, GTK_BUILDER_ERROR, GTK_BUILDER_ERROR_INVALID_VALUE);
g_error_free (error);
error = NULL;
- g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WINDOW_TYPE, "foobar", &value, &error) ==
FALSE);
+ g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_TEXT_DIRECTION, "foobar", &value, &error)
== FALSE);
g_value_unset (&value);
g_assert_error (error, GTK_BUILDER_ERROR, GTK_BUILDER_ERROR_INVALID_VALUE);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]