From 8d91886b14eba71bbfecfdbb94ec2b057474e73b Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 11 Mar 2018 22:24:57 +0100 Subject: [PATCH] Improve test output for TagValues --- tests/helper.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/helper.h b/tests/helper.h index b549090..7f4e59f 100644 --- a/tests/helper.h +++ b/tests/helper.h @@ -16,7 +16,11 @@ std::ostream &operator<<(std::ostream &os, const TagParser::TagTextEncoding &enc */ inline std::ostream &operator<<(std::ostream &os, const TagParser::TagValue &tagValue) { - return os << tagValue.toString(TagParser::TagTextEncoding::Utf8) << " (encoding: " << tagValue.dataEncoding() << ")"; + os << tagValue.toString(TagParser::TagTextEncoding::Utf8); + if (!tagValue.description().empty()) { + os << ", description: " << tagValue.description(); + } + return os << " (encoding: " << tagValue.dataEncoding() << ", description encoding: " << tagValue.descriptionEncoding() << ')'; } /*!