diff options
author | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
commit | f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch) | |
tree | 2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /tests/parser/mailboxTest.cpp | |
parent | Per-protocol include files. (diff) | |
download | vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip |
Boost/C++11 shared pointers.
Diffstat (limited to 'tests/parser/mailboxTest.cpp')
-rw-r--r-- | tests/parser/mailboxTest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/parser/mailboxTest.cpp b/tests/parser/mailboxTest.cpp index e6e4a608..6bf6670c 100644 --- a/tests/parser/mailboxTest.cpp +++ b/tests/parser/mailboxTest.cpp @@ -119,7 +119,8 @@ VMIME_TEST_SUITE_BEGIN(mailboxTest) VASSERT_EQ("count", 1, addrList.getAddressCount()); VASSERT_EQ("!group", false, addrList.getAddressAt(0)->isGroup()); - vmime::ref <vmime::mailbox> mbox = addrList.getAddressAt(0).dynamicCast <vmime::mailbox>(); + vmime::shared_ptr <vmime::mailbox> mbox = + vmime::dynamicCast <vmime::mailbox>(addrList.getAddressAt(0)); VASSERT_EQ("name", "Full Name", mbox->getName()); VASSERT_EQ("email", "", mbox->getEmail()); @@ -132,8 +133,10 @@ VMIME_TEST_SUITE_BEGIN(mailboxTest) VASSERT_EQ("count", 2, addrList.getAddressCount()); - vmime::ref <vmime::mailbox> mbox1 = addrList.getAddressAt(0).dynamicCast <vmime::mailbox>(); - vmime::ref <vmime::mailbox> mbox2 = addrList.getAddressAt(1).dynamicCast <vmime::mailbox>(); + vmime::shared_ptr <vmime::mailbox> mbox1 = + vmime::dynamicCast <vmime::mailbox>(addrList.getAddressAt(0)); + vmime::shared_ptr <vmime::mailbox> mbox2 = + vmime::dynamicCast <vmime::mailbox>(addrList.getAddressAt(1)); VASSERT_EQ("name1", vmime::text(), mbox1->getName()); VASSERT_EQ("email1", "[email protected]", mbox1->getEmail()); |