summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Vuorela <pvuorela@iki.fi>2025-11-18 15:55:10 +0200
committerPekka Vuorela <pvuorela@iki.fi>2025-11-19 12:16:28 +0200
commit3dcb14587ce0f84f3cb89f59111176aa5f798cc1 (patch)
tree9c2edc732977b3f4076010035e502ab83b272d1a
parent4d64d0632bbfc4ff8df1e74e590eb90e25ae710a (diff)
Rename tst_locks as tst_qmailaccountkey to match content
Not much locking here. There used to be one locking test case but the class got removed as unused in 2014, commit 7a314eb53ac. Change-Id: Ifc41ca6db63aab2291cbc4efa6c4d306fbf9a17e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/qt5/tests.xml14
-rw-r--r--tests/tests.pro2
-rw-r--r--tests/tests.xml14
-rw-r--r--tests/tst_locks/CMakeLists.txt12
-rw-r--r--tests/tst_locks/tst_locks.pro7
-rw-r--r--tests/tst_qmailaccountkey/CMakeLists.txt12
-rw-r--r--tests/tst_qmailaccountkey/tst_qmailaccountkey.cpp (renamed from tests/tst_locks/tst_locks.cpp)42
-rw-r--r--tests/tst_qmailaccountkey/tst_qmailaccountkey.pro7
9 files changed, 41 insertions, 71 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e940699e..0ca6ddb0 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,10 +1,10 @@
# hack a directory that can act like plugin root with the common prefix
execute_process(COMMAND ln -s ${CMAKE_BINARY_DIR}/src/plugins ${CMAKE_BINARY_DIR}/src/plugins/messagingframework)
-add_subdirectory(tst_locks)
add_subdirectory(tst_longstream)
add_subdirectory(tst_longstring)
add_subdirectory(tst_python_email)
+add_subdirectory(tst_qmailaccountkey)
add_subdirectory(tst_qmail_listmodels)
add_subdirectory(tst_qmail_sortkeys)
add_subdirectory(tst_qmailaccountconfiguration)
diff --git a/tests/qt5/tests.xml b/tests/qt5/tests.xml
index 7147903c..8cef2ad7 100644
--- a/tests/qt5/tests.xml
+++ b/tests/qt5/tests.xml
@@ -1003,15 +1003,11 @@
<hardware>true</hardware>
</environments>
</set>
- <set name="_usr_tests_qmf_tst_locks">
- <description>libqmf-tests:tst_locks</description>
- <case name="tst_locks-testLock">
- <description>libqmf-tests:tst_locks:testLock</description>
- <step>/usr/tests/qmf-qt5/tst_locks testLock</step>
- </case>
- <case name="tst_locks-testQMailAccountKey">
- <description>libqmf-tests:tst_locks:testQMailAccountKey</description>
- <step>/usr/tests/qmf-qt5/tst_locks testQMailAccountKey</step>
+ <set name="_usr_tests_qmf_tst_qmailaccountkey">
+ <description>libqmf-tests:tst_qmailaccountkey</description>
+ <case name="tst_qmailaccountkey-testQMailAccountKey">
+ <description>libqmf-tests:tst_qmailaccountkey:testQMailAccountKey</description>
+ <step>/usr/tests/qmf-qt5/tst_qmailaccountkey testQMailAccountKey</step>
</case>
<environments>
<scratchbox>true</scratchbox>
diff --git a/tests/tests.pro b/tests/tests.pro
index ffce10c6..a6b36e3f 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -19,7 +19,7 @@ SUBDIRS = \
tst_qmail_listmodels \
tst_storagemanager \
tst_qmaildisconnected \
- tst_locks \
+ tst_qmailaccountkey \
tst_qmailthread \
tst_pop \
tst_imap \
diff --git a/tests/tests.xml b/tests/tests.xml
index c71d091c..f94ad56b 100644
--- a/tests/tests.xml
+++ b/tests/tests.xml
@@ -1003,15 +1003,11 @@
<hardware>true</hardware>
</environments>
</set>
- <set name="_usr_tests_qmf_tst_locks">
- <description>libqmf-tests:tst_locks</description>
- <case name="tst_locks-testLock">
- <description>libqmf-tests:tst_locks:testLock</description>
- <step>/usr/tests/qmf/tst_locks testLock</step>
- </case>
- <case name="tst_locks-testQMailAccountKey">
- <description>libqmf-tests:tst_locks:testQMailAccountKey</description>
- <step>/usr/tests/qmf/tst_locks testQMailAccountKey</step>
+ <set name="_usr_tests_qmf_tst_qmailaccountkey">
+ <description>libqmf-tests:tst_qmailaccountkey</description>
+ <case name="tst_qmailaccountkey-testQMailAccountKey">
+ <description>libqmf-tests:tst_qmailaccountkey:testQMailAccountKey</description>
+ <step>/usr/tests/qmf/tst_qmailaccountkey testQMailAccountKey</step>
</case>
<environments>
<scratchbox>true</scratchbox>
diff --git a/tests/tst_locks/CMakeLists.txt b/tests/tst_locks/CMakeLists.txt
deleted file mode 100644
index 43689e3f..00000000
--- a/tests/tst_locks/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-add_executable(tst_locks tst_locks.cpp)
-target_include_directories(tst_locks
- PRIVATE ../../src/libraries/qmfclient ../../src/libraries/qmfclient/support)
-target_link_libraries(tst_locks
- PRIVATE Qt6::Core Qt6::Test QmfClient)
-
-add_test(NAME tst_locks COMMAND tst_locks)
-set_tests_properties(tst_locks PROPERTIES
- ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/src/plugins:$ENV{QT_PLUGIN_PATH})
-
-install(TARGETS tst_locks
- RUNTIME DESTINATION /opt/tests/qmf)
diff --git a/tests/tst_locks/tst_locks.pro b/tests/tst_locks/tst_locks.pro
deleted file mode 100644
index b837e02f..00000000
--- a/tests/tst_locks/tst_locks.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = app
-TARGET = tst_locks
-CONFIG += qmfclient
-
-SOURCES += tst_locks.cpp
-
-include(../tests.pri)
diff --git a/tests/tst_qmailaccountkey/CMakeLists.txt b/tests/tst_qmailaccountkey/CMakeLists.txt
new file mode 100644
index 00000000..a61e3569
--- /dev/null
+++ b/tests/tst_qmailaccountkey/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_executable(tst_qmailaccountkey tst_qmailaccountkey.cpp)
+target_include_directories(tst_qmailaccountkey
+ PRIVATE ../../src/libraries/qmfclient ../../src/libraries/qmfclient/support)
+target_link_libraries(tst_qmailaccountkey
+ PRIVATE Qt6::Core Qt6::Test QmfClient)
+
+add_test(NAME tst_qmailaccountkey COMMAND tst_qmailaccountkey)
+set_tests_properties(tst_qmailaccountkey PROPERTIES
+ ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/src/plugins:$ENV{QT_PLUGIN_PATH})
+
+install(TARGETS tst_qmailaccountkey
+ RUNTIME DESTINATION /opt/tests/qmf)
diff --git a/tests/tst_locks/tst_locks.cpp b/tests/tst_qmailaccountkey/tst_qmailaccountkey.cpp
index b05a3f0f..919f480a 100644
--- a/tests/tst_locks/tst_locks.cpp
+++ b/tests/tst_qmailaccountkey/tst_qmailaccountkey.cpp
@@ -33,53 +33,30 @@
#include <QObject>
#include <QTest>
-#include <qmailaddress.h>
-#include <locks_p.h>
+
#include "qmailaccountkey.h"
-#include <ctype.h>
-class tst_locks : public QObject
+class tst_qmailaccountkey : public QObject
{
Q_OBJECT
public:
- tst_locks();
- virtual ~tst_locks();
+ tst_qmailaccountkey();
+ virtual ~tst_qmailaccountkey();
private slots:
- virtual void initTestCase();
- virtual void cleanupTestCase();
- virtual void init();
- virtual void cleanup();
-
void testQMailAccountKey();
};
-tst_locks::tst_locks()
-{
-}
-
-tst_locks::~tst_locks()
-{
-}
-
-void tst_locks::initTestCase()
+tst_qmailaccountkey::tst_qmailaccountkey()
{
}
-void tst_locks::cleanupTestCase()
+tst_qmailaccountkey::~tst_qmailaccountkey()
{
}
-void tst_locks::init()
-{
-}
-
-void tst_locks::cleanup()
-{
-}
-
-void tst_locks::testQMailAccountKey()
+void tst_qmailaccountkey::testQMailAccountKey()
{
QMailAccountKey firstKey(QMailAccountKey::id(QMailAccountId(0)));
QMailAccountKey secondKey(QMailAccountKey::id(QMailAccountId(1)));
@@ -92,5 +69,6 @@ void tst_locks::testQMailAccountKey()
QVERIFY((testKey | firstKey) == secondKey);
}
-QTEST_MAIN(tst_locks)
-#include "tst_locks.moc"
+QTEST_MAIN(tst_qmailaccountkey)
+
+#include "tst_qmailaccountkey.moc"
diff --git a/tests/tst_qmailaccountkey/tst_qmailaccountkey.pro b/tests/tst_qmailaccountkey/tst_qmailaccountkey.pro
new file mode 100644
index 00000000..d162f62f
--- /dev/null
+++ b/tests/tst_qmailaccountkey/tst_qmailaccountkey.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+TARGET = tst_qmailaccountkey
+CONFIG += qmfclient
+
+SOURCES += tst_qmailaccountkey.cpp
+
+include(../tests.pri)