aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/armnn/test/TestLayerVisitor.cpp5
-rw-r--r--src/armnn/test/TestLayerVisitor.hpp10
2 files changed, 14 insertions, 1 deletions
diff --git a/src/armnn/test/TestLayerVisitor.cpp b/src/armnn/test/TestLayerVisitor.cpp
index 24d3c0b181..5cb7bdfca5 100644
--- a/src/armnn/test/TestLayerVisitor.cpp
+++ b/src/armnn/test/TestLayerVisitor.cpp
@@ -25,4 +25,9 @@ void TestLayerVisitor::CheckLayerName(const char* name)
}
};
+void TestLayerVisitor::CheckLayerPointer(const IConnectableLayer* layer)
+{
+ BOOST_CHECK(layer != nullptr);
+};
+
} //namespace armnn \ No newline at end of file
diff --git a/src/armnn/test/TestLayerVisitor.hpp b/src/armnn/test/TestLayerVisitor.hpp
index 16227fb7f5..1998fb9b3b 100644
--- a/src/armnn/test/TestLayerVisitor.hpp
+++ b/src/armnn/test/TestLayerVisitor.hpp
@@ -16,11 +16,19 @@ protected:
void CheckLayerName(const char* name);
+ void CheckLayerPointer(const IConnectableLayer* layer);
+
private:
const char* m_LayerName;
public:
- explicit TestLayerVisitor(const char* name) : m_LayerName(name) {};
+ explicit TestLayerVisitor(const char* name) : m_LayerName(name)
+ {
+ if (name == nullptr)
+ {
+ m_LayerName = "";
+ }
+ };
virtual void VisitInputLayer(const IConnectableLayer* layer,
LayerBindingId id,