diff --git a/include/eigen-checks/internal/gtest-equal.h b/include/eigen-checks/internal/gtest-equal.h index b044ad9..8f486f1 100644 --- a/include/eigen-checks/internal/gtest-equal.h +++ b/include/eigen-checks/internal/gtest-equal.h @@ -29,6 +29,8 @@ ::testing::AssertionResult MatricesNear( failure_reason << "The matrices have a different number of cols: " << name_lhs << " has " << lhs.cols() << " cols while " << name_rhs << " cols " << rhs.cols() << " cols." << std::endl; + failure_reason << name_lhs << ":\n" << lhs << std::endl; + failure_reason << name_rhs << ":\n" << rhs << std::endl; return failure_reason; } @@ -69,6 +71,9 @@ ::testing::AssertionResult MatricesNear( } } } + failure_reason << name_lhs << ":\n" << lhs << std::endl; + failure_reason << name_rhs << ":\n" << rhs << std::endl; + failure_reason << "Difference:\n" << (lhs - rhs) << std::endl; return failure_reason; } }