aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/test/Fp16SupportTest.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2021-06-10 18:24:34 +0100
committerSadik Armagan <sadik.armagan@arm.com>2021-06-11 10:33:16 +0000
commit1625efc870f1a8b7c6e6382277ddbb245f91a294 (patch)
tree39fbbaa15ed7eb81337b082c2d20b0af68b91c02 /src/backends/cl/test/Fp16SupportTest.cpp
parent958e0ba61e940a8d11955cf2a10f681c7c47e1fa (diff)
downloadarmnn-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/cl/test/Fp16SupportTest.cpp')
-rw-r--r--src/backends/cl/test/Fp16SupportTest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backends/cl/test/Fp16SupportTest.cpp b/src/backends/cl/test/Fp16SupportTest.cpp
index 5afafcb783..1974d4d856 100644
--- a/src/backends/cl/test/Fp16SupportTest.cpp
+++ b/src/backends/cl/test/Fp16SupportTest.cpp
@@ -13,15 +13,15 @@
#include <backendsCommon/TensorHandle.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
-#include <boost/test/unit_test.hpp>
+#include <doctest/doctest.h>
#include <set>
using namespace armnn;
-BOOST_AUTO_TEST_SUITE(Fp16Support)
-
-BOOST_AUTO_TEST_CASE(Fp16DataTypeSupport)
+TEST_SUITE("Fp16Support")
+{
+TEST_CASE("Fp16DataTypeSupport")
{
Graph graph;
@@ -40,12 +40,12 @@ BOOST_AUTO_TEST_CASE(Fp16DataTypeSupport)
inputLayer2->GetOutputSlot().SetTensorInfo(fp16TensorInfo);
additionLayer->GetOutputSlot().SetTensorInfo(fp16TensorInfo);
- BOOST_CHECK(inputLayer1->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
- BOOST_CHECK(inputLayer2->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
- BOOST_CHECK(additionLayer->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
+ CHECK(inputLayer1->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
+ CHECK(inputLayer2->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
+ CHECK(additionLayer->GetOutputSlot(0).GetTensorInfo().GetDataType() == armnn::DataType::Float16);
}
-BOOST_AUTO_TEST_CASE(Fp16AdditionTest)
+TEST_CASE("Fp16AdditionTest")
{
using namespace half_float::literal;
// Create runtime in which test will run
@@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(Fp16AdditionTest)
runtime->EnqueueWorkload(netId, inputTensors, outputTensors);
// Checks the results.
- BOOST_TEST(outputData == std::vector<Half>({ 101.0_h, 202.0_h, 303.0_h, 404.0_h})); // Add
+ CHECK(outputData == std::vector<Half>({ 101.0_h, 202.0_h, 303.0_h, 404.0_h})); // Add
}
-BOOST_AUTO_TEST_SUITE_END()
+}