diff options
Diffstat (limited to 'src/armnn/test/TestLayerVisitor.cpp')
-rw-r--r-- | src/armnn/test/TestLayerVisitor.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/armnn/test/TestLayerVisitor.cpp b/src/armnn/test/TestLayerVisitor.cpp index ba30dbc666..ec405119d1 100644 --- a/src/armnn/test/TestLayerVisitor.cpp +++ b/src/armnn/test/TestLayerVisitor.cpp @@ -3,9 +3,10 @@ // SPDX-License-Identifier: MIT // -#include <boost/test/unit_test.hpp> #include "TestLayerVisitor.hpp" +#include <doctest/doctest.h> + namespace armnn { @@ -13,29 +14,29 @@ void TestLayerVisitor::CheckLayerName(const char* name) { if (name == nullptr) { - BOOST_CHECK(m_LayerName == nullptr); + CHECK(m_LayerName == nullptr); } else if (m_LayerName == nullptr) { - BOOST_CHECK(name == nullptr); + CHECK(name == nullptr); } else { - BOOST_CHECK_EQUAL(m_LayerName, name); + CHECK_EQ(std::string(m_LayerName), std::string(name)); } } void TestLayerVisitor::CheckLayerPointer(const IConnectableLayer* layer) { - BOOST_CHECK(layer != nullptr); + CHECK(layer != nullptr); } void TestLayerVisitor::CheckConstTensors(const ConstTensor& expected, const ConstTensor& actual) { - BOOST_CHECK(expected.GetInfo() == actual.GetInfo()); - BOOST_CHECK(expected.GetNumDimensions() == actual.GetNumDimensions()); - BOOST_CHECK(expected.GetNumElements() == actual.GetNumElements()); - BOOST_CHECK(expected.GetNumBytes() == actual.GetNumBytes()); + CHECK(expected.GetInfo() == actual.GetInfo()); + CHECK(expected.GetNumDimensions() == actual.GetNumDimensions()); + CHECK(expected.GetNumElements() == actual.GetNumElements()); + CHECK(expected.GetNumBytes() == actual.GetNumBytes()); if (expected.GetNumBytes() == actual.GetNumBytes()) { //check data is the same byte by byte @@ -43,7 +44,7 @@ void TestLayerVisitor::CheckConstTensors(const ConstTensor& expected, const Cons const unsigned char* actualPtr = static_cast<const unsigned char*>(actual.GetMemoryArea()); for (unsigned int i = 0; i < expected.GetNumBytes(); i++) { - BOOST_CHECK(*(expectedPtr + i) == *(actualPtr + i)); + CHECK(*(expectedPtr + i) == *(actualPtr + i)); } } } @@ -51,7 +52,7 @@ void TestLayerVisitor::CheckConstTensors(const ConstTensor& expected, const Cons void TestLayerVisitor::CheckOptionalConstTensors(const Optional<ConstTensor>& expected, const Optional<ConstTensor>& actual) { - BOOST_CHECK(expected.has_value() == actual.has_value()); + CHECK(expected.has_value() == actual.has_value()); if (expected.has_value() && actual.has_value()) { CheckConstTensors(expected.value(), actual.value()); |