aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/htmlTextPartTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parser/htmlTextPartTest.cpp')
-rw-r--r--tests/parser/htmlTextPartTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/parser/htmlTextPartTest.cpp b/tests/parser/htmlTextPartTest.cpp
index 3f9a718e..6276db26 100644
--- a/tests/parser/htmlTextPartTest.cpp
+++ b/tests/parser/htmlTextPartTest.cpp
@@ -81,6 +81,10 @@ VMIME_TEST_SUITE_BEGIN
vmime::ref <vmime::message> msg = vmime::create <vmime::message>();
msg->parse(msgString);
+ // Sanity checks
+ VASSERT_EQ("part-count1", 2, msg->getBody()->getPartCount());
+ VASSERT_EQ("part-count2", 2, msg->getBody()->getPartAt(1)->getBody()->getPartCount());
+
vmime::htmlTextPart htmlPart;
htmlPart.parse(msg, msg->getBody()->getPartAt(1),
msg->getBody()->getPartAt(1)->getBody()->getPartAt(0));
@@ -132,6 +136,10 @@ VMIME_TEST_SUITE_BEGIN
vmime::ref <vmime::message> msg = vmime::create <vmime::message>();
msg->parse(msgString);
+ // Sanity checks
+ VASSERT_EQ("part-count1", 2, msg->getBody()->getPartCount());
+ VASSERT_EQ("part-count2", 3, msg->getBody()->getPartAt(1)->getBody()->getPartCount());
+
vmime::htmlTextPart htmlPart;
htmlPart.parse(msg, msg->getBody()->getPartAt(1),
msg->getBody()->getPartAt(1)->getBody()->getPartAt(1));
@@ -198,6 +206,10 @@ VMIME_TEST_SUITE_BEGIN
vmime::ref <vmime::message> msg = vmime::create <vmime::message>();
msg->parse(msgString);
+ // Sanity checks
+ VASSERT_EQ("part-count1", 2, msg->getBody()->getPartCount());
+ VASSERT_EQ("part-count2", 2, msg->getBody()->getPartAt(1)->getBody()->getPartCount());
+
vmime::htmlTextPart htmlPart;
htmlPart.parse(msg, msg->getBody()->getPartAt(1),
msg->getBody()->getPartAt(1)->getBody()->getPartAt(1));