diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-01-22 16:19:19 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-01-22 16:19:19 +0000 |
commit | 07f4ea4a6d3d64287bc448592fbf37dc6ad1c2fd (patch) | |
tree | c854af4af970b8cf3088a1328f06cfc5a37ddba9 /lib/common/Test.h | |
parent | 40c8d56ebf63f2584f49899e30a1ad950d81a8fd (diff) |
Log disabling of exception logging to help understand test output.
Allow std::ostringstream formatting in expected/actual output comparison.
Diffstat (limited to 'lib/common/Test.h')
-rw-r--r-- | lib/common/Test.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h index 9fb67f95..f318c811 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -55,6 +55,8 @@ extern std::string bbackupd_args, bbstored_args, bbackupquery_args, test_args; { \ bool didthrow = false; \ HideExceptionMessageGuard hide; \ + BOX_TRACE("Exception logging disabled at " __FILE__ ":" \ + << __LINE__); \ try \ { \ statement; \ @@ -91,8 +93,8 @@ extern std::string bbackupd_args, bbstored_args, bbackupquery_args, test_args; \ if(_exp_str != _found_str) \ { \ - printf("Expected <%s> but found <%s>\n", \ - _exp_str.c_str(), _found_str.c_str()); \ + BOX_ERROR("Expected <" << _exp_str << "> but found <" << \ + _found_str << ">"); \ \ std::ostringstream _oss3; \ _oss3 << #_found << " != " << #_expected; \ |