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/armnnOnnxParser/test/Pooling.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/armnnOnnxParser/test/Pooling.cpp')
-rw-r--r-- | src/armnnOnnxParser/test/Pooling.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/armnnOnnxParser/test/Pooling.cpp b/src/armnnOnnxParser/test/Pooling.cpp index 85bf9141a6..73d113d8e1 100644 --- a/src/armnnOnnxParser/test/Pooling.cpp +++ b/src/armnnOnnxParser/test/Pooling.cpp @@ -3,12 +3,11 @@ // SPDX-License-Identifier: MIT // -#include <boost/test/unit_test.hpp> #include "armnnOnnxParser/IOnnxParser.hpp" #include "ParserPrototxtFixture.hpp" -BOOST_AUTO_TEST_SUITE(OnnxParser) - +TEST_SUITE("OnnxParser_Pooling") +{ struct PoolingMainFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxParser::IOnnxParser> { PoolingMainFixture(const std::string& dataType, const std::string& op) @@ -110,7 +109,7 @@ struct MaxPoolInvalidFixture : PoolingMainFixture MaxPoolInvalidFixture() : PoolingMainFixture("10", "\"MaxPool\"") { } }; -BOOST_FIXTURE_TEST_CASE(ValidMaxPoolTest, MaxPoolValidFixture) +TEST_CASE_FIXTURE(MaxPoolValidFixture, "ValidMaxPoolTest") { RunTest<4>({{"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{"Output", {3.0f}}}); } @@ -217,12 +216,12 @@ struct PoolingWithPadFixture : public armnnUtils::ParserPrototxtFixture<armnnOnn } }; -BOOST_FIXTURE_TEST_CASE(AveragePoolValid, AvgPoolValidFixture) +TEST_CASE_FIXTURE(AvgPoolValidFixture, "AveragePoolValid") { RunTest<4>({{"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{"Output", {0.5}}}); } -BOOST_FIXTURE_TEST_CASE(ValidAvgWithPadTest, PoolingWithPadFixture) +TEST_CASE_FIXTURE(PoolingWithPadFixture, "ValidAvgWithPadTest") { RunTest<4>({{"Input", {1.0f, 2.0f, 3.0f, -4.0f}}}, {{"Output", {1.0/8.0}}}); } @@ -297,14 +296,14 @@ struct GlobalAvgFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxPars } }; -BOOST_FIXTURE_TEST_CASE(GlobalAvgTest, GlobalAvgFixture) +TEST_CASE_FIXTURE(GlobalAvgFixture, "GlobalAvgTest") { RunTest<4>({{"Input", {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}}}, {{"Output", {10/4.0, 26/4.0}}}); } -BOOST_FIXTURE_TEST_CASE(IncorrectDataTypeMaxPool, MaxPoolInvalidFixture) +TEST_CASE_FIXTURE(MaxPoolInvalidFixture, "IncorrectDataTypeMaxPool") { - BOOST_CHECK_THROW(Setup(), armnn::ParseException); + CHECK_THROWS_AS(Setup(), armnn::ParseException); } -BOOST_AUTO_TEST_SUITE_END() +} |