Back to index

libindicate  12.10.0
indicate-and-crash.c
Go to the documentation of this file.
00001 /*
00002 A test for libindicate to ensure its quality.
00003 
00004 Copyright 2009 Canonical Ltd.
00005 
00006 Authors:
00007     Ted Gould <ted@canonical.com>
00008 
00009 This program is free software: you can redistribute it and/or modify it 
00010 under the terms of the GNU General Public License version 3, as published 
00011 by the Free Software Foundation.
00012 
00013 This program is distributed in the hope that it will be useful, but 
00014 WITHOUT ANY WARRANTY; without even the implied warranties of 
00015 MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
00016 PURPOSE.  See the GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License along 
00019 with this program.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 
00023 #include <glib.h>
00024 #include "libindicate/indicator.h"
00025 
00026 gboolean crashfunc (gpointer data) { *(int *)data = 5; return FALSE;}
00027 
00028 int
00029 main (int argc, char ** argv)
00030 {
00031        g_type_init();
00032 
00033        IndicateIndicator * indicator = indicate_indicator_new();
00034        indicate_indicator_show(indicator);
00035 
00036        g_timeout_add_seconds(15, crashfunc, NULL);
00037 
00038        g_main_loop_run(g_main_loop_new(NULL, FALSE));
00039 
00040        return 0;
00041 }