diff options
author | Nupur Garg <nupurgarg@google.com> | 2018-01-30 15:11:33 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-30 15:19:19 -0800 |
commit | e7df91c5f65e8b10535d1a09c817aa4e900e4001 (patch) | |
tree | 2e3bab64177efcc8ac566cc20afac2904bf88d22 /tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc | |
parent | ac7167794f7c22d42c14a8d2f47b9533e118d73f (diff) |
Internal change.
PiperOrigin-RevId: 183900332
Diffstat (limited to 'tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc')
-rw-r--r-- | tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc b/tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc index c9152bf967..8485cde1b4 100644 --- a/tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc +++ b/tensorflow/contrib/lite/kernels/batch_to_space_nd_test.cc @@ -119,6 +119,19 @@ TEST(BatchToSpaceNDOpTest, InvalidShapeTest) { "Cannot allocate tensors"); } +TEST(BatchToSpaceNDOpTest, InvalidCropsConstTest) { + EXPECT_DEATH(BatchToSpaceNDOpConstModel({3, 2, 2, 1}, {2, 2}, {0, 0, 0, 1}), + "1 != 0"); +} + +TEST(BatchToSpaceNDOpTest, InvalidCropsDynamicTest) { + BatchToSpaceNDOpDynamicModel m({4, 2, 2, 1}); + m.SetInput({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); + m.SetBlockShape({2, 2}); + m.SetCrops({0, 0, 1, 0}); + EXPECT_DEATH(m.Invoke(), "1 != 0"); +} + } // namespace } // namespace tflite |