COMPMID-424 Clean up validation tests for 2D spatial filter functions

* Remove shape_to_valid_region_undefined_border
* Remove hardcoded border size

Change-Id: I3c64148d8f7ce7e960f21d88d3af43bb23501683
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79106
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/tests/validation/NEON/Gaussian3x3.cpp b/tests/validation/NEON/Gaussian3x3.cpp
index f33b63f..b69df9a 100644
--- a/tests/validation/NEON/Gaussian3x3.cpp
+++ b/tests/validation/NEON/Gaussian3x3.cpp
@@ -52,6 +52,9 @@
 
 namespace
 {
+constexpr unsigned int filter_size = 3;              /** Size of the kernel/filter in number of elements. */
+constexpr BorderSize   border_size(filter_size / 2); /** Border size of the kernel/filter around its central element. */
+
 /** Compute Neon gaussian3x3 filter.
  *
  * @param[in] shape                 Shape of the input and output tensors.
@@ -107,7 +110,7 @@
 
     // Validate valid region
     const ValidRegion src_valid_region = shape_to_valid_region(shape);
-    const ValidRegion dst_valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, BorderSize(1));
+    const ValidRegion dst_valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size);
     validate(src.info()->valid_region(), src_valid_region);
     validate(dst.info()->valid_region(), dst_valid_region);
 
@@ -141,7 +144,7 @@
     RawTensor ref_dst = Reference::compute_reference_gaussian3x3(shape, border_mode, border_value);
 
     // Validate output
-    validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, BorderSize(1)));
+    validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size));
 }
 
 BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly"))
@@ -158,7 +161,7 @@
     RawTensor ref_dst = Reference::compute_reference_gaussian3x3(shape, border_mode, border_value);
 
     // Validate output
-    validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, BorderSize(1)));
+    validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size));
 }
 
 BOOST_AUTO_TEST_SUITE_END()