ArmNN
 21.02
TfLiteParser.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (ParseEmptyBinaryData)
 
 BOOST_FIXTURE_TEST_CASE (ParseBadInputBindings, NoInputBindingsFixture)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( ParseEmptyBinaryData  )

Definition at line 12 of file TfLiteParser.cpp.

References ParserFlatbuffersFixture::SetupSingleInputSingleOutput().

13 {
14  ITfLiteParser::TfLiteParserOptions options;
15  ITfLiteParserPtr m_Parser(ITfLiteParser::Create(armnn::Optional<ITfLiteParser::TfLiteParserOptions>(options)));
16  // Should throw armnn::ParseException: Buffer doesn't conform to the expected Tensorflow Lite flatbuffers format.
17  BOOST_CHECK_THROW(m_Parser->CreateNetworkFromBinary({0}), armnn::ParseException);
18 }
std::unique_ptr< ITfLiteParser, void(*)(ITfLiteParser *parser)> ITfLiteParserPtr

◆ BOOST_FIXTURE_TEST_CASE()

BOOST_FIXTURE_TEST_CASE ( ParseBadInputBindings  ,
NoInputBindingsFixture   
)

Definition at line 35 of file TfLiteParser.cpp.

References BOOST_AUTO_TEST_SUITE_END().

36 {
37  // Should throw armnn::ParseException: No input binding found for subgraph:0 and name:inputTensor.
38  BOOST_CHECK_THROW( (RunTest<4, armnn::DataType::QAsymmU8>(0, { }, { 0 })), armnn::ParseException);
39 }