diff --git a/tests/helpers/assertions.hpp b/tests/helpers/assertions.hpp index 86c9b23a..8be904d3 100644 --- a/tests/helpers/assertions.hpp +++ b/tests/helpers/assertions.hpp @@ -20,7 +20,8 @@ catch (...) \ { \ } \ - throw xlnt::exception("assert failed -> " XLNT_STRINGIFY(expression)); \ + throw xlnt::exception( \ + "assert failed at L:" XLNT_STRINGIFY(__LINE__) "\n" XLNT_STRINGIFY(expression)); \ } while (false) #define xlnt_assert_throws_nothing(expression) \ @@ -34,7 +35,7 @@ catch (...) \ { \ } \ - throw xlnt::exception("assert throws nothing failed -> " XLNT_STRINGIFY(expression)); \ + throw xlnt::exception("assert throws nothing failed at L:" XLNT_STRINGIFY(__LINE__) "\n" XLNT_STRINGIFY(expression)); \ } while (false) #define xlnt_assert_throws(expression, exception_type) \ @@ -51,7 +52,7 @@ catch (...) \ { \ } \ - throw xlnt::exception("assert throws failed -> " XLNT_STRINGIFY(expression)); \ + throw xlnt::exception("assert throws failed at L:" XLNT_STRINGIFY(__LINE__) "\n" XLNT_STRINGIFY(expression)); \ } while (false) #define xlnt_assert_equals(left, right) xlnt_assert((left) == (right))