COMPMID-948: Add validation to CLL2NormalizeLayer

Change-Id: I452a718a60b81da51cd3e98641fd99c86c4debab
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129451
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
diff --git a/tests/validation/CL/ReductionOperation.cpp b/tests/validation/CL/ReductionOperation.cpp
index 684ed46..a2a5eff 100644
--- a/tests/validation/CL/ReductionOperation.cpp
+++ b/tests/validation/CL/ReductionOperation.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -50,6 +50,36 @@
 TEST_SUITE(CL)
 TEST_SUITE(ReductionOperation)
 
+// *INDENT-OFF*
+// clang-format off
+DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
+    framework::dataset::make("InputInfo",          { TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Mismatching data type input/output
+                                                     TensorInfo(TensorShape(128U, 64U), 2, DataType::F32), // Number of Input channels != 1
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::S16), // DataType != F32
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis >= num_max_dimensions
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis > 0
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32)
+                                                   }),
+    framework::dataset::make("OutputInfo",         { TensorInfo(TensorShape(128U, 64U), 1, DataType::F16),
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32),
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::S16),
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32),
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32),
+                                                     TensorInfo(TensorShape(128U, 64U), 1, DataType::F32)
+                                                   })),
+    framework::dataset::make("Axis",               { 0U, 0U, 0U, static_cast<unsigned int>(TensorShape::num_max_dimensions), 1U, 0U })),
+    framework::dataset::make("Expected",           { false, false, false, false, false, true })),
+    input_info, output_info, axis, expected)
+{
+    bool is_valid = bool(CLReductionOperation::validate(&input_info.clone()->set_is_resizable(false),
+                                                        &output_info.clone()->set_is_resizable(false),
+                                                        axis,
+                                                        ReductionOperation::SUM_SQUARE));
+    ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
+}
+// clang-format on
+// *INDENT-ON*
+
 template <typename T>
 using CLReductionOperationFixture = ReductionOperationValidationFixture<CLTensor, CLAccessor, CLReductionOperation, T>;