aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/TensorHandleStrategyTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/test/TensorHandleStrategyTest.cpp')
-rw-r--r--src/armnn/test/TensorHandleStrategyTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/armnn/test/TensorHandleStrategyTest.cpp b/src/armnn/test/TensorHandleStrategyTest.cpp
index fb26880d0c..374479b941 100644
--- a/src/armnn/test/TensorHandleStrategyTest.cpp
+++ b/src/armnn/test/TensorHandleStrategyTest.cpp
@@ -392,4 +392,18 @@ TEST_CASE("TensorHandleSelectionStrategy")
CHECK(importCount == 1);
}
+TEST_CASE("RegisterCopyAndImportFactoryPairTest")
+{
+ TensorHandleFactoryRegistry registry;
+ ITensorHandleFactory::FactoryId copyId = "CopyFactoryId";
+ ITensorHandleFactory::FactoryId importId = "ImportFactoryId";
+ registry.RegisterCopyAndImportFactoryPair(copyId, importId);
+
+ // Get mathing import factory id correctly
+ CHECK((registry.GetMatchingImportFactoryId(copyId) == importId));
+
+ // Return empty id when Invailid Id is given
+ CHECK((registry.GetMatchingImportFactoryId("InvalidFactoryId") == ""));
+}
+
}