aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/test')
-rw-r--r--src/armnn/test/GraphTests.cpp13
-rw-r--r--src/armnn/test/GraphUtils.cpp13
-rw-r--r--src/armnn/test/GraphUtils.hpp2
3 files changed, 15 insertions, 13 deletions
diff --git a/src/armnn/test/GraphTests.cpp b/src/armnn/test/GraphTests.cpp
index a3c42b6ce7..5a17c1c227 100644
--- a/src/armnn/test/GraphTests.cpp
+++ b/src/armnn/test/GraphTests.cpp
@@ -19,19 +19,6 @@
#include <boost/cast.hpp>
#include <boost/test/unit_test.hpp>
-/// Checks that first comes before second in the order.
-bool CheckOrder(const armnn::Graph& graph, const armnn::Layer* first, const armnn::Layer* second)
-{
- graph.Print();
-
- const auto& order = graph.TopologicalSort();
-
- auto firstPos = std::find(order.begin(), order.end(), first);
- auto secondPos = std::find(firstPos, order.end(), second);
-
- return (secondPos != order.end());
-}
-
BOOST_AUTO_TEST_SUITE(Graph)
BOOST_AUTO_TEST_CASE(ClassGraph)
diff --git a/src/armnn/test/GraphUtils.cpp b/src/armnn/test/GraphUtils.cpp
index 36db900a2d..bc6b562c9d 100644
--- a/src/armnn/test/GraphUtils.cpp
+++ b/src/armnn/test/GraphUtils.cpp
@@ -63,3 +63,16 @@ bool IsConnected(armnn::Layer* srcLayer, armnn::Layer* destLayer,
}
return false;
}
+
+/// Checks that first comes before second in the order.
+bool CheckOrder(const armnn::Graph& graph, const armnn::Layer* first, const armnn::Layer* second)
+{
+ graph.Print();
+
+ const auto& order = graph.TopologicalSort();
+
+ auto firstPos = std::find(order.begin(), order.end(), first);
+ auto secondPos = std::find(firstPos, order.end(), second);
+
+ return (secondPos != order.end());
+}
diff --git a/src/armnn/test/GraphUtils.hpp b/src/armnn/test/GraphUtils.hpp
index b51e4d179e..60d03dca23 100644
--- a/src/armnn/test/GraphUtils.hpp
+++ b/src/armnn/test/GraphUtils.hpp
@@ -21,3 +21,5 @@ bool IsConnected(armnn::Layer* srcLayer, armnn::Layer* destLayer,
unsigned int srcSlot, unsigned int destSlot,
const armnn::TensorInfo& expectedTensorInfo);
+bool CheckOrder(const armnn::Graph& graph, const armnn::Layer* first, const armnn::Layer* second);
+