forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
de49e47690
commit
222e6e5d6e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user