typedef std::tuple<std::string, int, std::vector<std::string>> ParamType_Three;
typedef std::tuple<std::string, int, int, int, int, std::vector<std::string>> ParamType_Six;
typedef std::tuple<std::string, int, int, int, int, std::vector<std::string>, int, int, int, std::vector<std::string>, std::vector<std::string>, std::vector<std::string>, std::vector<int>> ParamType_Many;
+typedef std::tuple<int> ParamType_One_Int;
class InferenceEngineTestCase_G1 : public testing::TestWithParam<ParamType_One> { };
class InferenceEngineTestCase_G2 : public testing::TestWithParam<ParamType_Two> { };
class InferenceEngineTestCase_G4 : public testing::TestWithParam<ParamType_Six> { };
class InferenceEngineTestCase_G5 : public testing::TestWithParam<ParamType_Six> { };
class InferenceEngineTestCase_G6 : public testing::TestWithParam<ParamType_Many> { };
+class InferenceEngineTestCase_G7 : public testing::TestWithParam<ParamType_One_Int> { };
+class InferenceEngineTestCase_G8 : public testing::TestWithParam<ParamType_One_Int> { };
static auto InferenceEngineInit_One_Param = [](InferenceEngineCommon *engine, std::string &backend_name) -> int {
inference_engine_config config = { backend_name, 0 };
models.clear();
}
+TEST_P(InferenceEngineTestCase_G7, Bind_P)
+{
+ int backend_type;
+
+ std::tie(backend_type) = GetParam();
+
+ auto engine = std::make_unique<InferenceEngineCommon>();
+ ASSERT_TRUE(engine);
+
+ int ret = engine->BindBackend(backend_type);
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
+
+ engine->UnbindBackend();
+}
+
+TEST_P(InferenceEngineTestCase_G8, Bind_N)
+{
+ int backend_type;
+
+ std::tie(backend_type) = GetParam();
+
+ auto engine = std::make_unique<InferenceEngineCommon>();
+ ASSERT_TRUE(engine);
+
+ int ret = engine->BindBackend(backend_type);
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_INVALID_PARAMETER);
+}
+
INSTANTIATE_TEST_CASE_P(Prefix, InferenceEngineTestCase_G1,
testing::Values(
// parameter order : backend name
ParamType_Many("tflite", INFERENCE_TARGET_CPU, TEST_IMAGE_CLASSIFICATION, 10, INFERENCE_TENSOR_DATA_TYPE_FLOAT32, { "/opt/usr/images/image_classification.bin" }, 224, 224, 3, { "input_2" }, { "dense_3/Softmax" }, { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" }, { 3 })
/* TODO */
)
+);
+
+INSTANTIATE_TEST_CASE_P(Prefix, InferenceEngineTestCase_G7,
+ testing::Values(
+ // parameter order : backend type
+ // ARMNN.
+ ParamType_One_Int(INFERENCE_BACKEND_ARMNN),
+ // TFLITE.
+ ParamType_One_Int(INFERENCE_BACKEND_TFLITE)
+ /* TODO */
+ )
+);
+
+INSTANTIATE_TEST_CASE_P(Prefix, InferenceEngineTestCase_G8,
+ testing::Values(
+ // parameter order : backend type
+ // Wrong backend type.
+ ParamType_One_Int(-1)
+ /* TODO */
+ )
);
\ No newline at end of file