mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Add __LINE__ to test assert failed messages
This commit is contained in:
parent
bd90cc4786
commit
9bbebe5fdd
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user