ArmNN
 22.05
RefBackendTests.cpp File Reference
#include <reference/RefBackend.hpp>
#include <reference/RefTensorHandleFactory.hpp>
#include <doctest/doctest.h>

Go to the source code of this file.

Functions

 TEST_SUITE ("RefBackendTests")
 

Function Documentation

◆ TEST_SUITE()

TEST_SUITE ( "RefBackendTests"  )

Definition at line 13 of file RefBackendTests.cpp.

References RefTensorHandleFactory::GetIdStatic().

14 {
15 TEST_CASE("RefRegisterTensorHandleFactoriesMatchingImportFactoryId")
16 {
17  auto refBackend = std::make_unique<RefBackend>();
19  refBackend->RegisterTensorHandleFactories(registry);
20 
21  // When calling RegisterTensorHandleFactories, CopyAndImportFactoryPair is registered
22  // Get matching import factory id correctly
23  CHECK((registry.GetMatchingImportFactoryId(RefTensorHandleFactory::GetIdStatic()) ==
24  RefTensorHandleFactory::GetIdStatic()));
25 }
26 
27 TEST_CASE("RefCreateWorkloadFactoryMatchingImportFactoryId")
28 {
29  auto refBackend = std::make_unique<RefBackend>();
31  refBackend->CreateWorkloadFactory(registry);
32 
33  // When calling CreateWorkloadFactory, CopyAndImportFactoryPair is registered
34  // Get matching import factory id correctly
35  CHECK((registry.GetMatchingImportFactoryId(RefTensorHandleFactory::GetIdStatic()) ==
36  RefTensorHandleFactory::GetIdStatic()));
37 }
38 }