ArmNN
 22.02
TestInputOutputLayerVisitor.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
6 #include "Network.hpp"
7 
8 #include <doctest/doctest.h>
9 
10 namespace armnn
11 {
12 
13 TEST_SUITE("TestInputOutputLayerVisitor")
14 {
15 TEST_CASE("CheckInputLayerVisitorBindingIdAndName")
16 {
17  const char* layerName = "InputLayer";
18  TestInputLayerVisitor visitor(1, layerName);
19  NetworkImpl net;
20 
21  IConnectableLayer *const layer = net.AddInputLayer(1, layerName);
22  layer->ExecuteStrategy(visitor);
23 }
24 
25 TEST_CASE("CheckInputLayerVisitorBindingIdAndNameNull")
26 {
27  TestInputLayerVisitor visitor(1);
28  NetworkImpl net;
29 
30  IConnectableLayer *const layer = net.AddInputLayer(1);
31  layer->ExecuteStrategy(visitor);
32 }
33 
34 TEST_CASE("CheckOutputLayerVisitorBindingIdAndName")
35 {
36  const char* layerName = "OutputLayer";
37  TestOutputLayerVisitor visitor(1, layerName);
38  NetworkImpl net;
39 
40  IConnectableLayer *const layer = net.AddOutputLayer(1, layerName);
41  layer->ExecuteStrategy(visitor);
42 }
43 
44 TEST_CASE("CheckOutputLayerVisitorBindingIdAndNameNull")
45 {
46  TestOutputLayerVisitor visitor(1);
47  NetworkImpl net;
48 
49  IConnectableLayer *const layer = net.AddOutputLayer(1);
50  layer->ExecuteStrategy(visitor);
51 }
52 
53 }
54 
55 } //namespace armnn
TEST_SUITE("TestConstTensorLayerVisitor")
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:66
Copyright (c) 2021 ARM Limited and Contributors.
Private implementation of INetwork.
Definition: Network.hpp:31
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:1873
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:2175
virtual ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy(IStrategy &strategy) const =0
Apply a visitor to this layer.