aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testUtils.hpp')
-rw-r--r--tests/testUtils.hpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/testUtils.hpp b/tests/testUtils.hpp
index 55c0424e..39d9e555 100644
--- a/tests/testUtils.hpp
+++ b/tests/testUtils.hpp
@@ -107,6 +107,13 @@ inline std::ostream& operator<<(std::ostream& os, const vmime::charset& ch)
}
+inline std::ostream& operator<<(std::ostream& os, const vmime::word& w)
+{
+ os << "[word: charset=" << w.getCharset().getName() << ", buffer=" << w.getBuffer() << "]";
+ return (os);
+}
+
+
inline std::ostream& operator<<(std::ostream& os, const vmime::text& txt)
{
os << "[text: [";
@@ -118,7 +125,7 @@ inline std::ostream& operator<<(std::ostream& os, const vmime::text& txt)
if (i != 0)
os << ",";
- os << "[word: charset=" << w.getCharset().getName() << ", buffer=" << w.getBuffer() << "]";
+ os << w;
}
os << "]]";
@@ -127,6 +134,14 @@ inline std::ostream& operator<<(std::ostream& os, const vmime::text& txt)
}
+inline std::ostream& operator<<(std::ostream& os, const vmime::emailAddress& email)
+{
+ os << email.generate();
+
+ return (os);
+}
+
+
inline std::ostream& operator<<(std::ostream& os, const vmime::mailbox& mbox)
{
os << "[mailbox: name=" << mbox.getName() << ", email=" << mbox.getEmail() << "]";