[TEST] Set `is-updatable` prop of single test
authorgichan <gichan2.jang@samsung.com>
Thu, 27 Apr 2023 05:51:43 +0000 (14:51 +0900)
committerwooksong <wook16.song@samsung.com>
Thu, 27 Apr 2023 06:18:40 +0000 (15:18 +0900)
Set `is-updatable` prop of single test
 *line coverage: 80.1%

Signed-off-by: gichan <gichan2.jang@samsung.com>
tests/capi/unittest_capi_inference_single.cc

index 55dec81..a328299 100644 (file)
@@ -1871,6 +1871,25 @@ TEST (nnstreamer_capi_singleshot, property_01_p)
   EXPECT_STREQ (prop_value, "false");
   g_free (prop_value);
 
+  /* set updatable */
+  status = ml_single_set_property (single, "is-updatable", "true");
+  EXPECT_EQ (status, ML_ERROR_NONE);
+
+  status = ml_single_get_property (single, "is-updatable", &prop_value);
+  EXPECT_EQ (status, ML_ERROR_NONE);
+
+  EXPECT_STREQ (prop_value, "true");
+  g_free (prop_value);
+
+  status = ml_single_set_property (single, "is-updatable", "false");
+  EXPECT_EQ (status, ML_ERROR_NONE);
+
+  status = ml_single_get_property (single, "is-updatable", &prop_value);
+  EXPECT_EQ (status, ML_ERROR_NONE);
+
+  EXPECT_STREQ (prop_value, "false");
+  g_free (prop_value);
+
   /* get input info */
   status = ml_single_get_input_info (single, &in_info);
   EXPECT_EQ (status, ML_ERROR_NONE);