summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-06-28 19:26:19 +0000
committerChris Wilson <chris+github@qwirx.com>2009-06-28 19:26:19 +0000
commit88aa4bf2dbeac3fae8d0ad9e59ceefa83382d236 (patch)
treee578eabb5e284a01ece5800a04403f4a419b301c /lib
parentb825423ed5c17f244047bddaeaa6cbbb4742ce1a (diff)
Allow std::ostringstream formatting on the "line" part of
TEST_EQUAL_LINE, so that it can be used to report object IDs for example.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/Test.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h
index db93a21e..f96280c2 100644
--- a/lib/common/Test.h
+++ b/lib/common/Test.h
@@ -113,7 +113,9 @@ extern std::string bbackupd_args, bbstored_args, bbackupquery_args, test_args;
\
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()); \
\