diff options
| author | Michael Biebl <biebl@debian.org> | 2025-02-12 13:46:50 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2025-02-12 13:46:50 +0100 |
| commit | 8bdf070ff046f482f6eb5e2b15ebc216f5d1e3da (patch) | |
| tree | f706478d189d54c6532e8863d4b0d5ff5575af60 /src/libnm-glib-aux/tests | |
| parent | 818258cf34b83fbc754633295e1052d4752d7b15 (diff) | |
New upstream version 1.51.90 upstream/1.51.90
Diffstat (limited to 'src/libnm-glib-aux/tests')
| -rw-r--r-- | src/libnm-glib-aux/tests/test-json-aux.c | 8 | ||||
| -rw-r--r-- | src/libnm-glib-aux/tests/test-shared-general.c | 27 |
2 files changed, 16 insertions, 19 deletions
diff --git a/src/libnm-glib-aux/tests/test-json-aux.c b/src/libnm-glib-aux/tests/test-json-aux.c index 32462a29..b0ca1e6d 100644 --- a/src/libnm-glib-aux/tests/test-json-aux.c +++ b/src/libnm-glib-aux/tests/test-json-aux.c @@ -88,16 +88,16 @@ test_jansson(void) CHECK_FCN(vt, json_array_get, nm_json_t * (*_f_nm)(const nm_json_t *, gsize), - json_t * (*_f_js)(const json_t *, size_t)); + json_t * (*_f_js)(const json_t *, size_t) ); CHECK_FCN(vt, json_array_size, gsize(*_f_nm)(const nm_json_t *), - size_t(*_f_js)(const json_t *)); + size_t (*_f_js)(const json_t *)); CHECK_FCN(vt, json_delete, void (*_f_nm)(nm_json_t *), void (*_f_js)(json_t *)); CHECK_FCN(vt, json_dumps, char *(*_f_nm)(const nm_json_t *, gsize), - char *(*_f_js)(const json_t *, size_t)); + char *(*_f_js)(const json_t *, size_t) ); CHECK_FCN(vt, json_false, nm_json_t * (*_f_nm)(void), json_t * (*_f_js)(void) ); CHECK_FCN(vt, json_integer, nm_json_t * (*_f_nm)(nm_json_int_t), json_t * (*_f_js)(json_int_t)); CHECK_FCN(vt, @@ -138,7 +138,7 @@ test_jansson(void) CHECK_FCN(vt, json_object_size, gsize(*_f_nm)(const nm_json_t *), - size_t(*_f_js)(const json_t *)); + size_t (*_f_js)(const json_t *)); CHECK_FCN(vt, json_string, nm_json_t * (*_f_nm)(const char *), diff --git a/src/libnm-glib-aux/tests/test-shared-general.c b/src/libnm-glib-aux/tests/test-shared-general.c index b19ac1ce..2f09a549 100644 --- a/src/libnm-glib-aux/tests/test-shared-general.c +++ b/src/libnm-glib-aux/tests/test-shared-general.c @@ -197,10 +197,7 @@ test_nm_random(void) if (begin >= end) continue; - if (begin == 0 && nmtst_get_rand_bool()) - x = nm_random_u64_range(end); - else - x = nm_random_u64_range_full(begin, end, nmtst_get_rand_bool()); + x = nm_random_u64_range(begin, end); g_assert_cmpuint(x, >=, begin); g_assert_cmpuint(x, <, end); @@ -1622,17 +1619,17 @@ test_parse_env_file(void) gs_free char *arg2 = NULL; int r; -#define env_file_1 \ - "a=a\n" \ - "a=b\n" \ - "a=b\n" \ - "a=a\n" \ - "b=b\\\n" \ - "c\n" \ - "d= d\\\n" \ - "e \\\n" \ - "f \n" \ - "g=g\\ \n" \ +#define env_file_1 \ + "a=a\n" \ + "a=b\n" \ + "a=b\n" \ + "a=a\n" \ + "b=b\\\n" \ + "c\n" \ + "d= d\\\n" \ + "e \\\n" \ + "f \n" \ + "g=g\\ \n" \ "h= ąęół\\ śćńźżµ \n" \ "i=i\\" r = nm_parse_env_file_full(env_file_1, _env_file_push_cb, &data); |