[UTC/ITC][nnstreamer][Non-ACR] Change string propery test 52/254452/1
authorGichan Jang <gichan2.jang@samsung.com>
Wed, 3 Mar 2021 06:53:27 +0000 (15:53 +0900)
committerGichan Jang <gichan2.jang@samsung.com>
Wed, 3 Mar 2021 06:53:27 +0000 (15:53 +0900)
Current setting and getting string property test try to select tensors that does not exist.
Changed to select the first tensor.

Change-Id: I9cb916f952ad5060df350bcaf0bb939a404cb831
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
src/itc/nnstreamer/ITs-nnstreamer-capi.c
src/utc/nnstreamer/utc-nnstreamer-capi.c

index 7070cbb0e58457c5bdf2f27413433fe49a60f813..a7a3978cb9894f34f47cd4c26f744084f880a5ef 100755 (executable)
@@ -291,7 +291,7 @@ int ITc_nnstreamer_ml_pipeline_element_set_get_property_string_p(void)
        ml_pipeline_element_h hMlDemux  = NULL;
        const char *pszElementName = "demux";
        const char *pszPropertyName = "tensorpick";
-       const char *pszSetProperty = "1,2";
+       const char *pszSetProperty = "0";
        char *pszGetProperty = NULL;
 
        nRet = ml_pipeline_construct (pszPipeLine, NULL, NULL, &hMlPipeline);
index 8a683fff309e6452bdab62e88500001c4246f6ae..80f06f2177ee293c252217944dfac28f49bf09d1 100644 (file)
@@ -564,7 +564,7 @@ int utc_nnstreamer_capi_element_set_string_property_p (void)
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
   assert_eq (status, ML_ERROR_NONE);
 
   status = ml_pipeline_element_release_handle (demux_h);
@@ -589,7 +589,7 @@ int utc_nnstreamer_capi_element_set_string_property_n1 (void)
   int status;
 
   /* Test Code */
-  status = ml_pipeline_element_set_property_string (NULL, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (NULL, "tensorpick", "0");
   assert_neq (status, ML_ERROR_NONE);
 
   return 0;
@@ -618,7 +618,7 @@ int utc_nnstreamer_capi_element_set_string_property_n2 (void)
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */
-  status = ml_pipeline_element_set_property_string (demux_h, "WRONG_NAME", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "WRONG_NAME", "0");
   assert_neq (status, ML_ERROR_NONE);
 
   status = ml_pipeline_element_release_handle (demux_h);
@@ -655,21 +655,13 @@ int utc_nnstreamer_capi_element_get_string_property_p (void)
   status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
   assert_eq (status, ML_ERROR_NONE);
 
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */
   status = ml_pipeline_element_get_property_string (demux_h, "tensorpick", &ret_tensorpick);
   assert_eq (status, ML_ERROR_NONE);
-  assert_eq (g_str_equal (ret_tensorpick, "1,2"), TRUE);
-  g_free (ret_tensorpick);
-
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1");
-  assert_eq (status, ML_ERROR_NONE);
-
-  status = ml_pipeline_element_get_property_string (demux_h, "tensorpick", &ret_tensorpick);
-  assert_eq (status, ML_ERROR_NONE);
-  assert_eq (g_str_equal (ret_tensorpick, "1"), TRUE);
+  assert_eq (g_str_equal (ret_tensorpick, "0"), TRUE);
   g_free (ret_tensorpick);
 
   status = ml_pipeline_element_release_handle (demux_h);
@@ -724,7 +716,7 @@ int utc_nnstreamer_capi_element_get_string_property_n2 (void)
   status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
   assert_eq (status, ML_ERROR_NONE);
 
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */
@@ -753,7 +745,6 @@ int utc_nnstreamer_capi_element_get_string_property_n3 (void)
   ml_pipeline_h handle = NULL;
   ml_pipeline_element_h demux_h = NULL;
   gchar *pipeline;
-  gchar *ret_tensorpick;
   int status;
 
   pipeline = g_strdup("videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! videorate max-rate=1 ! " \
@@ -765,7 +756,7 @@ int utc_nnstreamer_capi_element_get_string_property_n3 (void)
   status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
   assert_eq (status, ML_ERROR_NONE);
 
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */
@@ -794,7 +785,6 @@ int utc_nnstreamer_capi_element_get_string_property_n4 (void)
   ml_pipeline_h handle = NULL;
   ml_pipeline_element_h demux_h = NULL;
   gchar *pipeline;
-  gchar *ret_tensorpick;
   int ret_wrong_type;
   int status;
 
@@ -807,7 +797,7 @@ int utc_nnstreamer_capi_element_get_string_property_n4 (void)
   status = ml_pipeline_element_get_handle (handle, "demux", &demux_h);
   assert_eq (status, ML_ERROR_NONE);
 
-  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "1,2");
+  status = ml_pipeline_element_set_property_string (demux_h, "tensorpick", "0");
   assert_eq (status, ML_ERROR_NONE);
 
   /* Test Code */