6 #include <boost/test/unit_test.hpp> 8 #include "../TfLiteParser.hpp" 16 explicit NegFixture(
const std::string & inputShape,
17 const std::string & outputShape)
22 "operator_codes": [ { "builtin_code": "NEG" } ], 26 "shape": )" + inputShape + R"(, 29 "name": "inputTensor", 38 "shape": )" + outputShape + R"( , 41 "name": "outputTensor", 57 "custom_options_format": "FLEXBUFFERS" 71 struct SimpleNegFixture :
public NegFixture
73 SimpleNegFixture() : NegFixture(
"[ 1, 2, 3, 1 ]",
"[ 1, 2, 3, 1 ]") {}
79 RunTest<4, DataType::Float32>(0, {{
"inputTensor", { 0.0f, 1.0f, -2.0f,
80 20.0855185f, -54.5980834f, 5.0f} }},
81 {{
"outputTensor",{ 0.0f, -1.0f, 2.0f,
82 -20.0855185f, 54.5980834f, -5.0f} }});
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_FIXTURE_TEST_CASE(ParseNeg, SimpleNegFixture)