diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-10 18:24:34 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-11 10:33:16 +0000 |
commit | 1625efc870f1a8b7c6e6382277ddbb245f91a294 (patch) | |
tree | 39fbbaa15ed7eb81337b082c2d20b0af68b91c02 /src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp | |
parent | 958e0ba61e940a8d11955cf2a10f681c7c47e1fa (diff) | |
download | armnn-1625efc870f1a8b7c6e6382277ddbb245f91a294.tar.gz |
IVGCVSW-5963 'Move unit tests to new framework'
* Used doctest in ArmNN unit tests
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a
Diffstat (limited to 'src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp')
-rw-r--r-- | src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp index 4240bb1061..5a05ee1d85 100644 --- a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp +++ b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp @@ -12,6 +12,8 @@ #include <armnn/utility/IgnoreUnused.hpp> +#include <doctest/doctest.h> + namespace { armnn::Graph dummyGraph; @@ -756,7 +758,7 @@ bool IsLayerSupportedTest(FactoryType *factory, Tag<Type>) try { bool retVal = LayerPolicy::MakeDummyWorkload(factory, numIn, numOut).get() != nullptr; - BOOST_CHECK_MESSAGE(retVal, layerName << errorMsg); + CHECK_MESSAGE(retVal, layerName << errorMsg); return retVal; } catch(const armnn::InvalidArgumentException& e) @@ -768,13 +770,13 @@ bool IsLayerSupportedTest(FactoryType *factory, Tag<Type>) catch(const std::exception& e) { errorMsg = e.what(); - BOOST_TEST_ERROR(layerName << ": " << errorMsg); + FAIL(layerName << ": " << errorMsg); return false; } catch(...) { errorMsg = "Unexpected error while testing support for "; - BOOST_TEST_ERROR(errorMsg << layerName); + FAIL(errorMsg << layerName); return false; } } @@ -784,7 +786,7 @@ bool IsLayerSupportedTest(FactoryType *factory, Tag<Type>) try { bool retVal = LayerPolicy::MakeDummyWorkload(factory, numIn, numOut).get() == nullptr; - BOOST_CHECK_MESSAGE(retVal, layerName << errorMsg); + CHECK_MESSAGE(retVal, layerName << errorMsg); return retVal; } // These two exceptions are ok: For workloads that are partially supported, attempting to instantiate them @@ -803,13 +805,13 @@ bool IsLayerSupportedTest(FactoryType *factory, Tag<Type>) catch(const std::exception& e) { errorMsg = e.what(); - BOOST_TEST_ERROR(layerName << ": " << errorMsg); + FAIL(layerName << ": " << errorMsg); return false; } catch(...) { errorMsg = "Unexpected error while testing support for "; - BOOST_TEST_ERROR(errorMsg << layerName); + FAIL(errorMsg << layerName); return false; } } @@ -871,7 +873,7 @@ bool TestLayerTypeMatches() std::stringstream ss; ss << LayerPolicy::NameStr << " layer type mismatches expected layer type value."; bool v = Type == layer.m_Layer->GetType(); - BOOST_CHECK_MESSAGE(v, ss.str()); + CHECK_MESSAGE(v, ss.str()); return v; } |