Check that the shape calculation for PAD is correct

Matches a corresponding change to the specification

Change-Id: If70356e0c78c1c88530e5d2f58bc50de864f249a
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
diff --git a/reference_model/src/ops/data_layout.cc b/reference_model/src/ops/data_layout.cc
index 9fe429b..7840450 100644
--- a/reference_model/src/ops/data_layout.cc
+++ b/reference_model/src/ops/data_layout.cc
@@ -169,6 +169,8 @@
         int32_t pad_front = attribute->padding()[2 * i];
         int32_t pad_back  = attribute->padding()[2 * i + 1];
         ERROR_IF((pad_front < 0) || (pad_back < 0), "OpPad: padding can't be smaller than 0");
+        ERROR_IF(out->getShape()[i] != pad_front + in->getShape()[i] + pad_back,
+                 "OpPad: output shape not equal to input plus padding");
         paddings_array[i] = std::make_pair(pad_front, pad_back);
     }