COMPMID-670 - Extend Sobel tests

Change-Id: Ibf15544e8624977815ee355071a038c07e1f01c2
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94874
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/tests/validation/CL/Sobel.cpp b/tests/validation/CL/Sobel.cpp
index cde93e7..16f411d 100644
--- a/tests/validation/CL/Sobel.cpp
+++ b/tests/validation/CL/Sobel.cpp
@@ -100,8 +100,50 @@
     validate(dst_y.info()->padding(), dst_padding);
 }
 
-FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                               Format::U8)))
+TEST_SUITE(X)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
+TEST_SUITE_END()
+
+TEST_SUITE(Y)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+TEST_SUITE_END()
+
+TEST_SUITE(XY)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel3x3Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
@@ -111,8 +153,9 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 
-FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                             Format::U8)))
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel3x3Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(1));
@@ -122,6 +165,7 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 TEST_SUITE_END()
+TEST_SUITE_END()
 
 TEST_SUITE(W5x5)
 using CLSobel5x5Fixture = SobelValidationFixture<CLTensor, CLAccessor, CLSobel5x5, uint8_t, int16_t>;
@@ -176,8 +220,48 @@
     validate(dst_y.info()->padding(), dst_padding);
 }
 
-FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                               Format::U8)))
+TEST_SUITE(X)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
+TEST_SUITE_END()
+TEST_SUITE(Y)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+TEST_SUITE_END()
+TEST_SUITE(XY)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel5x5Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
@@ -187,8 +271,9 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 
-FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                             Format::U8)))
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel5x5Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(2));
@@ -198,6 +283,7 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 TEST_SUITE_END()
+TEST_SUITE_END()
 
 TEST_SUITE(W7x7)
 using CLSobel7x7Fixture = SobelValidationFixture<CLTensor, CLAccessor, CLSobel7x7, uint8_t, int32_t>;
@@ -252,9 +338,48 @@
     validate(dst_x.info()->padding(), dst_padding);
     validate(dst_y.info()->padding(), dst_padding);
 }
+TEST_SUITE(X)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
 
-FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                               Format::U8)))
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_X)))
+{
+    // Validate output
+    ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
+    validate(CLAccessor(_target.first), _reference.first, valid_region_x);
+}
+TEST_SUITE_END()
+TEST_SUITE(Y)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_Y)))
+{
+    // Validate output
+    ValidRegion valid_region_y = shape_to_valid_region(_reference.second.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
+    validate(CLAccessor(_target.second), _reference.second, valid_region_y);
+}
+TEST_SUITE_END()
+TEST_SUITE(XY)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel7x7Fixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                       Format::U8)),
+                                                                                               framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
@@ -264,8 +389,9 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 
-FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
-                                                                                             Format::U8)))
+FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel7x7Fixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), datasets::BorderModes()), framework::dataset::make("Format",
+                                                                                                     Format::U8)),
+                                                                                             framework::dataset::make("GradientDimension", GradientDimension::GRAD_XY)))
 {
     // Validate output
     ValidRegion valid_region_x = shape_to_valid_region(_reference.first.shape(), (_border_mode == BorderMode::UNDEFINED), BorderSize(3));
@@ -275,6 +401,7 @@
     validate(CLAccessor(_target.second), _reference.second, valid_region_y);
 }
 TEST_SUITE_END()
+TEST_SUITE_END()
 
 TEST_SUITE_END()
 TEST_SUITE_END()