diff options
| author | Thomas Haller <thaller@redhat.com> | 2017-09-05 10:31:56 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2017-09-08 11:05:05 +0200 |
| commit | ead1ffd9bc5571c76210cd457db131984569cc46 (patch) | |
| tree | d2d872a8ee60d2b28f3860c35ea021f094ad6042 /src/tests | |
| parent | e805201f4b75434641b400c59a1a0f30a9422ca9 (diff) | |
| download | NetworkManager-ead1ffd9bc5571c76210cd457db131984569cc46.tar.gz | |
core/trivial: rename test functions _nmtst_nm_ip*_config_*() to _nmtst_ip*_config_*()
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test-ip4-config.c | 24 | ||||
| -rw-r--r-- | src/tests/test-ip6-config.c | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/src/tests/test-ip4-config.c b/src/tests/test-ip4-config.c index d47ff2e643..f5620d95c7 100644 --- a/src/tests/test-ip4-config.c +++ b/src/tests/test-ip4-config.c @@ -112,7 +112,7 @@ test_subtract (void) /* ensure what's left is what we expect */ g_assert_cmpuint (nm_ip4_config_get_num_addresses (dst), ==, 1); - test_addr = _nmtst_nm_ip4_config_get_address (dst, 0); + test_addr = _nmtst_ip4_config_get_address (dst, 0); g_assert (test_addr != NULL); g_assert_cmpuint (test_addr->address, ==, nmtst_inet4_from_string (expected_addr)); g_assert_cmpuint (test_addr->peer_address, ==, test_addr->address); @@ -121,7 +121,7 @@ test_subtract (void) g_assert_cmpuint (nm_ip4_config_get_gateway (dst), ==, 0); g_assert_cmpuint (nm_ip4_config_get_num_routes (dst), ==, 1); - test_route = _nmtst_nm_ip4_config_get_route (dst, 0); + test_route = _nmtst_ip4_config_get_route (dst, 0); g_assert (test_route != NULL); g_assert_cmpuint (test_route->network, ==, nmtst_inet4_from_string (expected_route_dest)); g_assert_cmpuint (test_route->plen, ==, expected_route_plen); @@ -196,27 +196,27 @@ test_add_address_with_source (void) addr.addr_source = NM_IP_CONFIG_SOURCE_USER; nm_ip4_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip4_config_get_address (a, 0); + test_addr = _nmtst_ip4_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); addr.addr_source = NM_IP_CONFIG_SOURCE_VPN; nm_ip4_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip4_config_get_address (a, 0); + test_addr = _nmtst_ip4_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); /* Test that a lower priority address source is overwritten */ - _nmtst_nm_ip4_config_del_address (a, 0); + _nmtst_ip4_config_del_address (a, 0); addr.addr_source = NM_IP_CONFIG_SOURCE_KERNEL; nm_ip4_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip4_config_get_address (a, 0); + test_addr = _nmtst_ip4_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_KERNEL); addr.addr_source = NM_IP_CONFIG_SOURCE_USER; nm_ip4_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip4_config_get_address (a, 0); + test_addr = _nmtst_ip4_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); g_object_unref (a); @@ -236,27 +236,27 @@ test_add_route_with_source (void) route.rt_source = NM_IP_CONFIG_SOURCE_USER; nm_ip4_config_add_route (a, &route); - test_route = _nmtst_nm_ip4_config_get_route (a, 0); + test_route = _nmtst_ip4_config_get_route (a, 0); g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER); route.rt_source = NM_IP_CONFIG_SOURCE_VPN; nm_ip4_config_add_route (a, &route); - test_route = _nmtst_nm_ip4_config_get_route (a, 0); + test_route = _nmtst_ip4_config_get_route (a, 0); g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER); /* Test that a lower priority address source is overwritten */ - _nmtst_nm_ip4_config_del_route (a, 0); + _nmtst_ip4_config_del_route (a, 0); route.rt_source = NM_IP_CONFIG_SOURCE_KERNEL; nm_ip4_config_add_route (a, &route); - test_route = _nmtst_nm_ip4_config_get_route (a, 0); + test_route = _nmtst_ip4_config_get_route (a, 0); g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_KERNEL); route.rt_source = NM_IP_CONFIG_SOURCE_USER; nm_ip4_config_add_route (a, &route); - test_route = _nmtst_nm_ip4_config_get_route (a, 0); + test_route = _nmtst_ip4_config_get_route (a, 0); g_assert_cmpint (test_route->rt_source, ==, NM_IP_CONFIG_SOURCE_USER); g_object_unref (a); diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c index 9eb4d35fd4..32eaeb6f8b 100644 --- a/src/tests/test-ip6-config.c +++ b/src/tests/test-ip6-config.c @@ -88,7 +88,7 @@ test_subtract (void) /* ensure what's left is what we expect */ g_assert_cmpuint (nm_ip6_config_get_num_addresses (dst), ==, 1); - test_addr = _nmtst_nm_ip6_config_get_address (dst, 0); + test_addr = _nmtst_ip6_config_get_address (dst, 0); g_assert (test_addr != NULL); tmp = *nmtst_inet6_from_string (expected_addr); g_assert (memcmp (&test_addr->address, &tmp, sizeof (tmp)) == 0); @@ -167,27 +167,27 @@ test_add_address_with_source (void) addr.addr_source = NM_IP_CONFIG_SOURCE_USER; nm_ip6_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip6_config_get_address (a, 0); + test_addr = _nmtst_ip6_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); addr.addr_source = NM_IP_CONFIG_SOURCE_VPN; nm_ip6_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip6_config_get_address (a, 0); + test_addr = _nmtst_ip6_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); /* Test that a lower priority address source is overwritten */ - _nmtst_nm_ip6_config_del_address (a, 0); + _nmtst_ip6_config_del_address (a, 0); addr.addr_source = NM_IP_CONFIG_SOURCE_KERNEL; nm_ip6_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip6_config_get_address (a, 0); + test_addr = _nmtst_ip6_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_KERNEL); addr.addr_source = NM_IP_CONFIG_SOURCE_USER; nm_ip6_config_add_address (a, &addr); - test_addr = _nmtst_nm_ip6_config_get_address (a, 0); + test_addr = _nmtst_ip6_config_get_address (a, 0); g_assert_cmpint (test_addr->addr_source, ==, NM_IP_CONFIG_SOURCE_USER); g_object_unref (a); @@ -256,18 +256,18 @@ test_nm_ip6_config_addresses_sort_check (NMIP6Config *config, NMSettingIP6Config int j = g_rand_int_range (nmtst_get_rand (), i, addr_count); NMTST_SWAP (idx[i], idx[j]); - nm_ip6_config_add_address (copy, _nmtst_nm_ip6_config_get_address (config, idx[i])); + nm_ip6_config_add_address (copy, _nmtst_ip6_config_get_address (config, idx[i])); } /* reorder them again */ - _nmtst_nm_ip6_config_addresses_sort (copy); + _nmtst_ip6_config_addresses_sort (copy); /* check equality using nm_ip6_config_equal() */ if (!nm_ip6_config_equal (copy, config)) { g_message ("%s", "SORTING yields unexpected output:"); for (i = 0; i < addr_count; i++) { - g_message (" >> [%d] = %s", i, nm_platform_ip6_address_to_string (_nmtst_nm_ip6_config_get_address (config, i), NULL, 0)); - g_message (" << [%d] = %s", i, nm_platform_ip6_address_to_string (_nmtst_nm_ip6_config_get_address (copy, i), NULL, 0)); + g_message (" >> [%d] = %s", i, nm_platform_ip6_address_to_string (_nmtst_ip6_config_get_address (config, i), NULL, 0)); + g_message (" << [%d] = %s", i, nm_platform_ip6_address_to_string (_nmtst_ip6_config_get_address (copy, i), NULL, 0)); } g_assert_not_reached (); } @@ -398,8 +398,8 @@ test_replace (gconstpointer user_data) nm_ip6_config_replace (dst_conf, src_conf, NULL); for (i = 0; i < addrs_n; i++) { - const NMPlatformIP6Address *a = _nmtst_nm_ip6_config_get_address (dst_conf, i); - const NMPlatformIP6Address *b = _nmtst_nm_ip6_config_get_address (src_conf, i); + const NMPlatformIP6Address *a = _nmtst_ip6_config_get_address (dst_conf, i); + const NMPlatformIP6Address *b = _nmtst_ip6_config_get_address (src_conf, i); g_assert (nm_platform_ip6_address_cmp (&addrs[i], a) == 0); g_assert (nm_platform_ip6_address_cmp (&addrs[i], b) == 0); |
