IVGCVSW-3334 Refactor BatchToSpace tests to be generic

 * Generify and reformat test BatchToSpace tests
 * Add missing RefCreateWorkload test

Change-Id: I08af018c07ee41df5b9d1e578d99bc03f38090ac
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
diff --git a/src/backends/reference/test/RefCreateWorkloadTests.cpp b/src/backends/reference/test/RefCreateWorkloadTests.cpp
index d174093..67b1d94 100644
--- a/src/backends/reference/test/RefCreateWorkloadTests.cpp
+++ b/src/backends/reference/test/RefCreateWorkloadTests.cpp
@@ -691,6 +691,29 @@
     RefCreateRsqrtTest<RefRsqrtWorkload, armnn::DataType::QuantisedSymm16>();
 }
 
+template <typename BatchToSpaceNdWorkloadType, armnn::DataType DataType>
+static void RefCreateBatchToSpaceNdTest()
+{
+    Graph graph;
+    RefWorkloadFactory factory;
+
+    auto workload = CreateBatchToSpaceNdWorkloadTest<BatchToSpaceNdWorkloadType, DataType>(factory, graph);
+
+    CheckInputOutput(std::move(workload),
+                     TensorInfo({ 1, 1 }, DataType),
+                     TensorInfo({ 1, 1 }, DataType));
+}
+
+BOOST_AUTO_TEST_CASE(CreateBatchToSpaceNdFloat32)
+{
+    RefCreateBatchToSpaceNdTest<RefBatchToSpaceNdWorkload, armnn::DataType::Float32>();
+}
+
+BOOST_AUTO_TEST_CASE(CreateBatchToSpaceNdUint8)
+{
+    RefCreateBatchToSpaceNdTest<RefBatchToSpaceNdWorkload, armnn::DataType::QuantisedAsymm8>();
+}
+
 template <typename L2NormalizationWorkloadType, armnn::DataType DataType>
 static void RefCreateL2NormalizationTest(DataLayout dataLayout)
 {