diff options
author | Vincent Richard <[email protected]> | 2014-03-16 08:57:36 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2014-03-16 08:57:36 +0000 |
commit | cfe9c6b1e7f992ad0dbbb6734175c75172543788 (patch) | |
tree | af5f98f786d4a7777fb325fdb7c863ebfcc3cb5a /tests | |
parent | IMAP commands. (diff) | |
download | vmime-cfe9c6b1e7f992ad0dbbb6734175c75172543788.tar.gz vmime-cfe9c6b1e7f992ad0dbbb6734175c75172543788.zip |
Modified IMAP parser constructor to make testing easier.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/net/imap/IMAPParserTest.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/net/imap/IMAPParserTest.cpp b/tests/net/imap/IMAPParserTest.cpp index e598a548..b93e4b58 100644 --- a/tests/net/imap/IMAPParserTest.cpp +++ b/tests/net/imap/IMAPParserTest.cpp @@ -49,8 +49,11 @@ VMIME_TEST_SUITE_BEGIN(IMAPParserTest) "a001 OK Capability completed.\r\n"); vmime::shared_ptr <vmime::net::imap::IMAPParser> parser = - vmime::make_shared <vmime::net::imap::IMAPParser> - (tag, vmime::dynamicCast <vmime::net::socket>(socket), toh); + vmime::make_shared <vmime::net::imap::IMAPParser>(); + + parser->setTag(tag); + parser->setSocket(socket); + parser->setTimeoutHandler(toh); parser->setStrict(false); VASSERT_NO_THROW("non-strict mode", parser->readResponse(/* literalHandler */ NULL)); @@ -87,8 +90,11 @@ VMIME_TEST_SUITE_BEGIN(IMAPParserTest) socket->localSend("+\r\n"); vmime::shared_ptr <vmime::net::imap::IMAPParser> parser = - vmime::make_shared <vmime::net::imap::IMAPParser> - (tag, vmime::dynamicCast <vmime::net::socket>(socket), toh); + vmime::make_shared <vmime::net::imap::IMAPParser>(); + + parser->setTag(tag); + parser->setSocket(socket); + parser->setTimeoutHandler(toh); parser->setStrict(false); VASSERT_NO_THROW("non-strict mode", parser->readResponse()); |