Added comment in test file 89/162789/4
authortaesub kim <taesub.kim@samsung.com>
Tue, 5 Dec 2017 09:11:07 +0000 (18:11 +0900)
committertaesub kim <taesub.kim@samsung.com>
Wed, 6 Dec 2017 00:00:54 +0000 (09:00 +0900)
Change-Id: I7326e5952ebd82d0f2e26ac065b1e2f5be870e24
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
test/connection_test.c

index b931a52..753cab1 100755 (executable)
@@ -879,8 +879,18 @@ static void test_print_network_info(connection_profile_h profile, connection_add
 
        if (connection_profile_get_ip_config_type(profile, address_family, &ip_type) != CONNECTION_ERROR_NONE)
                printf("Fail to get ipconfig type!\n");
-       else
-               printf("Ipconfig type : %d\n", ip_type);
+       else {
+               if (ip_type == CONNECTION_IP_CONFIG_TYPE_STATIC)
+                       printf("ip type : %s\n", "CONNECTION_IP_CONFIG_TYPE_STATIC");
+               else if (ip_type == CONNECTION_IP_CONFIG_TYPE_DYNAMIC)
+                       printf("ip type : %s\n", "CONNECTION_IP_CONFIG_TYPE_DYNAMIC");
+               else if (ip_type == CONNECTION_IP_CONFIG_TYPE_AUTO)
+                       printf("ip type : %s\n", "CONNECTION_IP_CONFIG_TYPE_AUTO");
+               else if (ip_type == CONNECTION_IP_CONFIG_TYPE_FIXED)
+                       printf("ip type : %s\n", "CONNECTION_IP_CONFIG_TYPE_FIXED");
+               else
+                       printf("ip type : %s\n", "CONNECTION_IP_CONFIG_TYPE_NONE");
+       }
 
        if (connection_profile_get_ip_address(profile, address_family, &ip) != CONNECTION_ERROR_NONE)
                printf("Fail to get IP address!\n");
@@ -923,8 +933,14 @@ static void test_print_network_info(connection_profile_h profile, connection_add
 
        if (connection_profile_get_dns_config_type(profile, address_family, &dns_type) != CONNECTION_ERROR_NONE)
                printf("Fail to get DNS configuration type!\n");
-       else
-               printf("DNS configuration type : %d\n", dns_type);
+       else {
+               if (dns_type == CONNECTION_DNS_CONFIG_TYPE_STATIC)
+                       printf("DNS config type : %s\n", "CONNECTION_DNS_CONFIG_TYPE_STATIC");
+               else if (dns_type == CONNECTION_DNS_CONFIG_TYPE_DYNAMIC)
+                       printf("DNS config type : %s\n", "CONNECTION_DNS_CONFIG_TYPE_DYNAMIC");
+               else
+                       printf("DNS config type : %s\n", "CONNECTION_DNS_CONFIG_TYPE_NONE");
+       }
 
        if (connection_profile_get_dns_address(profile, 1, address_family, &dns1) != CONNECTION_ERROR_NONE)
                printf("Fail to get DNS1!\n");
@@ -942,8 +958,14 @@ static void test_print_network_info(connection_profile_h profile, connection_add
 
        if (connection_profile_get_proxy_type(profile, &proxy_type) != CONNECTION_ERROR_NONE)
                printf("Fail to get proxy type!\n");
-       else
-               printf("Proxy type : %d\n", proxy_type);
+       else {
+               if (proxy_type == CONNECTION_PROXY_TYPE_DIRECT)
+                       printf("proxy type : %s\n", "CONNECTION_PROXY_TYPE_DIRECT");
+               else if (proxy_type == CONNECTION_PROXY_TYPE_AUTO)
+                       printf("proxy type : %s\n", "CONNECTION_PROXY_TYPE_AUTO");
+               else
+                       printf("proxy type : %s\n", "CONNECTION_PROXY_TYPE_MANUAL");
+       }
 
        if (connection_profile_get_proxy_address(profile, address_family, &proxy) != CONNECTION_ERROR_NONE)
                printf("Fail to get proxy!\n");