unit: Add Manager API binding
[framework/connectivity/connman.git] / unit / test-session.c
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2011  BWM CarIT GmbH. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include "gdbus/gdbus.h"
27
28 #include "test-connman.h"
29
30 static gboolean test_empty(gpointer data)
31 {
32         struct test_fix *fix = data;
33
34         util_idle_call(fix, util_quit_loop, NULL);
35
36         return FALSE;
37 }
38
39 static void setup_cb(struct test_fix *fix, gconstpointer data)
40 {
41         util_setup(fix, data);
42 }
43
44 static void teardown_cb(struct test_fix *fix, gconstpointer data)
45 {
46         util_teardown(fix, data);
47 }
48
49 int main(int argc, char *argv[])
50 {
51         g_test_init(&argc, &argv, NULL);
52
53         util_test_add("/empty",
54                 test_empty, setup_cb, teardown_cb);
55
56         return g_test_run();
57 }