message: Enhanced Operator overriding Eager testcase
  Modified the testcase to verify operator overriding
  with negative inputs.
diff: @@ -164,31 +164,35 @@ class OpsTest(test_util.TensorFlowTestCase):
  self.assertAllEqual(3, three_x)
  def testOperatorOverrides(self):
  - # TODO(henrytan): test with negative number.
  - a = constant_op.constant([1])
  - b = constant_op.constant([2])
  -
  - self.assertAllEqual((-a), [-1])
  - self.assertAllEqual(abs(b), [2])
  -
  - self.assertAllEqual((a + b), [3])
  - self.assertAllEqual((a - b), [-1])
  - self.assertAllEqual((a * b), [2])
  - self.assertAllEqual((a * a), [1])
  -
  - self.assertAllEqual((a**b), [1])
  - self.assertAllEqual((a / b), [1 / 2])
  - self.assertAllEqual((a / a), [1])
  - self.assertAllEqual((a % b), [1])
  -
  - self.assertAllEqual((a < b), [True])
  - self.assertAllEqual((a <= b), [True])
  - self.assertAllEqual((a > b), [False])
  - self.assertAllEqual((a >= b), [False])
  - self.assertAllEqual((a == b), False)
  - self.assertAllEqual((a != b), True)
  -
  - self.assertAllEqual(1, a[constant_op.constant(0)])
  + def _testOperations(v1, v2):
  + a = constant_op.constant(v1)
  + b = constant_op.constant(v2)
  +
  + self.assertAllEqual((-a), np.negative(v1))
  + self.assertAllEqual(abs(b), np.absolute(v2))
  +
  + self.assertAllEqual((a + b), np.add(v1, v2))
  + self.assertAllEqual((a - b), np.subtract(v1, v2))
  + self.assertAllEqual((a * b), np.multiply(v1, v2))
  + self.assertAllEqual((a * a), np.multiply(v1, v1))
  +
  + if all(x >= 0 for x in v2):
  + self.assertAllEqual((a**b), np.power(v1, v2))
  + self.assertAllEqual((a / b), np.divide(v1, v2))
  +
  + self.assertAllEqual((a / a), np.divide(v1, v1))
  + self.assertAllEqual((a % b), np.mod(v1, v2))
  +
  + self.assertAllEqual((a < b), np.less(v1, v2))
  + self.assertAllEqual((a <= b), np.less_equal(v1, v2))
  + self.assertAllEqual((a > b), np.greater(v1, v2))
  + self.assertAllEqual((a >= b), np.greater_equal(v1, v2))
  + self.assertAllEqual((a == b), np.equal(v1, v2)[0])
  + self.assertAllEqual((a != b), np.not_equal(v1, v2)[0])
  + self.assertAllEqual(v1[0], a[constant_op.constant(0)])
  +
  + _testOperations([1, 4, 8], [2, 3, 5])
  + _testOperations([1, -4, -5], [-2, 3, -6])
  def test_basic_slice(self):
  npt = np.arange(1, 19, dtype=np.float32).reshape(3, 2, 3)
  