aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2023-04-07 16:21:10 +0200
committerLinus Jahn <lnj@kaidan.im>2023-04-07 16:21:10 +0200
commitab4bdf2da41a26f462fe3a333a34e32c999e2a6d (patch)
tree2501bde9b6da885056166c769befa7f7d4729e49 /tests
parentc8e13f6fd3df8dcab0170dda6f54eaf5175d8437 (diff)
parentb44a7ee310bd2c9bc7c0d234ab7a96c501d20559 (diff)
downloadqxmpp-ab4bdf2da41a26f462fe3a333a34e32c999e2a6d.tar.gz
Merge branch '1.5'
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/qxmpphttpuploadmanager/CMakeLists.txt2
-rw-r--r--tests/qxmpprostermanager/tst_qxmpprostermanager.cpp16
-rw-r--r--tests/qxmpptransfermanager/CMakeLists.txt2
-rw-r--r--tests/qxmpputils/CMakeLists.txt2
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e599ec47..ce2ca155 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,9 +9,9 @@ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
macro(add_simple_test TEST_NAME)
add_executable(tst_${TEST_NAME} ${TEST_NAME}/tst_${TEST_NAME}.cpp ${ARGN})
add_test(tst_${TEST_NAME} tst_${TEST_NAME})
- target_link_libraries(tst_${TEST_NAME} Qt${QT_VERSION_MAJOR}::Test qxmpp)
+ target_link_libraries(tst_${TEST_NAME} Qt${QT_VERSION_MAJOR}::Test ${QXMPP_TARGET})
if(BUILD_OMEMO)
- target_link_libraries(tst_${TEST_NAME} QXmppOmemo)
+ target_link_libraries(tst_${TEST_NAME} ${QXMPPOMEMO_TARGET})
endif()
endmacro()
diff --git a/tests/qxmpphttpuploadmanager/CMakeLists.txt b/tests/qxmpphttpuploadmanager/CMakeLists.txt
index ceb88b1d..3858a7e7 100644
--- a/tests/qxmpphttpuploadmanager/CMakeLists.txt
+++ b/tests/qxmpphttpuploadmanager/CMakeLists.txt
@@ -5,4 +5,4 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(tst_qxmpphttpuploadmanager tst_qxmpphttpuploadmanager.cpp tst_qxmpphttpuploadmanager.qrc ../TestClient.h)
add_test(tst_qxmpphttpuploadmanager tst_qxmpphttpuploadmanager)
-target_link_libraries(tst_qxmpphttpuploadmanager Qt${QT_VERSION_MAJOR}::Test qxmpp)
+target_link_libraries(tst_qxmpphttpuploadmanager Qt${QT_VERSION_MAJOR}::Test ${QXMPP_TARGET})
diff --git a/tests/qxmpprostermanager/tst_qxmpprostermanager.cpp b/tests/qxmpprostermanager/tst_qxmpprostermanager.cpp
index 13cd3cb7..fdeb664b 100644
--- a/tests/qxmpprostermanager/tst_qxmpprostermanager.cpp
+++ b/tests/qxmpprostermanager/tst_qxmpprostermanager.cpp
@@ -117,14 +117,14 @@ void tst_QXmppRosterManager::testAddItem()
auto *rosterManager = test.addNewExtension<QXmppRosterManager>(&test);
auto future = rosterManager->addRosterItem("contact@example.org");
- test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org'/></query></iq>");
- test.inject<QString>("<iq id='qxmpp1' from='capulet.lit' type='result'/>");
+ test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org'/></query></iq>");
+ test.inject<QString>("<iq id='qxmpp1' type='result'/>");
expectFutureVariant<QXmpp::Success>(future);
future = rosterManager->addRosterItem("contact@example.org");
- test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org'/></query></iq>");
+ test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org'/></query></iq>");
test.inject<QString>(R"(
-<iq id='qxmpp1' from='capulet.lit' type='error'>
+<iq id='qxmpp1' type='error'>
<error type='modify'>
<not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>This is not allowed</text>
@@ -143,14 +143,14 @@ void tst_QXmppRosterManager::testRemoveItem()
auto *rosterManager = test.addNewExtension<QXmppRosterManager>(&test);
auto future = rosterManager->removeRosterItem("contact@example.org");
- test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org' subscription='remove'/></query></iq>");
- test.inject<QString>("<iq id='qxmpp1' from='capulet.lit' type='result'/>");
+ test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org' subscription='remove'/></query></iq>");
+ test.inject<QString>("<iq id='qxmpp1' type='result'/>");
expectFutureVariant<QXmpp::Success>(future);
future = rosterManager->removeRosterItem("contact@example.org");
- test.expect("<iq id='qxmpp1' to='capulet.lit' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org' subscription='remove'/></query></iq>");
+ test.expect("<iq id='qxmpp1' type='set'><query xmlns='jabber:iq:roster'><item jid='contact@example.org' subscription='remove'/></query></iq>");
test.inject<QString>(R"(
-<iq id='qxmpp1' from='capulet.lit' type='error'>
+<iq id='qxmpp1' type='error'>
<error type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Not found</text>
diff --git a/tests/qxmpptransfermanager/CMakeLists.txt b/tests/qxmpptransfermanager/CMakeLists.txt
index 2c9f4000..bb512489 100644
--- a/tests/qxmpptransfermanager/CMakeLists.txt
+++ b/tests/qxmpptransfermanager/CMakeLists.txt
@@ -5,4 +5,4 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(tst_qxmpptransfermanager tst_qxmpptransfermanager.cpp tst_qxmpptransfermanager.qrc)
add_test(tst_qxmpptransfermanager tst_qxmpptransfermanager)
-target_link_libraries(tst_qxmpptransfermanager Qt${QT_VERSION_MAJOR}::Test qxmpp)
+target_link_libraries(tst_qxmpptransfermanager Qt${QT_VERSION_MAJOR}::Test ${QXMPP_TARGET})
diff --git a/tests/qxmpputils/CMakeLists.txt b/tests/qxmpputils/CMakeLists.txt
index 9ea884c6..c2337834 100644
--- a/tests/qxmpputils/CMakeLists.txt
+++ b/tests/qxmpputils/CMakeLists.txt
@@ -5,4 +5,4 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(tst_qxmpputils tst_qxmpputils.cpp tst_qxmpputils.qrc)
add_test(tst_qxmpputils tst_qxmpputils)
-target_link_libraries(tst_qxmpputils Qt${QT_VERSION_MAJOR}::Test qxmpp)
+target_link_libraries(tst_qxmpputils Qt${QT_VERSION_MAJOR}::Test ${QXMPP_TARGET})