Avoid empty test suites

Refactor code around conditionally-compiled tests to avoid declaring
empty test suites, as this can cause unused function warnings to be
issued under certain combinations of compiler, warning level, and
doctest version.

Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: Ib501aef80475538a725b857d9c31d1d2f96b124d
diff --git a/src/armnn/test/optimizations/FuseActivationTests.cpp b/src/armnn/test/optimizations/FuseActivationTests.cpp
index 35b5bbc..24ea8f6 100644
--- a/src/armnn/test/optimizations/FuseActivationTests.cpp
+++ b/src/armnn/test/optimizations/FuseActivationTests.cpp
@@ -17,9 +17,7 @@
 
 using namespace armnn;
 
-TEST_SUITE("Optimizer")
-{
-namespace armnn
+namespace
 {
 
 template<typename T>
@@ -471,10 +469,11 @@
     return success;
 }
 
-} // namespace armnn
+}
 
-using namespace armnn;
 #if defined(ARMCOMPUTENEON_ENABLED)
+TEST_SUITE("Optimizer")
+{
 // ReLu fused into Receiver Layers Float32
 TEST_CASE("FuseReLUIntoConvFloat32CpuAccTest")
 {
@@ -712,9 +711,12 @@
         (activationDescriptor, Compute::CpuAcc)), "FullyConnected + Activation function " <<
         static_cast<int>(activationDescriptor.m_Function));
 }
+}
 #endif
 
 #if defined(ARMCOMPUTECL_ENABLED)
+TEST_SUITE("Optimizer")
+{
 // ReLu fused into Receiver Layers Float32
 TEST_CASE("FuseReLUIntoConvFloat32GpuAccTest")
 {
@@ -1176,6 +1178,5 @@
         (activationDescriptor, Compute::GpuAcc)), "FullyConnected + Activation function " <<
         static_cast<int>(activationDescriptor.m_Function));
 }
+}
 #endif
-
-}
\ No newline at end of file
diff --git a/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp b/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
index df9a0db..0be8857 100644
--- a/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
+++ b/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
@@ -12,8 +12,9 @@
 
 using namespace armnn;
 
-TEST_SUITE("Optimizer_ReduceMultipleAxes")
+namespace
 {
+#if defined(ARMCOMPUTENEON_ENABLED)||defined(ARMCOMPUTECL_ENABLED)
 INetworkPtr CreateSimpleReduceNetwork(ReduceDescriptor reduceDescriptor,
                                       TensorShape& inputShape,
                                       TensorShape& outputShape)
@@ -243,9 +244,12 @@
                                reduceDescriptor.m_vAxis.size(),
                                backendId);
 }
+#endif
+}
 
-using namespace armnn;
 #if defined(ARMCOMPUTENEON_ENABLED)
+TEST_SUITE("Optimizer_ReduceMultipleAxesCpu")
+{
 TEST_CASE("ReduceSumWithTwoAxesKeepDimsCpuAccTest")
 {
     ReduceSumWithTwoAxesKeepDimsTest(Compute::CpuAcc);
@@ -265,9 +269,12 @@
 {
     ReduceSumWithThreeAxesTest(Compute::CpuAcc);
 }
+}
 #endif
 
 #if defined(ARMCOMPUTECL_ENABLED)
+TEST_SUITE("Optimizer_ReduceMultipleAxesGpu")
+{
 TEST_CASE("ReduceSumWithTwoAxesKeepDimsGpuAccTest")
 {
     ReduceSumWithTwoAxesKeepDimsTest(Compute::GpuAcc);
@@ -287,6 +294,5 @@
 {
     ReduceSumWithThreeAxesTest(Compute::GpuAcc);
 }
+}
 #endif
-
-}
\ No newline at end of file