From: Gichan Jang Date: Wed, 3 Mar 2021 06:53:27 +0000 (+0900) Subject: [UTC/ITC][nnstreamer][Non-ACR] Change string propery test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b836499ef6ea0d1f66162ea2cfd2ac2a51a7de21;p=test%2Ftct%2Fnative%2Fapi.git [UTC/ITC][nnstreamer][Non-ACR] Change string propery test 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 --- diff --git a/src/itc/nnstreamer/ITs-nnstreamer-capi.c b/src/itc/nnstreamer/ITs-nnstreamer-capi.c index 7070cbb0e..a7a3978cb 100755 --- a/src/itc/nnstreamer/ITs-nnstreamer-capi.c +++ b/src/itc/nnstreamer/ITs-nnstreamer-capi.c @@ -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); diff --git a/src/utc/nnstreamer/utc-nnstreamer-capi.c b/src/utc/nnstreamer/utc-nnstreamer-capi.c index 8a683fff3..80f06f217 100644 --- a/src/utc/nnstreamer/utc-nnstreamer-capi.c +++ b/src/utc/nnstreamer/utc-nnstreamer-capi.c @@ -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 */