From: FrancisMurtagh Date: Mon, 28 Jan 2019 17:19:41 +0000 (+0000) Subject: IVGCVSW-2548 Add member function to check layer pointer not null X-Git-Tag: submit/tizen/20200316.035456~920 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd7544e4ea0dc9fdee80447688bf4b8d64cc2ec8;p=platform%2Fupstream%2Farmnn.git IVGCVSW-2548 Add member function to check layer pointer not null Change-Id: I48c8795e546e3a36414ae88316908519d5879628 --- diff --git a/src/armnn/test/TestLayerVisitor.cpp b/src/armnn/test/TestLayerVisitor.cpp index 24d3c0b..5cb7bdf 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 16227fb..1998fb9 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,