summaryrefslogtreecommitdiff
path: root/gtk/tests
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2009-12-10 12:04:14 -0200
committerJohan Dahlin <johan@gnome.org>2009-12-10 12:33:55 -0200
commit6879032113bf72aa28272fc198339b0d6c62388e (patch)
treeaeff9b4cbc6fe93e851155097874f1cd00efb4bc /gtk/tests
parent53ab5c0b63f5c2c84ff4c4ec3b5dcdd039792acd (diff)
downloadgtk+-6879032113bf72aa28272fc198339b0d6c62388e.tar.gz
Fix the builder tests
Diffstat (limited to 'gtk/tests')
-rw-r--r--gtk/tests/builder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index 2ae604d5e6..be24c361a7 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1008,7 +1008,8 @@ test_children (void)
button = gtk_builder_get_object (builder, "button1");
g_assert (button != NULL);
g_assert (GTK_IS_BUTTON (button));
- g_assert (strcmp (GTK_WIDGET (GTK_WIDGET (button)->parent)->name, "window1") == 0);
+ g_assert (GTK_WIDGET(button)->parent != NULL);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_WIDGET (button)->parent)), "window1") == 0);
gtk_widget_destroy (GTK_WIDGET (window));
g_object_unref (builder);
@@ -1024,10 +1025,9 @@ test_children (void)
vbox = gtk_builder_get_object (builder, "dialog1-vbox");
g_assert (vbox != NULL);
g_assert (GTK_IS_VBOX (vbox));
- g_assert (GTK_WIDGET (vbox)->parent != NULL);
- g_assert (strcmp (GTK_WIDGET (GTK_WIDGET (vbox)->parent)->name, "dialog1") == 0);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_WIDGET (vbox)->parent)), "dialog1") == 0);
g_assert (GTK_CONTAINER (vbox)->border_width == 10);
- g_assert (strcmp (GTK_WIDGET (GTK_DIALOG (dialog)->vbox)->name, "dialog1-vbox") == 0);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->vbox)), "dialog1-vbox") == 0);
action_area = gtk_builder_get_object (builder, "dialog1-action_area");
g_assert (action_area != NULL);
@@ -1035,8 +1035,8 @@ test_children (void)
g_assert (GTK_WIDGET (action_area)->parent != NULL);
g_assert (GTK_CONTAINER (action_area)->border_width == 20);
g_assert (GTK_DIALOG (dialog)->action_area != NULL);
- g_assert (GTK_WIDGET (GTK_DIALOG (dialog)->action_area)->name != NULL);
- g_assert (strcmp (GTK_WIDGET (GTK_DIALOG (dialog)->action_area)->name, "dialog1-action_area") == 0);
+ g_assert (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->action_area)) != NULL);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->action_area)), "dialog1-action_area") == 0);
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (builder);
}