message: Include index to error message make it debugable.
diff: @@ -150,6 +150,39 @@ inline void ExpectEqual<complex128>(const complex128& a, const complex128& b) {
  EXPECT_DOUBLE_EQ(a.imag(), b.imag()) << a << " vs. " << b;
  }
  +template <typename T>
  +inline void ExpectEqual(const T& a, const T& b, int index) {
  + EXPECT_EQ(a, b) << " at index " << index;
  +}
  +
  +template <>
  +inline void ExpectEqual<float>(const float& a, const float& b, int index) {
  + EXPECT_FLOAT_EQ(a, b) << " at index " << index;
  +}
  +
  +template <>
  +inline void ExpectEqual<double>(const double& a, const double& b, int index) {
  + EXPECT_DOUBLE_EQ(a, b) << " at index " << index;
  +}
  +
  +template <>
  +inline void ExpectEqual<complex64>(const complex64& a, const complex64& b,
  + int index) {
  + EXPECT_FLOAT_EQ(a.real(), b.real())
  + << a << " vs. " << b << " at index " << index;
  + EXPECT_FLOAT_EQ(a.imag(), b.imag())
  + << a << " vs. " << b << " at index " << index;
  +}
  +
  +template <>
  +inline void ExpectEqual<complex128>(const complex128& a, const complex128& b,
  + int index) {
  + EXPECT_DOUBLE_EQ(a.real(), b.real())
  + << a << " vs. " << b << " at index " << index;
  + EXPECT_DOUBLE_EQ(a.imag(), b.imag())
  + << a << " vs. " << b << " at index " << index;
  +}
  +
  inline void AssertSameTypeDims(const Tensor& x, const Tensor& y) {
  ASSERT_EQ(x.dtype(), y.dtype());
  ASSERT_TRUE(x.IsSameSize(y))
  