2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
6 #include <boost/test/unit_test.hpp>
7 #include "armnnOnnxParser/IOnnxParser.hpp"
8 #include "ParserPrototxtFixture.hpp"
10 BOOST_AUTO_TEST_SUITE(OnnxParser)
12 struct ReshapeMainFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxParser::IOnnxParser>
14 ReshapeMainFixture(const std::string& dataType)
19 producer_version: "2.5.1"
28 elem_type: )" + dataType + R"(
88 struct ReshapeValidFixture : ReshapeMainFixture
90 ReshapeValidFixture() : ReshapeMainFixture("FLOAT") {
95 struct ReshapeInvalidFixture : ReshapeMainFixture
97 ReshapeInvalidFixture() : ReshapeMainFixture("FLOAT16") { }
100 BOOST_FIXTURE_TEST_CASE(ValidReshapeTest, ReshapeValidFixture)
102 RunTest<2>({{"Input", { 0.0f, 1.0f, 2.0f, 3.0f }}}, {{"Output", { 0.0f, 1.0f, 2.0f, 3.0f }}});
105 BOOST_FIXTURE_TEST_CASE(IncorrectDataTypeReshape, ReshapeInvalidFixture)
107 BOOST_CHECK_THROW(Setup(), armnn::ParseException);
110 BOOST_AUTO_TEST_SUITE_END()