diff --git a/tests/libtransport/userregistration.cpp b/tests/libtransport/userregistration.cpp index af71aee82440f9a429af9b7d237a44b409ceeee7..d62cf6da6a26fcffbc6ff3f5ebe5f6db4b0343b7 100644 --- a/tests/libtransport/userregistration.cpp +++ b/tests/libtransport/userregistration.cpp @@ -13,7 +13,7 @@ using namespace Transport; #if !HAVE_SWIFTEN_3 -#define value_or(X) substr() +#define get_value_or(X) substr() #endif class UserRegistrationTest : public CPPUNIT_NS :: TestFixture, public BasicTest { @@ -204,7 +204,7 @@ class UserRegistrationTest : public CPPUNIT_NS :: TestFixture, public BasicTest CPPUNIT_ASSERT_EQUAL(std::string("localhost"), getStanza(received[0])->getPayload()->getItems()[0].getJID().toString()); CPPUNIT_ASSERT(dynamic_cast(getStanza(received[1]))); - CPPUNIT_ASSERT_EQUAL(std::string("registered: user@localhost"), dynamic_cast(getStanza(received[1]))->getBody().value_or("")); + CPPUNIT_ASSERT_EQUAL(std::string("registered: user@localhost"), dynamic_cast(getStanza(received[1]))->getBody().get_value_or("")); UserInfo user; CPPUNIT_ASSERT_EQUAL(true, storage->getUser("user@localhost", user)); @@ -242,7 +242,7 @@ class UserRegistrationTest : public CPPUNIT_NS :: TestFixture, public BasicTest CPPUNIT_ASSERT(getStanza(received[0])->getPayload()); CPPUNIT_ASSERT(dynamic_cast(getStanza(received[1]))); - CPPUNIT_ASSERT_EQUAL(std::string("unregistered: user@localhost"), dynamic_cast(getStanza(received[1]))->getBody().value_or("")); + CPPUNIT_ASSERT_EQUAL(std::string("unregistered: user@localhost"), dynamic_cast(getStanza(received[1]))->getBody().get_value_or("")); UserInfo user;