ArmNN
NotReleased
|
#include <armnn/Logging.hpp>
#include <armnn/Utils.hpp>
#include <reference/RefWorkloadFactory.hpp>
#include <backendsCommon/test/LayerTests.hpp>
#include <backendsCommon/test/WorkloadFactoryHelper.hpp>
#include "TensorHelpers.hpp"
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
Macros | |
#define | ARMNN_SIMPLE_TEST_CASE(TestName, TestFunction) |
#define | ARMNN_AUTO_TEST_CASE(TestName, TestFunction, ...) |
#define | ARMNN_COMPARE_REF_AUTO_TEST_CASE(TestName, TestFunction, ...) |
#define | ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(TestName, Fixture, TestFunction, ...) |
Functions | |
void | ConfigureLoggingTest () |
template<typename T , std::size_t n> | |
void | CompareTestResultIfSupported (const std::string &testName, const LayerTestResult< T, n > &testResult) |
template<typename T , std::size_t n> | |
void | CompareTestResultIfSupported (const std::string &testName, const std::vector< LayerTestResult< T, n >> &testResult) |
template<typename FactoryType , typename TFuncPtr , typename... Args> | |
void | RunTestFunction (const char *testName, TFuncPtr testFunction, Args... args) |
template<typename FactoryType , typename TFuncPtr , typename... Args> | |
void | CompareRefTestFunction (const char *testName, TFuncPtr testFunction, Args... args) |
#define ARMNN_AUTO_TEST_CASE | ( | TestName, | |
TestFunction, | |||
... | |||
) |
Definition at line 81 of file UnitTests.hpp.
#define ARMNN_COMPARE_REF_AUTO_TEST_CASE | ( | TestName, | |
TestFunction, | |||
... | |||
) |
Definition at line 99 of file UnitTests.hpp.
#define ARMNN_COMPARE_REF_FIXTURE_TEST_CASE | ( | TestName, | |
Fixture, | |||
TestFunction, | |||
... | |||
) |
Definition at line 105 of file UnitTests.hpp.
#define ARMNN_SIMPLE_TEST_CASE | ( | TestName, | |
TestFunction | |||
) |
Definition at line 75 of file UnitTests.hpp.
void CompareRefTestFunction | ( | const char * | testName, |
TFuncPtr | testFunction, | ||
Args... | args | ||
) |
Definition at line 88 of file UnitTests.hpp.
References CompareTestResultIfSupported().
void CompareTestResultIfSupported | ( | const std::string & | testName, |
const LayerTestResult< T, n > & | testResult | ||
) |
Executes BOOST_TEST on CompareTensors() return value so that the predicate_result message is reported. If the test reports itself as not supported then the tensors are not compared. Additionally this checks that the supportedness reported by the test matches the name of the test. Unsupported tests must be 'tagged' by including "UNSUPPORTED" in their name. This is useful because it clarifies that the feature being tested is not actually supported (a passed test with the name of a feature would imply that feature was supported). If support is added for a feature, the test case will fail because the name incorrectly contains UNSUPPORTED. If support is removed for a feature, the test case will fail because the name doesn't contain UNSUPPORTED.
Definition at line 36 of file UnitTests.hpp.
References LayerTestResult< T, n >::compareBoolean, CompareTensors(), LayerTestResult< T, n >::output, LayerTestResult< T, n >::outputExpected, and LayerTestResult< T, n >::supported.
Referenced by CompareRefTestFunction(), and RunTestFunction().
void CompareTestResultIfSupported | ( | const std::string & | testName, |
const std::vector< LayerTestResult< T, n >> & | testResult | ||
) |
Definition at line 48 of file UnitTests.hpp.
References CompareTensors().
|
inline |
Definition at line 15 of file UnitTests.hpp.
References armnn::ConfigureLogging(), and armnn::Fatal.
void RunTestFunction | ( | const char * | testName, |
TFuncPtr | testFunction, | ||
Args... | args | ||
) |
Definition at line 63 of file UnitTests.hpp.
References CompareTestResultIfSupported(), ProfilerManager::GetInstance(), and ProfilerManager::RegisterProfiler().