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/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp | |
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/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp')
-rw-r--r-- | src/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp b/src/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp index e616158f29..395038d959 100644 --- a/src/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp +++ b/src/armnnTfLiteParser/test/OutputShapeOfSqueeze.cpp @@ -3,11 +3,15 @@ // SPDX-License-Identifier: MIT // -#include <boost/test/unit_test.hpp> #include "../TfLiteParser.hpp" #include <iostream> #include <string> +#include <doctest/doctest.h> + +TEST_SUITE("TensorflowLiteParser_OutputShapeOfSqueeze") +{ + struct TfLiteParserFixture { @@ -19,41 +23,38 @@ struct TfLiteParserFixture }; -BOOST_AUTO_TEST_SUITE(TensorflowLiteParser); - - -BOOST_FIXTURE_TEST_CASE( EmptySqueezeDims_OutputWithAllDimensionsSqueezed, TfLiteParserFixture ) +TEST_CASE_FIXTURE(TfLiteParserFixture, "EmptySqueezeDims_OutputWithAllDimensionsSqueezed") { std::vector<uint32_t> squeezeDims = { }; armnn::TensorInfo inputTensorInfo = armnn::TensorInfo(4, m_InputShape, armnn::DataType::Float32); armnn::TensorInfo outputTensorInfo = m_Parser.OutputShapeOfSqueeze(squeezeDims, inputTensorInfo); - BOOST_TEST(outputTensorInfo.GetNumElements() == 4); - BOOST_TEST(outputTensorInfo.GetNumDimensions() == 2); - BOOST_TEST((outputTensorInfo.GetShape() == armnn::TensorShape({ 2, 2 }))); + CHECK(outputTensorInfo.GetNumElements() == 4); + CHECK(outputTensorInfo.GetNumDimensions() == 2); + CHECK((outputTensorInfo.GetShape() == armnn::TensorShape({ 2, 2 }))); }; -BOOST_FIXTURE_TEST_CASE( SqueezeDimsNotIncludingSizeOneDimensions_NoDimensionsSqueezedInOutput, TfLiteParserFixture ) +TEST_CASE_FIXTURE(TfLiteParserFixture, "SqueezeDimsNotIncludingSizeOneDimensions_NoDimensionsSqueezedInOutput") { std::vector<uint32_t> squeezeDims = { 1, 2 }; armnn::TensorInfo inputTensorInfo = armnn::TensorInfo(4, m_InputShape, armnn::DataType::Float32); armnn::TensorInfo outputTensorInfo = m_Parser.OutputShapeOfSqueeze(squeezeDims, inputTensorInfo); - BOOST_TEST(outputTensorInfo.GetNumElements() == 4); - BOOST_TEST(outputTensorInfo.GetNumDimensions() == 4); - BOOST_TEST((outputTensorInfo.GetShape() == armnn::TensorShape({ 1, 2, 2, 1 }))); + CHECK(outputTensorInfo.GetNumElements() == 4); + CHECK(outputTensorInfo.GetNumDimensions() == 4); + CHECK((outputTensorInfo.GetShape() == armnn::TensorShape({ 1, 2, 2, 1 }))); }; -BOOST_FIXTURE_TEST_CASE( SqueezeDimsRangePartial_OutputWithDimensionsWithinRangeSqueezed, TfLiteParserFixture ) +TEST_CASE_FIXTURE(TfLiteParserFixture, "SqueezeDimsRangePartial_OutputWithDimensionsWithinRangeSqueezed") { std::vector<uint32_t> squeezeDims = { 1, 3 }; armnn::TensorInfo inputTensorInfo = armnn::TensorInfo(4, m_InputShape, armnn::DataType::Float32); armnn::TensorInfo outputTensorInfo = m_Parser.OutputShapeOfSqueeze(squeezeDims, inputTensorInfo); - BOOST_TEST(outputTensorInfo.GetNumElements() == 4); - BOOST_TEST(outputTensorInfo.GetNumDimensions() == 3); - BOOST_TEST((outputTensorInfo.GetShape() == armnn::TensorShape({ 1, 2, 2 }))); + CHECK(outputTensorInfo.GetNumElements() == 4); + CHECK(outputTensorInfo.GetNumDimensions() == 3); + CHECK((outputTensorInfo.GetShape() == armnn::TensorShape({ 1, 2, 2 }))); }; -BOOST_AUTO_TEST_SUITE_END();
\ No newline at end of file +}
\ No newline at end of file |