| 1 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 3 |
/* |
| 4 |
* Copyright (C) 2014 Aleksander Morgado <[email protected]> |
| 5 |
*/ |
| 6 |
|
| 7 |
#include <config.h> |
| 8 |
#include <string.h> |
| 9 |
|
| 10 |
#include "mbim-cid.h" |
| 11 |
#include "mbim-uuid.h" |
| 12 |
#include "mbim-basic-connect.h" |
| 13 |
#include "mbim-proxy-helpers.h" |
| 14 |
|
| 15 |
/*****************************************************************************/ |
| 16 |
|
| 17 |
static void |
| 18 |
test_parse_single_service_0_cids (void) |
| 19 |
{ |
| 20 |
MbimMessage *message; |
| 21 |
MbimEventEntry **in; |
| 22 |
MbimEventEntry **out; |
| 23 |
GError *error = NULL; |
| 24 |
gsize out_size = 0; |
| 25 |
|
| 26 |
in = g_new0 (MbimEventEntry *, 2); |
| 27 |
in[0] = g_new0 (MbimEventEntry, 1); |
| 28 |
memcpy (&in[0]->device_service_id, MBIM_UUID_BASIC_CONNECT, sizeof (MbimUuid)); |
| 29 |
in[0]->cids_count = 0; |
| 30 |
in[0]->cids = NULL; |
| 31 |
|
| 32 |
message = mbim_message_device_service_subscribe_list_set_new (1, (const MbimEventEntry *const *)in, &error); |
| 33 |
g_assert_no_error (error); |
| 34 |
g_assert (message != NULL); |
| 35 |
|
| 36 |
out = _mbim_proxy_helper_service_subscribe_request_parse (message, &out_size, &error); |
| 37 |
g_assert_no_error (error); |
| 38 |
g_assert (out != NULL); |
| 39 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)in, 1, |
| 40 |
(const MbimEventEntry * const *)out, out_size)); |
| 41 |
g_assert_cmpuint (out_size, ==, 1); |
| 42 |
|
| 43 |
mbim_message_unref (message); |
| 44 |
mbim_event_entry_array_free (in); |
| 45 |
mbim_event_entry_array_free (out); |
| 46 |
} |
| 47 |
|
| 48 |
static void |
| 49 |
test_parse_single_service_1_cids (void) |
| 50 |
{ |
| 51 |
MbimMessage *message; |
| 52 |
MbimEventEntry **in; |
| 53 |
MbimEventEntry **out; |
| 54 |
GError *error = NULL; |
| 55 |
gsize out_size = 0; |
| 56 |
|
| 57 |
in = g_new0 (MbimEventEntry *, 2); |
| 58 |
in[0] = g_new0 (MbimEventEntry, 1); |
| 59 |
memcpy (&in[0]->device_service_id, MBIM_UUID_BASIC_CONNECT, sizeof (MbimUuid)); |
| 60 |
in[0]->cids_count = 1; |
| 61 |
in[0]->cids = g_new0 (guint32, in[0]->cids_count); |
| 62 |
in[0]->cids[0] = MBIM_CID_BASIC_CONNECT_SUBSCRIBER_READY_STATUS; |
| 63 |
|
| 64 |
message = mbim_message_device_service_subscribe_list_set_new (1, (const MbimEventEntry *const *)in, &error); |
| 65 |
g_assert_no_error (error); |
| 66 |
g_assert (message != NULL); |
| 67 |
|
| 68 |
out = _mbim_proxy_helper_service_subscribe_request_parse (message, &out_size, &error); |
| 69 |
g_assert_no_error (error); |
| 70 |
g_assert (out != NULL); |
| 71 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)in, 1, |
| 72 |
(const MbimEventEntry * const *)out, out_size)); |
| 73 |
g_assert_cmpuint (out_size, ==, 1); |
| 74 |
|
| 75 |
mbim_message_unref (message); |
| 76 |
mbim_event_entry_array_free (in); |
| 77 |
mbim_event_entry_array_free (out); |
| 78 |
} |
| 79 |
|
| 80 |
static void |
| 81 |
test_parse_single_service_5_cids (void) |
| 82 |
{ |
| 83 |
MbimMessage *message; |
| 84 |
MbimEventEntry **in; |
| 85 |
MbimEventEntry **out; |
| 86 |
GError *error = NULL; |
| 87 |
gsize out_size = 0; |
| 88 |
|
| 89 |
in = g_new0 (MbimEventEntry *, 2); |
| 90 |
in[0] = g_new0 (MbimEventEntry, 1); |
| 91 |
memcpy (&in[0]->device_service_id, MBIM_UUID_BASIC_CONNECT, sizeof (MbimUuid)); |
| 92 |
in[0]->cids_count = 5; |
| 93 |
in[0]->cids = g_new0 (guint32, in[0]->cids_count); |
| 94 |
in[0]->cids[0] = MBIM_CID_BASIC_CONNECT_SUBSCRIBER_READY_STATUS; |
| 95 |
in[0]->cids[1] = MBIM_CID_BASIC_CONNECT_RADIO_STATE; |
| 96 |
in[0]->cids[2] = MBIM_CID_BASIC_CONNECT_SIGNAL_STATE; |
| 97 |
in[0]->cids[3] = MBIM_CID_BASIC_CONNECT_IP_CONFIGURATION; |
| 98 |
in[0]->cids[4] = MBIM_CID_BASIC_CONNECT_NETWORK_IDLE_HINT; |
| 99 |
|
| 100 |
message = mbim_message_device_service_subscribe_list_set_new (1, (const MbimEventEntry *const *)in, &error); |
| 101 |
g_assert_no_error (error); |
| 102 |
g_assert (message != NULL); |
| 103 |
|
| 104 |
out = _mbim_proxy_helper_service_subscribe_request_parse (message, &out_size, &error); |
| 105 |
g_assert_no_error (error); |
| 106 |
g_assert (out != NULL); |
| 107 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)in, 1, |
| 108 |
(const MbimEventEntry * const *)out, out_size)); |
| 109 |
g_assert_cmpuint (out_size, ==, 1); |
| 110 |
|
| 111 |
mbim_message_unref (message); |
| 112 |
mbim_event_entry_array_free (in); |
| 113 |
mbim_event_entry_array_free (out); |
| 114 |
} |
| 115 |
|
| 116 |
/*****************************************************************************/ |
| 117 |
|
| 118 |
static void |
| 119 |
test_merge_none (void) |
| 120 |
{ |
| 121 |
MbimEventEntry **list = NULL; |
| 122 |
gsize list_size = 0; |
| 123 |
gsize out_size = 0; |
| 124 |
|
| 125 |
/* merge */ |
| 126 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, NULL, 0, &out_size); |
| 127 |
|
| 128 |
g_assert (list == NULL); |
| 129 |
g_assert_cmpuint (out_size, ==, 0); |
| 130 |
} |
| 131 |
|
| 132 |
static void |
| 133 |
test_merge_standard_services (void) |
| 134 |
{ |
| 135 |
MbimEventEntry **list = NULL; |
| 136 |
gsize list_size = 0; |
| 137 |
MbimEventEntry **addition; |
| 138 |
gsize addition_size; |
| 139 |
gsize out_size = 0; |
| 140 |
|
| 141 |
/* setup a new list with a subset of standard services */ |
| 142 |
addition_size = 2; |
| 143 |
addition = g_new0 (MbimEventEntry *, addition_size + 1); |
| 144 |
addition[0] = g_new0 (MbimEventEntry, 1); |
| 145 |
memcpy (&addition[0]->device_service_id, MBIM_UUID_BASIC_CONNECT, sizeof (MbimUuid)); |
| 146 |
addition[0]->cids_count = 5; |
| 147 |
addition[0]->cids = g_new0 (guint32, addition[0]->cids_count); |
| 148 |
addition[0]->cids[0] = MBIM_CID_BASIC_CONNECT_SUBSCRIBER_READY_STATUS; |
| 149 |
addition[0]->cids[1] = MBIM_CID_BASIC_CONNECT_RADIO_STATE; |
| 150 |
addition[0]->cids[2] = MBIM_CID_BASIC_CONNECT_SIGNAL_STATE; |
| 151 |
addition[0]->cids[3] = MBIM_CID_BASIC_CONNECT_IP_CONFIGURATION; |
| 152 |
addition[0]->cids[4] = MBIM_CID_BASIC_CONNECT_NETWORK_IDLE_HINT; |
| 153 |
addition[1] = g_new0 (MbimEventEntry, 1); |
| 154 |
memcpy (&addition[1]->device_service_id, MBIM_UUID_SMS, sizeof (MbimUuid)); |
| 155 |
addition[1]->cids_count = 2; |
| 156 |
addition[1]->cids = g_new0 (guint32, addition[1]->cids_count); |
| 157 |
addition[1]->cids[0] = MBIM_CID_SMS_READ; |
| 158 |
addition[1]->cids[1] = MBIM_CID_SMS_SEND; |
| 159 |
|
| 160 |
/* merge */ |
| 161 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, addition, addition_size, &out_size); |
| 162 |
|
| 163 |
/* The new list should be empty, as standard services are ignored */ |
| 164 |
g_assert (list == NULL); |
| 165 |
g_assert_cmpuint (out_size, ==, 0); |
| 166 |
|
| 167 |
mbim_event_entry_array_free (addition); |
| 168 |
} |
| 169 |
|
| 170 |
static void |
| 171 |
test_merge_other_services (void) |
| 172 |
{ |
| 173 |
MbimEventEntry **list = NULL; |
| 174 |
gsize list_size = 0; |
| 175 |
MbimEventEntry **addition; |
| 176 |
gsize addition_size; |
| 177 |
gsize out_size = 0; |
| 178 |
|
| 179 |
/* setup a new list with a subset of other services */ |
| 180 |
addition_size = 2; |
| 181 |
addition = g_new0 (MbimEventEntry *, addition_size + 1); |
| 182 |
addition[0] = g_new0 (MbimEventEntry, 1); |
| 183 |
memcpy (&addition[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 184 |
addition[0]->cids_count = 5; |
| 185 |
addition[0]->cids = g_new0 (guint32, addition[0]->cids_count); |
| 186 |
addition[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 187 |
addition[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 188 |
addition[0]->cids[2] = MBIM_CID_ATDS_OPERATORS; |
| 189 |
addition[0]->cids[3] = MBIM_CID_ATDS_RAT; |
| 190 |
addition[0]->cids[4] = MBIM_CID_ATDS_REGISTER_STATE; |
| 191 |
addition[1] = g_new0 (MbimEventEntry, 1); |
| 192 |
memcpy (&addition[1]->device_service_id, MBIM_UUID_QMI, sizeof (MbimUuid)); |
| 193 |
addition[1]->cids_count = 1; |
| 194 |
addition[1]->cids = g_new0 (guint32, addition[1]->cids_count); |
| 195 |
addition[1]->cids[0] = MBIM_CID_QMI_MSG; |
| 196 |
|
| 197 |
/* merge */ |
| 198 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, addition, addition_size, &out_size); |
| 199 |
|
| 200 |
/* The new list should be totally equal to the addition, as the original list was empty. */ |
| 201 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)list, out_size, |
| 202 |
(const MbimEventEntry * const *)addition, addition_size)); |
| 203 |
|
| 204 |
mbim_event_entry_array_free (list); |
| 205 |
mbim_event_entry_array_free (addition); |
| 206 |
} |
| 207 |
|
| 208 |
static void |
| 209 |
test_merge_list_same_service (void) |
| 210 |
{ |
| 211 |
MbimEventEntry **list; |
| 212 |
gsize list_size; |
| 213 |
MbimEventEntry **addition; |
| 214 |
gsize addition_size; |
| 215 |
MbimEventEntry **expected; |
| 216 |
gsize expected_size; |
| 217 |
gsize out_size = 0; |
| 218 |
|
| 219 |
/* setup a new list with a subset of non-standard services */ |
| 220 |
list_size = 1; |
| 221 |
list = g_new0 (MbimEventEntry *, list_size + 1); |
| 222 |
list[0] = g_new0 (MbimEventEntry, 1); |
| 223 |
memcpy (&list[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 224 |
list[0]->cids_count = 2; |
| 225 |
list[0]->cids = g_new0 (guint32, list[0]->cids_count); |
| 226 |
list[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 227 |
list[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 228 |
|
| 229 |
/* setup a new list with a subset of non-standard services */ |
| 230 |
addition_size = 1; |
| 231 |
addition = g_new0 (MbimEventEntry *, addition_size + 1); |
| 232 |
addition[0] = g_new0 (MbimEventEntry, 1); |
| 233 |
memcpy (&addition[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 234 |
addition[0]->cids_count = 3; |
| 235 |
addition[0]->cids = g_new0 (guint32, addition[0]->cids_count); |
| 236 |
addition[0]->cids[0] = MBIM_CID_ATDS_OPERATORS; |
| 237 |
addition[0]->cids[1] = MBIM_CID_ATDS_RAT; |
| 238 |
addition[0]->cids[2] = MBIM_CID_ATDS_REGISTER_STATE; |
| 239 |
|
| 240 |
/* merge */ |
| 241 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, addition, addition_size, &out_size); |
| 242 |
|
| 243 |
/* setup the expected list */ |
| 244 |
expected_size = 1; |
| 245 |
expected = g_new0 (MbimEventEntry *, expected_size + 1); |
| 246 |
expected[0] = g_new0 (MbimEventEntry, 1); |
| 247 |
memcpy (&expected[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 248 |
expected[0]->cids_count = 5; |
| 249 |
expected[0]->cids = g_new0 (guint32, expected[0]->cids_count); |
| 250 |
expected[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 251 |
expected[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 252 |
expected[0]->cids[2] = MBIM_CID_ATDS_OPERATORS; |
| 253 |
expected[0]->cids[3] = MBIM_CID_ATDS_RAT; |
| 254 |
expected[0]->cids[4] = MBIM_CID_ATDS_REGISTER_STATE; |
| 255 |
|
| 256 |
/* Compare */ |
| 257 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)list, out_size, |
| 258 |
(const MbimEventEntry * const *)expected, expected_size)); |
| 259 |
|
| 260 |
mbim_event_entry_array_free (list); |
| 261 |
mbim_event_entry_array_free (addition); |
| 262 |
mbim_event_entry_array_free (expected); |
| 263 |
} |
| 264 |
|
| 265 |
static void |
| 266 |
test_merge_list_different_services (void) |
| 267 |
{ |
| 268 |
MbimEventEntry **list; |
| 269 |
gsize list_size; |
| 270 |
MbimEventEntry **addition; |
| 271 |
gsize addition_size; |
| 272 |
MbimEventEntry **expected; |
| 273 |
gsize expected_size; |
| 274 |
gsize out_size = 0; |
| 275 |
|
| 276 |
/* setup a new list with a subset of non-standard services */ |
| 277 |
list_size = 1; |
| 278 |
list = g_new0 (MbimEventEntry *, list_size + 1); |
| 279 |
list[0] = g_new0 (MbimEventEntry, 1); |
| 280 |
memcpy (&list[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 281 |
list[0]->cids_count = 2; |
| 282 |
list[0]->cids = g_new0 (guint32, list[0]->cids_count); |
| 283 |
list[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 284 |
list[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 285 |
|
| 286 |
/* setup a new list with a subset of non-standard services */ |
| 287 |
addition_size = 1; |
| 288 |
addition = g_new0 (MbimEventEntry *, addition_size + 1); |
| 289 |
addition[0] = g_new0 (MbimEventEntry, 1); |
| 290 |
memcpy (&addition[0]->device_service_id, MBIM_UUID_QMI, sizeof (MbimUuid)); |
| 291 |
addition[0]->cids_count = 1; |
| 292 |
addition[0]->cids = g_new0 (guint32, addition[0]->cids_count); |
| 293 |
addition[0]->cids[0] = MBIM_CID_QMI_MSG; |
| 294 |
|
| 295 |
/* merge */ |
| 296 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, addition, addition_size, &out_size); |
| 297 |
|
| 298 |
/* setup the expected list */ |
| 299 |
expected_size = 2; |
| 300 |
expected = g_new0 (MbimEventEntry *, expected_size + 1); |
| 301 |
expected[0] = g_new0 (MbimEventEntry, 1); |
| 302 |
memcpy (&expected[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 303 |
expected[0]->cids_count = 2; |
| 304 |
expected[0]->cids = g_new0 (guint32, expected[0]->cids_count); |
| 305 |
expected[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 306 |
expected[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 307 |
expected[1] = g_new0 (MbimEventEntry, 1); |
| 308 |
memcpy (&expected[1]->device_service_id, MBIM_UUID_QMI, sizeof (MbimUuid)); |
| 309 |
expected[1]->cids_count = 1; |
| 310 |
expected[1]->cids = g_new0 (guint32, expected[1]->cids_count); |
| 311 |
expected[1]->cids[0] = MBIM_CID_QMI_MSG; |
| 312 |
|
| 313 |
/* Compare */ |
| 314 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)list, out_size, |
| 315 |
(const MbimEventEntry * const *)expected, expected_size)); |
| 316 |
|
| 317 |
mbim_event_entry_array_free (list); |
| 318 |
mbim_event_entry_array_free (addition); |
| 319 |
mbim_event_entry_array_free (expected); |
| 320 |
} |
| 321 |
|
| 322 |
static void |
| 323 |
test_merge_list_merged_services (void) |
| 324 |
{ |
| 325 |
MbimEventEntry **list; |
| 326 |
gsize list_size; |
| 327 |
MbimEventEntry **addition; |
| 328 |
gsize addition_size; |
| 329 |
MbimEventEntry **expected; |
| 330 |
gsize expected_size; |
| 331 |
gsize out_size = 0; |
| 332 |
|
| 333 |
/* setup a new list with a subset of non-standard services */ |
| 334 |
list_size = 2; |
| 335 |
list = g_new0 (MbimEventEntry *, list_size + 1); |
| 336 |
list[0] = g_new0 (MbimEventEntry, 1); |
| 337 |
memcpy (&list[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 338 |
list[0]->cids_count = 3; |
| 339 |
list[0]->cids = g_new0 (guint32, list[0]->cids_count); |
| 340 |
list[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 341 |
list[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 342 |
list[0]->cids[2] = MBIM_CID_ATDS_OPERATORS; |
| 343 |
list[1] = g_new0 (MbimEventEntry, 1); |
| 344 |
memcpy (&list[1]->device_service_id, MBIM_UUID_QMI, sizeof (MbimUuid)); |
| 345 |
list[1]->cids_count = 1; |
| 346 |
list[1]->cids = g_new0 (guint32, list[1]->cids_count); |
| 347 |
list[1]->cids[0] = MBIM_CID_QMI_MSG; |
| 348 |
|
| 349 |
/* setup a new list with a subset of standard and non-standard services */ |
| 350 |
addition_size = 2; |
| 351 |
addition = g_new0 (MbimEventEntry *, addition_size + 1); |
| 352 |
addition[0] = g_new0 (MbimEventEntry, 1); |
| 353 |
memcpy (&addition[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 354 |
addition[0]->cids_count = 1; |
| 355 |
addition[0]->cids = g_new0 (guint32, addition[0]->cids_count); |
| 356 |
addition[0]->cids[0] = MBIM_CID_ATDS_RAT; |
| 357 |
addition[1] = g_new0 (MbimEventEntry, 1); |
| 358 |
memcpy (&addition[1]->device_service_id, MBIM_UUID_MS_HOST_SHUTDOWN, sizeof (MbimUuid)); |
| 359 |
addition[1]->cids_count = 1; |
| 360 |
addition[1]->cids = g_new0 (guint32, addition[1]->cids_count); |
| 361 |
addition[1]->cids[0] = MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY; |
| 362 |
|
| 363 |
/* merge */ |
| 364 |
list = _mbim_proxy_helper_service_subscribe_list_merge (list, list_size, addition, addition_size, &out_size); |
| 365 |
|
| 366 |
/* setup the expected list */ |
| 367 |
expected_size = 3; |
| 368 |
expected = g_new0 (MbimEventEntry *, expected_size + 1); |
| 369 |
expected[0] = g_new0 (MbimEventEntry, 1); |
| 370 |
memcpy (&expected[0]->device_service_id, MBIM_UUID_ATDS, sizeof (MbimUuid)); |
| 371 |
expected[0]->cids_count = 4; |
| 372 |
expected[0]->cids = g_new0 (guint32, expected[0]->cids_count); |
| 373 |
expected[0]->cids[0] = MBIM_CID_ATDS_SIGNAL; |
| 374 |
expected[0]->cids[1] = MBIM_CID_ATDS_LOCATION; |
| 375 |
expected[0]->cids[2] = MBIM_CID_ATDS_OPERATORS; |
| 376 |
expected[0]->cids[3] = MBIM_CID_ATDS_RAT; |
| 377 |
expected[1] = g_new0 (MbimEventEntry, 1); |
| 378 |
memcpy (&expected[1]->device_service_id, MBIM_UUID_QMI, sizeof (MbimUuid)); |
| 379 |
expected[1]->cids_count = 1; |
| 380 |
expected[1]->cids = g_new0 (guint32, expected[1]->cids_count); |
| 381 |
expected[1]->cids[0] = MBIM_CID_QMI_MSG; |
| 382 |
expected[2] = g_new0 (MbimEventEntry, 1); |
| 383 |
memcpy (&expected[2]->device_service_id, MBIM_UUID_MS_HOST_SHUTDOWN, sizeof (MbimUuid)); |
| 384 |
expected[2]->cids_count = 1; |
| 385 |
expected[2]->cids = g_new0 (guint32, expected[2]->cids_count); |
| 386 |
expected[2]->cids[0] = MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY; |
| 387 |
|
| 388 |
/* Compare */ |
| 389 |
g_assert (_mbim_proxy_helper_service_subscribe_list_cmp ((const MbimEventEntry * const *)list, out_size, |
| 390 |
(const MbimEventEntry * const *)expected, expected_size)); |
| 391 |
|
| 392 |
mbim_event_entry_array_free (list); |
| 393 |
mbim_event_entry_array_free (addition); |
| 394 |
mbim_event_entry_array_free (expected); |
| 395 |
} |
| 396 |
|
| 397 |
/*****************************************************************************/ |
| 398 |
|
| 399 |
int main (int argc, char **argv) |
| 400 |
{ |
| 401 |
g_test_init (&argc, &argv, NULL); |
| 402 |
|
| 403 |
g_test_add_func ("/libmbim-glib/proxy/parse/single-service/0", test_parse_single_service_0_cids); |
| 404 |
g_test_add_func ("/libmbim-glib/proxy/parse/single-service/1", test_parse_single_service_1_cids); |
| 405 |
g_test_add_func ("/libmbim-glib/proxy/parse/single-service/5", test_parse_single_service_5_cids); |
| 406 |
g_test_add_func ("/libmbim-glib/proxy/merge/none", test_merge_none); |
| 407 |
g_test_add_func ("/libmbim-glib/proxy/merge/standard", test_merge_standard_services); |
| 408 |
g_test_add_func ("/libmbim-glib/proxy/merge/other", test_merge_other_services); |
| 409 |
g_test_add_func ("/libmbim-glib/proxy/merge/same-service", test_merge_list_same_service); |
| 410 |
g_test_add_func ("/libmbim-glib/proxy/merge/different-services", test_merge_list_different_services); |
| 411 |
g_test_add_func ("/libmbim-glib/proxy/merge/merged-services", test_merge_list_merged_services); |
| 412 |
|
| 413 |
return g_test_run (); |
| 414 |
} |