tagparser/tests/helper.cpp

27 lines
693 B
C++
Raw Permalink Normal View History

2017-05-24 19:33:11 +02:00
#include "./helper.h"
2019-06-10 22:49:11 +02:00
namespace CppUtilities {
2017-08-17 18:40:34 +02:00
2017-05-24 19:33:11 +02:00
/*!
* \brief Prints a TagTextEncoding to enable CPPUNIT_ASSERT_EQUAL for tag values.
*/
2018-03-07 01:17:50 +01:00
std::ostream &operator<<(std::ostream &os, const TagParser::TagTextEncoding &encoding)
2017-05-24 19:33:11 +02:00
{
using namespace TagParser;
2018-03-07 01:17:50 +01:00
switch (encoding) {
2017-05-24 19:33:11 +02:00
case TagTextEncoding::Unspecified:
return os << "unspecified";
case TagTextEncoding::Latin1:
return os << "Latin-1";
case TagTextEncoding::Utf8:
return os << "UTF-8";
case TagTextEncoding::Utf16LittleEndian:
return os << "UTF-16 LE";
case TagTextEncoding::Utf16BigEndian:
return os << "UTF-16 BE";
}
return os;
}
2017-08-17 18:40:34 +02:00
2019-06-12 20:40:45 +02:00
} // namespace CppUtilities