Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Currently we have multiple macros like DCHECK_EQ and DCHECK_LT which check various comparisons but don't report anything about their operands. Furthermore, the "stream to assertion" pattern for appending extra info has proven fragile. I propose a new unified macro which can capture operands of comparisons and report them:
int three = 3; int five = 5; DCHECK(three == five, "extra: ", 1, 2, five);
Results in check failure messages like:
F1003 11:12:46.174767 4166 logging_test.cc:141] Check failed: three == five LHS: 3 RHS: 5 extra: 125
Attachments
Issue Links
- links to