Debian Codegraph @

tests/test-lcb-init.c

raw symbols SCIP
1 /*
2 * Copyright (C) 2025 The Phosh.mobi e.V.
3 *
4 * SPDX-License-Identifier: GPL-3.0+
5 *
6 * Author: Evangelos Ribeiro Tzaras <[email protected]>
7 */
8
9 #include "gio/gio.h"
10 #define LIBCELLBROADCAST_USE_UNSTABLE_API
11 #include <libcellbroadcast.h>
12
13 static void
14 test_simple_init (void)
15 {
16 g_autoptr (GError) err = NULL;
17 gboolean ok;
18
19 ok = lcb_init (&err);
20 g_assert_no_error (err);
21 g_assert_true (ok);
22
23 g_assert_true (lcb_is_initted ());
24
25 lcb_uninit ();
26 g_assert_false (lcb_is_initted ());
27 }
28
29 int
30 main (int argc, char *argv[])
31 {
32 g_autoptr (GTestDBus) test_dbus = NULL;
33
34 test_dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
35 g_test_dbus_up (test_dbus);
36 g_test_init (&argc, &argv, NULL);
37
38 g_test_add_func ("/lcb/init/simple", test_simple_init);
39
40 return g_test_run ();
41 }