From: gichan Date: Wed, 1 Sep 2021 10:05:50 +0000 (+0900) Subject: [TEST] Add checking nnfw availability util X-Git-Tag: accepted/tizen/unified/20210915.100116^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9b85ba8fab8c207d1bd06449cbea1d1abd3b38f;p=platform%2Fcore%2Fapi%2Fmachine-learning.git [TEST] Add checking nnfw availability util Add checking nnfw availability util. Signed-off-by: gichan --- diff --git a/tests/capi/unittest_capi_inference.cc b/tests/capi/unittest_capi_inference.cc index 455e4b9..909be15 100644 --- a/tests/capi/unittest_capi_inference.cc +++ b/tests/capi/unittest_capi_inference.cc @@ -1884,6 +1884,30 @@ TEST (nnstreamer_capi_util, plugin_availability_fail_invalid_02_n) } /** + * @brief Test NNStreamer Utility for checking nnfw availability with custom option + */ +TEST (nnstreamer_capi_util, nnfw_availability_full_01) +{ + int status; + bool result; + + status = ml_check_nnfw_availability_full (ML_NNFW_TYPE_TENSORFLOW_LITE, ML_NNFW_HW_ANY, NULL, &result); + EXPECT_EQ (status, ML_ERROR_NONE); + EXPECT_EQ (result, is_enabled_tensorflow_lite); +} + +/** + * @brief Test NNStreamer Utility for checking nnfw availability with custom option (invalid param) + */ +TEST (nnstreamer_capi_util, nnfw_availability_full_02_n) +{ + int status; + + status = ml_check_nnfw_availability_full (ML_NNFW_TYPE_TENSORFLOW_LITE, ML_NNFW_HW_ANY, NULL, NULL); + EXPECT_NE (status, ML_ERROR_NONE); +} + +/** * @brief Test NNStreamer Utility for checking nnfw availability (invalid param) */ TEST (nnstreamer_capi_util, nnfw_availability_fail_invalid_01_n)