2018-06-08 17:03:22 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <locale.h>
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_init (void)
|
|
|
|
{
|
2018-06-08 17:10:59 +00:00
|
|
|
GThread *self = g_thread_self ();
|
|
|
|
|
2018-06-08 17:03:22 +00:00
|
|
|
g_assert (gtk_is_initialized () == FALSE);
|
2018-06-08 17:10:59 +00:00
|
|
|
g_assert (gtk_get_main_thread () == NULL);
|
|
|
|
|
2018-06-08 17:03:22 +00:00
|
|
|
g_assert (gtk_init_check ());
|
|
|
|
g_assert (gtk_is_initialized () == TRUE);
|
2018-06-08 17:10:59 +00:00
|
|
|
|
|
|
|
g_assert (gtk_get_main_thread () == self);
|
2018-06-08 17:03:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
/* Don't use gtk_test_init here because it implicitely initializes GTK+. */
|
|
|
|
g_test_init (&argc, &argv, NULL);
|
|
|
|
gtk_disable_setlocale();
|
|
|
|
setlocale (LC_ALL, "C");
|
|
|
|
|
|
|
|
g_test_add_func ("/main/init", test_init);
|
|
|
|
|
|
|
|
return g_test_run ();
|
|
|
|
}
|