~aacid/remote-login-service/free_subservers_on_new_call

« back to all changes in this revision

Viewing changes to tests/server-test.c

  • Committer: Tarmac
  • Author(s): Ted Gould
  • Date: 2012-09-14 15:01:36 UTC
  • mfrom: (68.2.4 nm-protections)
  • Revision ID: tarmac-20120914150136-1x8qsyimet7deotg
Protect NM code from systems without NM running. Approved by Albert Astals Cid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include "rdp-server.h"
7
7
#include "uccs-server.h"
8
8
 
 
9
static gboolean
 
10
no_fatal_warnings (const gchar * log_domain, GLogLevelFlags level, const gchar * message, gpointer userdata)
 
11
{
 
12
        if (level & (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG)) {
 
13
                return FALSE;
 
14
        }
 
15
 
 
16
        return TRUE;
 
17
}
 
18
 
9
19
static void
10
20
state_signal (Server * server, ServerState newstate, gboolean * signaled)
11
21
{
16
26
static void
17
27
test_update_signal (void)
18
28
{
 
29
        g_test_log_set_fatal_handler(no_fatal_warnings, NULL);
 
30
 
19
31
        GKeyFile * keyfile = g_key_file_new();
20
32
        const gchar * groupname = CONFIG_SERVER_PREFIX " Server Name";
21
33
        g_key_file_set_string(keyfile, groupname, CONFIG_SERVER_NAME, "My Server");
52
64
static void
53
65
test_uccs_domains (void)
54
66
{
 
67
        g_test_log_set_fatal_handler(no_fatal_warnings, NULL);
 
68
 
55
69
        GKeyFile * keyfile = g_key_file_new();
56
70
        const gchar * groupname = CONFIG_SERVER_PREFIX " Server Name";
57
71
        g_key_file_set_string(keyfile, groupname, CONFIG_SERVER_NAME, "My Server");
78
92
static void
79
93
test_uccs_exec (void)
80
94
{
 
95
        g_test_log_set_fatal_handler(no_fatal_warnings, NULL);
 
96
 
81
97
        GKeyFile * keyfile = g_key_file_new();
82
98
        const gchar * groupname = CONFIG_SERVER_PREFIX " Server Name";
83
99
        g_key_file_set_string(keyfile, groupname, CONFIG_SERVER_NAME, "My Server");
130
146
static void
131
147
test_object_variant (gconstpointer data)
132
148
{
 
149
        g_test_log_set_fatal_handler(fatal_func, NULL);
 
150
 
133
151
        type_data_t * typedata = (type_data_t *)data;
134
152
 
135
153
        Server * server = g_object_new(typedata->type, NULL);
207
225
static void
208
226
test_object_creation (gconstpointer data)
209
227
{
 
228
        g_test_log_set_fatal_handler(no_fatal_warnings, NULL);
 
229
 
210
230
        type_data_t * typedata = (type_data_t *)data;
211
231
 
212
232
        Server * server = g_object_new(typedata->type, NULL);