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/Reshape.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/armnnOnnxParser/test/Reshape.cpp') diff --git a/src/armnnOnnxParser/test/Reshape.cpp b/src/armnnOnnxParser/test/Reshape.cpp index 119a406d7e..e9bcd278cf 100644 --- a/src/armnnOnnxParser/test/Reshape.cpp +++ b/src/armnnOnnxParser/test/Reshape.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_Reshape") +{ struct ReshapeMainFixture : public armnnUtils::ParserPrototxtFixture { ReshapeMainFixture(const std::string& dataType) @@ -189,12 +188,12 @@ struct ReshapeInvalidFixture : ReshapeMainFixture ReshapeInvalidFixture() : ReshapeMainFixture("10") { } }; -BOOST_FIXTURE_TEST_CASE(ValidReshapeTest, ReshapeValidFixture) +TEST_CASE_FIXTURE(ReshapeValidFixture, "ValidReshapeTest") { RunTest<2>({{"Input", { 0.0f, 1.0f, 2.0f, 3.0f }}}, {{"Output", { 0.0f, 1.0f, 2.0f, 3.0f }}}); } -BOOST_FIXTURE_TEST_CASE(ValidRank4ReshapeTest, ReshapeValidRank4Fixture) +TEST_CASE_FIXTURE(ReshapeValidRank4Fixture, "ValidRank4ReshapeTest") { RunTest<2>( {{"Input", @@ -207,9 +206,9 @@ BOOST_FIXTURE_TEST_CASE(ValidRank4ReshapeTest, ReshapeValidRank4Fixture) 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f}}}); } -BOOST_FIXTURE_TEST_CASE(IncorrectDataTypeReshape, ReshapeInvalidFixture) +TEST_CASE_FIXTURE(ReshapeInvalidFixture, "IncorrectDataTypeReshape") { - BOOST_CHECK_THROW(Setup(), armnn::ParseException); + CHECK_THROWS_AS(Setup(), armnn::ParseException); } -BOOST_AUTO_TEST_SUITE_END() +} -- cgit v1.2.1