aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/test/ParserHelperTest.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/armnnUtils/test/ParserHelperTest.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/armnnUtils/test/ParserHelperTest.cpp')
-rw-r--r--src/armnnUtils/test/ParserHelperTest.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/armnnUtils/test/ParserHelperTest.cpp b/src/armnnUtils/test/ParserHelperTest.cpp
index dbf0673bf5..2ed9bd1f03 100644
--- a/src/armnnUtils/test/ParserHelperTest.cpp
+++ b/src/armnnUtils/test/ParserHelperTest.cpp
@@ -8,15 +8,15 @@
#include <armnn/Tensor.hpp>
#include <armnn/Types.hpp>
-#include <boost/test/unit_test.hpp>
+#include <doctest/doctest.h>
using namespace armnn;
using namespace armnnUtils;
-BOOST_AUTO_TEST_SUITE(ParserHelperSuite)
-
-BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
+TEST_SUITE("ParserHelperSuite")
+{
+TEST_CASE("CalculateReducedOutputTensoInfoTest")
{
bool keepDims = false;
@@ -29,8 +29,8 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
CalculateReducedOutputTensoInfo(inputTensorInfo, axisData1, keepDims, outputTensorInfo1);
- BOOST_TEST(outputTensorInfo1.GetNumDimensions() == 1);
- BOOST_TEST(outputTensorInfo1.GetShape()[0] == 1);
+ CHECK(outputTensorInfo1.GetNumDimensions() == 1);
+ CHECK(outputTensorInfo1.GetShape()[0] == 1);
// Reducing dimension 0 results in a 3x4 size tensor (one dimension)
std::set<unsigned int> axisData2 = { 0 };
@@ -38,8 +38,8 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
CalculateReducedOutputTensoInfo(inputTensorInfo, axisData2, keepDims, outputTensorInfo2);
- BOOST_TEST(outputTensorInfo2.GetNumDimensions() == 1);
- BOOST_TEST(outputTensorInfo2.GetShape()[0] == 12);
+ CHECK(outputTensorInfo2.GetNumDimensions() == 1);
+ CHECK(outputTensorInfo2.GetShape()[0] == 12);
// Reducing dimensions 0,1 results in a 4 size tensor (one dimension)
std::set<unsigned int> axisData3 = { 0, 1 };
@@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
CalculateReducedOutputTensoInfo(inputTensorInfo, axisData3, keepDims, outputTensorInfo3);
- BOOST_TEST(outputTensorInfo3.GetNumDimensions() == 1);
- BOOST_TEST(outputTensorInfo3.GetShape()[0] == 4);
+ CHECK(outputTensorInfo3.GetNumDimensions() == 1);
+ CHECK(outputTensorInfo3.GetShape()[0] == 4);
// Reducing dimension 0 results in a { 1, 3, 4 } dimension tensor
keepDims = true;
@@ -58,10 +58,10 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
CalculateReducedOutputTensoInfo(inputTensorInfo, axisData4, keepDims, outputTensorInfo4);
- BOOST_TEST(outputTensorInfo4.GetNumDimensions() == 3);
- BOOST_TEST(outputTensorInfo4.GetShape()[0] == 1);
- BOOST_TEST(outputTensorInfo4.GetShape()[1] == 3);
- BOOST_TEST(outputTensorInfo4.GetShape()[2] == 4);
+ CHECK(outputTensorInfo4.GetNumDimensions() == 3);
+ CHECK(outputTensorInfo4.GetShape()[0] == 1);
+ CHECK(outputTensorInfo4.GetShape()[1] == 3);
+ CHECK(outputTensorInfo4.GetShape()[2] == 4);
// Reducing dimension 1, 2 results in a { 2, 1, 1 } dimension tensor
keepDims = true;
@@ -71,12 +71,12 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest)
CalculateReducedOutputTensoInfo(inputTensorInfo, axisData5, keepDims, outputTensorInfo5);
- BOOST_TEST(outputTensorInfo5.GetNumDimensions() == 3);
- BOOST_TEST(outputTensorInfo5.GetShape()[0] == 2);
- BOOST_TEST(outputTensorInfo5.GetShape()[1] == 1);
- BOOST_TEST(outputTensorInfo5.GetShape()[2] == 1);
+ CHECK(outputTensorInfo5.GetNumDimensions() == 3);
+ CHECK(outputTensorInfo5.GetShape()[0] == 2);
+ CHECK(outputTensorInfo5.GetShape()[1] == 1);
+ CHECK(outputTensorInfo5.GetShape()[2] == 1);
}
-BOOST_AUTO_TEST_SUITE_END()
+}