#include <gtk/gtk.h>

void testcase_print_object_name(GObject *object) {
	gchar *name;
	
	g_object_get(G_OBJECT(object), "name", &name, NULL);
	if (*name) {
		g_print("%s ", name);
	}
	g_free(name);
}

int main(int argc, char *argv[]) {
	GtkBuilder *builder;
	GSList *objects;
	
	gtk_init(&argc, &argv);
	
	builder = gtk_builder_new();
	gtk_builder_add_from_file(builder, "testcase.ui", NULL);
	objects = gtk_builder_get_objects(builder);
	
	g_print("Actual widget names:\t");
	g_slist_foreach(objects, (GFunc) testcase_print_object_name, NULL);
	g_print("\n");

	g_print("Expected widget names:\twindow1 button1 action1\n");
	return 0;
}
