Fix report_basic test
[platform/core/system/crash-worker.git] / tests / test2.c
1 #include <glib.h>
2
3 gboolean crasher(gpointer data)
4 {
5         *(int*)data = 1;
6         return TRUE;
7 }
8
9 int main()
10 {
11         GMainLoop *loop = g_main_loop_new(NULL, FALSE);
12
13         GSource *idle_source = g_idle_source_new();
14         g_source_set_callback(idle_source, crasher, NULL, NULL);
15         g_source_attach(idle_source, g_main_context_ref_thread_default());
16
17         g_main_loop_run(loop);
18
19         return 0;
20 }