diff --git a/kernels/test/op_fill_test.cpp b/kernels/test/op_fill_test.cpp index 711d1b6d71e..c1c50206152 100644 --- a/kernels/test/op_fill_test.cpp +++ b/kernels/test/op_fill_test.cpp @@ -168,27 +168,4 @@ TEST_F(OpFillTest, MismatchedOutputDtypeDies) { ET_EXPECT_KERNEL_FAILURE(context_, op_fill_scalar_out(self, 0.0, out)); } -TEST_F(OpFillTest, ByteTensorTooLargeScalarDies) { - // Cannot be represented by a uint8_t. - expect_bad_scalar_value_dies(256); -} - -TEST_F(OpFillTest, CharTensorTooSmallScalarDies) { - // Cannot be represented by a int8_t. - expect_bad_scalar_value_dies(-129); -} - -TEST_F(OpFillTest, ShortTensorTooLargeScalarDies) { - // Cannot be represented by a int16_t. - expect_bad_scalar_value_dies(32768); -} - -TEST_F(OpFillTest, FloatTensorTooSmallScalarDies) { - // Cannot be represented by a float. - expect_bad_scalar_value_dies(-3.41e+38); -} - -TEST_F(OpFillTest, FloatTensorTooLargeScalarDies) { - // Cannot be represented by a float. - expect_bad_scalar_value_dies(3.41e+38); -} +GENERATE_SCALAR_OVERFLOW_TESTS(OpFillTest)