mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-20 11:10:23 -06:00
Include potential explanation when stringifying TestResult Offense
This commit is contained in:
@@ -91,7 +91,14 @@ std::string to_string(const openspace::documentation::TestResult& value) {
|
||||
|
||||
template <>
|
||||
std::string to_string(const openspace::documentation::TestResult::Offense& value) {
|
||||
return value.offender + ": " + ghoul::to_string(value.reason);
|
||||
std::stringstream stream;
|
||||
stream << value.offender + ": " + ghoul::to_string(value.reason);
|
||||
|
||||
if (!value.explanation.empty()) {
|
||||
stream << fmt::format(" ({})", value.explanation);
|
||||
}
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user