[Box Backup-commit] COMMIT r2540 - box/trunk/lib/common
boxbackup-dev@boxbackup.org
boxbackup-dev@boxbackup.org
Sun, 28 Jun 2009 20:26:19 +0100 (BST)
Author: chris
Date: 2009-06-28 20:26:19 +0100 (Sun, 28 Jun 2009)
New Revision: 2540
Modified:
box/trunk/lib/common/Test.h
Log:
Allow std::ostringstream formatting on the "line" part of
TEST_EQUAL_LINE, so that it can be used to report object IDs for
example.
Modified: box/trunk/lib/common/Test.h
===================================================================
--- box/trunk/lib/common/Test.h 2009-06-28 19:25:25 UTC (rev 2539)
+++ box/trunk/lib/common/Test.h 2009-06-28 19:26:19 UTC (rev 2540)
@@ -113,7 +113,9 @@
\
if(_exp_str != _found_str) \
{ \
- std::string _line_str = _line; \
+ std::ostringstream _ossl; \
+ _ossl << _line; \
+ std::string _line_str = _ossl.str(); \
printf("Expected <%s> but found <%s> in <%s>\n", \
_exp_str.c_str(), _found_str.c_str(), _line_str.c_str()); \
\