aboutsummaryrefslogtreecommitdiffstats
path: root/tests/net/smtp/SMTPCommandSetTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
committerVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
commitf9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch)
tree2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /tests/net/smtp/SMTPCommandSetTest.cpp
parentPer-protocol include files. (diff)
downloadvmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz
vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip
Boost/C++11 shared pointers.
Diffstat (limited to 'tests/net/smtp/SMTPCommandSetTest.cpp')
-rw-r--r--tests/net/smtp/SMTPCommandSetTest.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/net/smtp/SMTPCommandSetTest.cpp b/tests/net/smtp/SMTPCommandSetTest.cpp
index 0cf4b03b..af250078 100644
--- a/tests/net/smtp/SMTPCommandSetTest.cpp
+++ b/tests/net/smtp/SMTPCommandSetTest.cpp
@@ -46,7 +46,7 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testCreate()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
VASSERT_NOT_NULL("Not null", cset);
VASSERT_FALSE("Finished", cset->isFinished());
@@ -54,7 +54,7 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testCreatePipeline()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
VASSERT_NOT_NULL("Not null", cset);
VASSERT_FALSE("Finished", cset->isFinished());
@@ -62,14 +62,14 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testAddCommand()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
VASSERT_NO_THROW("No throw 1", cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1")));
VASSERT_EQ("Text", "MY_COMMAND1\r\n", cset->getText());
VASSERT_NO_THROW("No throw 2", cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2")));
VASSERT_EQ("Text", "MY_COMMAND1\r\nMY_COMMAND2\r\n", cset->getText());
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
cset->writeToSocket(sok);
VASSERT_FALSE("Finished", cset->isFinished());
@@ -83,14 +83,14 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testAddCommandPipeline()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
VASSERT_NO_THROW("No throw 1", cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1")));
VASSERT_EQ("Text", "MY_COMMAND1\r\n", cset->getText());
VASSERT_NO_THROW("No throw 2", cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2")));
VASSERT_EQ("Text", "MY_COMMAND1\r\nMY_COMMAND2\r\n", cset->getText());
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
vmime::string response;
cset->writeToSocket(sok);
@@ -105,12 +105,12 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testWriteToSocket()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1"));
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2"));
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
vmime::string response;
cset->writeToSocket(sok);
@@ -126,12 +126,12 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testWriteToSocketPipeline()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1"));
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2"));
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
vmime::string response;
cset->writeToSocket(sok);
@@ -142,12 +142,12 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testGetLastCommandSent()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ false);
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1"));
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2"));
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
cset->writeToSocket(sok);
VASSERT_EQ("Cmd 1", "MY_COMMAND1", cset->getLastCommandSent()->getText());
@@ -158,12 +158,12 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandSetTest)
void testGetLastCommandSentPipeline()
{
- vmime::ref <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
+ vmime::shared_ptr <SMTPCommandSet> cset = SMTPCommandSet::create(/* pipelining */ true);
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND1"));
cset->addCommand(SMTPCommand::createCommand("MY_COMMAND2"));
- vmime::ref <testSocket> sok = vmime::create <testSocket>();
+ vmime::shared_ptr <testSocket> sok = vmime::make_shared <testSocket>();
cset->writeToSocket(sok);
VASSERT_EQ("Cmd 1", "MY_COMMAND1", cset->getLastCommandSent()->getText());