[ITC][capi-maps-service][Non-ACR][DPTTIZEN-2669,addition of NOT_FOUND error as a...
authormanu.tiwari <manu.tiwari@samsung.com>
Tue, 13 Dec 2016 07:27:36 +0000 (12:57 +0530)
committerManu Tiwari <manu.tiwari@samsung.com>
Tue, 13 Dec 2016 09:13:04 +0000 (01:13 -0800)
Change-Id: Ic716dde70cbec6b7afb808dd280f4d0b0707657a
Signed-off-by: manu.tiwari <manu.tiwari@samsung.com>
src/itc/capi-maps-service/ITs-capi-maps-place-review-here.c
src/itc/capi-maps-service/ITs-capi-maps-place-review-mapzen.c

index 98b7fc7de7e9824445fb9dc91fa2affe43b59398..a771b0c37bc23d06673594eff10f4d13325b5f31 100755 (executable)
@@ -79,25 +79,31 @@ void ITs_maps_place_review_cleanup(void)
 int ITc_maps_place_foreach_review_p(void)
 {
        START_TEST_PLACE;
-       
+
        int nRet;
        g_nCheckCb = 0;
        g_nClone = 0;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+       }
     nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));   
 
        return 0;
-}      
-          
+}  
 //& type: auto
 //& purpose:  scenario to clone and destroy the place review handle.
 /**
@@ -117,32 +123,37 @@ int ITc_maps_place_foreach_review_p(void)
 int ITc_maps_place_review_clone_destroy_p(void)
 {
        START_TEST_PLACE;
-       
+
        int nRet;
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
-       
-       nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
 
-       if(g_nCheckCb != true)
+       nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -164,39 +175,42 @@ int ITc_maps_place_review_clone_destroy_p(void)
 int ITc_maps_place_review_get_date_p(void)
 {
        START_TEST_PLACE;
-       
+
        char *date = NULL;
        int nRet;
-       
+
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_date(g_place_review, &date);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_date", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(date, "maps_place_review_get_date",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       free(date);
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+
+               nRet = maps_place_review_get_date(g_place_review, &date);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_date", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(date, "maps_place_review_get_date",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               free(date);
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -218,39 +232,44 @@ int ITc_maps_place_review_get_date_p(void)
 int ITc_maps_place_review_get_description_p(void)
 {
        START_TEST_PLACE;
-       
+
        char *description = NULL;
        int nRet;
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
-       
-       nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
 
-       if(g_nCheckCb != true)
+       nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_description(g_place_review, &description);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_description", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(description, "maps_place_review_get_description",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       free(description);
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+
+               nRet = maps_place_review_get_description(g_place_review, &description);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_description", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(description, "maps_place_review_get_description",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+
+               free(description);
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -272,38 +291,43 @@ int ITc_maps_place_review_get_description_p(void)
 int ITc_maps_place_review_get_language_p(void)
 {
        START_TEST_PLACE;
-       
+
        char *language = NULL;
        int nRet;
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_language(g_place_review, &language);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_language", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(language, "maps_place_review_get_language",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       free(language);
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+
+               nRet = maps_place_review_get_language(g_place_review, &language);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_language", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(language, "maps_place_review_get_language",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+
+               free(language);
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -325,40 +349,41 @@ int ITc_maps_place_review_get_language_p(void)
 int ITc_maps_place_review_get_media_p(void)
 {
        START_TEST_PLACE;
-       
+
        maps_place_media_h media = NULL;
        int nRet;
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_media(g_place_review, &media);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_media", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(media, "maps_place_review_get_media",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_media_destroy(media);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_media_destroy", MapServiceGetError(nRet));
-       
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+               nRet = maps_place_review_get_media(g_place_review, &media);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_media", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(media, "maps_place_review_get_media",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               nRet = maps_place_media_destroy(media);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_media_destroy", MapServiceGetError(nRet));
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -380,43 +405,46 @@ int ITc_maps_place_review_get_media_p(void)
 int ITc_maps_place_review_get_rating_p(void)
 {
        START_TEST_PLACE;
-               
+
        double rating = 0;
        int nRet;
        g_nCheckCb = 0;
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_rating(g_place_review, &rating);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_rating", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-
-       if(rating < 0)
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
        {
-               FPRINTF("[Line : %d][%s] maps_place_review_get_rating failed with invalid rating \\n", __LINE__, API_NAMESPACE);
-               maps_place_review_destroy(g_place_review);
-               maps_place_destroy(g_maps_place);
-               return 1;\r
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+               nRet = maps_place_review_get_rating(g_place_review, &rating);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_rating", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+
+               if(rating < 0)
+               {
+                       FPRINTF("[Line : %d][%s] maps_place_review_get_rating failed with invalid rating \\n", __LINE__, API_NAMESPACE);
+                       maps_place_review_destroy(g_place_review);
+                       maps_place_destroy(g_maps_place);
+                       return 1;\r
+               }
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
        }
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
-       
+
        return 0;
 }
 //& type: auto
@@ -445,28 +473,30 @@ int ITc_maps_place_review_get_title_p(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_title(g_place_review, &title);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_title", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-    CHECK_HANDLE_CLEANUP(title, "maps_place_review_get_title",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       free(title);
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
-       
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+               nRet = maps_place_review_get_title(g_place_review, &title);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_title", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(title, "maps_place_review_get_title",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               free(title);
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
        
@@ -499,28 +529,31 @@ int ITc_maps_place_review_get_user_link_p(void)
        g_nClone = 1;
        
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_foreach_review", MapServiceGetError(nRet),maps_place_destroy(g_maps_place));
-       
-       //RUN_POLLING_LOOP;
-
-       if(g_nCheckCb != true)
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
-               FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
-       CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_review_get_user_link(g_place_review, &user);
-       PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_user_link", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-    CHECK_HANDLE_CLEANUP(user, "maps_place_review_get_user_link",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
-       
-       nRet = maps_place_link_object_destroy(user);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_link_object_destroy", MapServiceGetError(nRet));
-       nRet = maps_place_review_destroy(g_place_review);
-       PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       //RUN_POLLING_LOOP;
+       if(nRet == MAPS_ERROR_NONE)
+       {
+               if(g_nCheckCb != true)
+               {
+                       FPRINTF("[Line : %d][%s] MapsPlaceReviewsCb not invoked \\n", __LINE__, API_NAMESPACE);
+                       maps_place_destroy(g_maps_place);
+                       return 1;
+               }
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, g_nCheckRet, "maps_place_review_clone", MapServiceGetError(g_nCheckRet),maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(g_place_review, "maps_place_review_clone",maps_place_destroy(g_maps_place));
+               nRet = maps_place_review_get_user_link(g_place_review, &user);
+               PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_place_review_get_user_link", MapServiceGetError(nRet),maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               CHECK_HANDLE_CLEANUP(user, "maps_place_review_get_user_link",maps_place_review_destroy(g_place_review);maps_place_destroy(g_maps_place));
+               nRet = maps_place_link_object_destroy(user);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_link_object_destroy", MapServiceGetError(nRet));
+               nRet = maps_place_review_destroy(g_place_review);
+               PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_place_review_destroy", MapServiceGetError(nRet));
+       }
        nRet = maps_place_destroy(g_maps_place);
        PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_place_destroy", MapServiceGetError(nRet));
        
index 3209c8dd120135726e29cfcc422f569dda63d88a..65487055769a28fdd96fa5146c87c1b6a3f0f736 100755 (executable)
@@ -84,13 +84,13 @@ int ITc_maps_place_foreach_review_p2(void)
        g_nCheckCb = 0;
        g_nClone = 0;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -131,13 +131,13 @@ int ITc_maps_place_review_clone_destroy_p2(void)
        g_nClone = 1;
        
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -182,14 +182,14 @@ int ITc_maps_place_review_get_date_p2(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -239,14 +239,14 @@ int ITc_maps_place_review_get_description_p2(void)
        g_nClone = 1;
        
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -296,14 +296,14 @@ int ITc_maps_place_review_get_language_p2(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -353,14 +353,14 @@ int ITc_maps_place_review_get_media_p2(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -412,14 +412,14 @@ int ITc_maps_place_review_get_rating_p2(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -472,14 +472,14 @@ int ITc_maps_place_review_get_title_p2(void)
        g_nCheckRet = 0;
        g_nClone = 1;
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {
@@ -529,14 +529,14 @@ int ITc_maps_place_review_get_user_link_p2(void)
        g_nClone = 1;
        
        nRet = maps_place_foreach_review(g_maps_place, MapsPlaceReviewsCb, NULL);
-       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED))
+       if((nRet != MAPS_ERROR_NONE)&&(nRet != MAPS_ERROR_NOT_SUPPORTED)&&(nRet != MAPS_ERROR_NOT_FOUND))
        {
                FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, "maps_place_foreach_review", MapServiceGetError(nRet), nRet);
                maps_place_destroy(g_maps_place);
                return 1;
        }
        //RUN_POLLING_LOOP;
-       if(nRet != MAPS_ERROR_NOT_SUPPORTED)
+       if(nRet == MAPS_ERROR_NONE)
        {
                if(g_nCheckCb != true)
                {