diff options
author | FrancisMurtagh <francis.murtagh@arm.com> | 2019-01-28 17:19:41 +0000 |
---|---|---|
committer | FrancisMurtagh <francis.murtagh@arm.com> | 2019-01-28 17:19:41 +0000 |
commit | cd7544e4ea0dc9fdee80447688bf4b8d64cc2ec8 (patch) | |
tree | 61a5c157b640fbf14bc362b44bdf6c2b71362da6 /src/armnn | |
parent | a8a840b37f2206fe0dbd04f607980132f16ab923 (diff) | |
download | armnn-cd7544e4ea0dc9fdee80447688bf4b8d64cc2ec8.tar.gz |
IVGCVSW-2548 Add member function to check layer pointer not null
Change-Id: I48c8795e546e3a36414ae88316908519d5879628
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/test/TestLayerVisitor.cpp | 5 | ||||
-rw-r--r-- | src/armnn/test/TestLayerVisitor.hpp | 10 |
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, |