6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 19 explicit ConstantAddFixture(
const std::string & inputShape,
20 const std::string & outputShape,
21 const std::string & constShape,
22 const std::string & constData)
27 "operator_codes": [ { "builtin_code": "ADD" } ], 31 "shape": )" + constShape + R"( , 34 "name": "ConstTensor", 43 "shape": )" + inputShape + R"(, 46 "name": "InputTensor", 55 "shape": )" + outputShape + R"( , 58 "name": "OutputTensor", 74 "builtin_options_type": "AddOptions", 77 "custom_options_format": "FLEXBUFFERS" 85 { "data": )" + constData + R"(, }, 94 struct SimpleConstantAddFixture : ConstantAddFixture
96 SimpleConstantAddFixture()
97 : ConstantAddFixture(
"[ 2, 2 ]",
106 RunTest<2, armnn::DataType::QAsymmU8>(
108 {{
"InputTensor", { 0, 1, 2, 3 }}},
109 {{
"OutputTensor", { 4, 6, 8, 10 }}}
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(SimpleConstantAdd, SimpleConstantAddFixture)
BOOST_AUTO_TEST_SUITE_END()