diff options
author | Jack Lloyd <[email protected]> | 2021-05-19 18:59:53 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-05-19 18:59:53 -0400 |
commit | 88e2be0c18b53891b56444368dc335bfa9c33b05 (patch) | |
tree | 541f7b1cdd8fa42150ce1f34749ba60367ae12b7 /src | |
parent | 149e39c6b9460a8be38bddb953d3ad7e99d5a1e2 (diff) |
When a test fails dump all of the keys
Makes debugging a bit easier
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/tests.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 991387264..add0eeb60 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -1093,7 +1093,10 @@ std::vector<Test::Result> Text_Based_Test::run() oss << "Test # " << test_cnt << " "; if(!header.empty()) oss << header << " "; - oss << " failed [" << m_output_key << "=" << vars.get_req_str(m_output_key) << "]"; + oss << "failed "; + + for(auto k: m_required_keys) + oss << k << "=" << vars.get_req_str(k) << " "; result.test_note(oss.str()); } @@ -1105,8 +1108,11 @@ std::vector<Test::Result> Text_Based_Test::run() oss << "Test # " << test_cnt << " "; if(!header.empty()) oss << header << " "; - oss << "[" << m_output_key << "=" << vars.get_req_str(m_output_key) << "]" - << " failed with exception '" << e.what() << "'"; + + for(auto k: m_required_keys) + oss << k << "=" << vars.get_req_str(k) << " "; + + oss << "failed with exception '" << e.what() << "'"; results.push_back(Test::Result::Failure(header_or_name, oss.str())); } |