tagparser/tests/helper.cpp

27 lines
660 B
C++
Raw Normal View History

2017-05-24 19:33:11 +02:00
#include "./helper.h"
2017-08-17 18:40:34 +02:00
namespace TestUtilities {
2017-05-24 19:33:11 +02:00
/*!
* \brief Prints a TagTextEncoding to enable CPPUNIT_ASSERT_EQUAL for tag values.
*/
std::ostream &operator <<(std::ostream &os, const Media::TagTextEncoding &encoding)
{
using namespace Media;
switch(encoding) {
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
}