diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-04-23 10:12:39 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-04-23 10:12:39 +0000 |
commit | 372e88d1ebdb946c2a3510ebc7cbb2d4735d0a71 (patch) | |
tree | ba8552c248cdd3052e112540cb649c1adb6bb3fb /lib/common/Test.h | |
parent | 824e99e481f77cbe7819470427cfb5be0fdf1cc8 (diff) |
Allow stream formatting in "line" parameter of TEST_LINE macro.
Diffstat (limited to 'lib/common/Test.h')
-rw-r--r-- | lib/common/Test.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h index 9bc37270..9fb67f95 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -132,7 +132,10 @@ extern std::string bbackupd_args, bbstored_args, bbackupquery_args, test_args; TEST_THAT(_condition); \ if (!(_condition)) \ { \ - printf("Test failed on <%s>\n", _line.c_str()); \ + std::ostringstream _ossl; \ + _ossl << _line; \ + std::string _line_str = _ossl.str(); \ + printf("Test failed on <%s>\n", _line_str.c_str()); \ } bool TestFileExists(const char *Filename); |