Commit cf4c6b70 by Jamie Madill Committed by Commit Bot

Print current file in ASSERT macro failures.

Bug: angleproject:3436 Change-Id: If912ae75c96c34b27967f592910c2ee3403b24cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1602178Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 064b1625
......@@ -275,10 +275,10 @@ std::ostream &FmtHex(std::ostream &os, T value)
// A macro asserting a condition and outputting failures to the debug log
#if defined(ANGLE_ENABLE_ASSERTS)
# define ASSERT(expression) \
(expression ? static_cast<void>(0) \
: (FATAL() << "\t! Assert failed in " << __FUNCTION__ << "(" << __LINE__ \
<< "): " << #expression))
# define ASSERT(expression) \
(expression ? static_cast<void>(0) \
: (FATAL() << "\t! Assert failed in " << __FUNCTION__ << " (" << __FILE__ \
<< ":" << __LINE__ << "): " << #expression))
#else
# define ASSERT(condition) ANGLE_EAT_STREAM_PARAMETERS << !(condition)
#endif // defined(ANGLE_ENABLE_ASSERTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment