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 ConstMainFixture : public armnnUtils::ParserPrototxtFixture<armnnOnnxParser::IOnnxParser>
14 ConstMainFixture(const std::string& dataType)
18 producer_name: "CNTK "
19 producer_version: "2.5.1 "
30 data_type: )" + dataType + R"(
65 struct ConstValidFixture : ConstMainFixture
67 ConstValidFixture() : ConstMainFixture("FLOAT") {
72 struct ConstInvalidFixture : ConstMainFixture
74 ConstInvalidFixture() : ConstMainFixture("FLOAT16") { }
77 BOOST_FIXTURE_TEST_CASE(ValidConstTest, ConstValidFixture)
79 RunTest<1>({ }, {{ "Output" , {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0}}});
82 BOOST_FIXTURE_TEST_CASE(IncorrectDataTypeConst, ConstInvalidFixture)
84 BOOST_CHECK_THROW( Setup(), armnn::ParseException);
87 BOOST_AUTO_TEST_SUITE_END()