aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 20:11:55 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 20:11:55 +0000
commit7b72a5fd69987f11604717add132e490a94c8ad7 (patch)
tree15671704e9b549ffec4594cd7ad8f7ed8b6d30af
parent82ba4c4cee69598a8d0ee97ed7ceb14c7504dbda (diff)
downloadpaludis-7b72a5fd69987f11604717add132e490a94c8ad7.tar.gz
paludis-7b72a5fd69987f11604717add132e490a94c8ad7.tar.xz
Change the output for failed tests to produce 'filename:line: message' on a line of its own so that Vim quickfix can parse and locate errors without assistance.
-rw-r--r--test/test_framework.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_framework.cc b/test/test_framework.cc
index ed03958..a7234fe 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -125,8 +125,9 @@ TestCase::name() const
TestFailedException::TestFailedException(const char * const function, const char * const file,
const long line, const std::string & message) throw () :
- _message(message + " (in " + function + " at " + file + " line " + paludis::stringify(line) + ")"
- + (TestMessageSuffix::suffixes().empty() ? std::string("") : " [context: " +
+ _message(paludis::stringify(file) + ":" + paludis::stringify(line) + ": in " +
+ paludis::stringify(function) + ": " + message + (
+ TestMessageSuffix::suffixes().empty() ? std::string("") : " [context: " +
TestMessageSuffix::suffixes() + "]"))
{
}
@@ -173,7 +174,8 @@ class RunTest
}
catch (std::exception &e)
{
- std::cout << "!{" << exception_to_debug_string(e) << "} " << std::flush;
+ std::cout << "!{" << std::endl << exception_to_debug_string(e) <<
+ std::endl << " } " << std::flush;
had_local_failure = true;
*_had_a_failure = true;
}