From 1625efc870f1a8b7c6e6382277ddbb245f91a294 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Thu, 10 Jun 2021 18:24:34 +0100 Subject: IVGCVSW-5963 'Move unit tests to new framework' * Used doctest in ArmNN unit tests Signed-off-by: Sadik Armagan Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a --- src/armnnOnnxParser/test/Pooling.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/armnnOnnxParser/test/Pooling.cpp') 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 #include "armnnOnnxParser/IOnnxParser.hpp" #include "ParserPrototxtFixture.hpp" -BOOST_AUTO_TEST_SUITE(OnnxParser) - +TEST_SUITE("OnnxParser_Pooling") +{ struct PoolingMainFixture : public armnnUtils::ParserPrototxtFixture { 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({{"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({{"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() +} -- cgit v1.2.1