diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-05-04 17:29:37 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-05-05 12:35:56 +0000 |
commit | af32b0ce44884d0e8d45927deeb569c81e791625 (patch) | |
tree | f07836953adf35fe0a9411c70796db0f24be92db /tests | |
parent | abce79939a5f314ea68b63aac48444f680cc414b (diff) | |
download | qt-creator-af32b0ce44884d0e8d45927deeb569c81e791625.tar.gz |
Tests: Rename tst_AsyncTask -> tst_Async
Follows 187a7640def4f137762547d82638c7f169f2cfe4
Change-Id: I58e6afbc0cbdea37c405b11e133d794a91f09fc6
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/utils/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/utils/async/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/auto/utils/async/async.qbs | 7 | ||||
-rw-r--r-- | tests/auto/utils/async/tst_async.cpp (renamed from tests/auto/utils/asynctask/tst_asynctask.cpp) | 20 | ||||
-rw-r--r-- | tests/auto/utils/asynctask/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/auto/utils/asynctask/asynctask.qbs | 7 | ||||
-rw-r--r-- | tests/auto/utils/utils.qbs | 2 |
7 files changed, 23 insertions, 23 deletions
diff --git a/tests/auto/utils/CMakeLists.txt b/tests/auto/utils/CMakeLists.txt index e58f15af6e..36f20fdac5 100644 --- a/tests/auto/utils/CMakeLists.txt +++ b/tests/auto/utils/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(ansiescapecodehandler) -add_subdirectory(asynctask) +add_subdirectory(async) add_subdirectory(commandline) add_subdirectory(deviceshell) add_subdirectory(expected) diff --git a/tests/auto/utils/async/CMakeLists.txt b/tests/auto/utils/async/CMakeLists.txt new file mode 100644 index 0000000000..0e6de32f56 --- /dev/null +++ b/tests/auto/utils/async/CMakeLists.txt @@ -0,0 +1,4 @@ +add_qtc_test(tst_utils_async + DEPENDS Utils + SOURCES tst_async.cpp +) diff --git a/tests/auto/utils/async/async.qbs b/tests/auto/utils/async/async.qbs new file mode 100644 index 0000000000..696b0959a5 --- /dev/null +++ b/tests/auto/utils/async/async.qbs @@ -0,0 +1,7 @@ +import qbs + +QtcAutotest { + name: "Async autotest" + Depends { name: "Utils" } + files: "tst_async.cpp" +} diff --git a/tests/auto/utils/asynctask/tst_asynctask.cpp b/tests/auto/utils/async/tst_async.cpp index 7218f7f579..bf7cae7eff 100644 --- a/tests/auto/utils/asynctask/tst_asynctask.cpp +++ b/tests/auto/utils/async/tst_async.cpp @@ -8,7 +8,7 @@ using namespace Utils; -class tst_AsyncTask : public QObject +class tst_Async : public QObject { Q_OBJECT @@ -131,7 +131,7 @@ std::shared_ptr<Async<ResultType>> createAsyncTask(Function &&function, Args &&. return asyncTask; } -void tst_AsyncTask::runAsync() +void tst_Async::runAsync() { // free function pointer QCOMPARE(createAsyncTask(&report3)->results(), @@ -282,7 +282,7 @@ void tst_AsyncTask::runAsync() QList<double>({0, 2, 1})); } -void tst_AsyncTask::crefFunction() +void tst_Async::crefFunction() { // free function pointer with promise auto fun = &report3; @@ -341,7 +341,7 @@ public: QString value; }; -void tst_AsyncTask::onResultReady() +void tst_Async::onResultReady() { { // lambda QObject context; @@ -386,7 +386,7 @@ void tst_AsyncTask::onResultReady() } } -void tst_AsyncTask::futureSynchonizer() +void tst_Async::futureSynchonizer() { auto lambda = [](QPromise<int> &promise) { while (true) { @@ -418,7 +418,7 @@ void tst_AsyncTask::futureSynchonizer() void multiplyBy2(QPromise<int> &promise, int input) { promise.addResult(input * 2); } -void tst_AsyncTask::taskTree() +void tst_Async::taskTree() { using namespace Tasking; @@ -461,7 +461,7 @@ static void returnxxWithPromise(QPromise<int> &promise, int x) static double s_sum = 0; static QList<double> s_results; -void tst_AsyncTask::mapReduce_data() +void tst_Async::mapReduce_data() { using namespace Tasking; @@ -567,7 +567,7 @@ void tst_AsyncTask::mapReduce_data() QTest::newRow("String") << stringRoot << 1.5 << QList<double>({}); } -void tst_AsyncTask::mapReduce() +void tst_Async::mapReduce() { QThreadPool pool; @@ -591,6 +591,6 @@ void tst_AsyncTask::mapReduce() QCOMPARE(s_sum, sum); } -QTEST_GUILESS_MAIN(tst_AsyncTask) +QTEST_GUILESS_MAIN(tst_Async) -#include "tst_asynctask.moc" +#include "tst_async.moc" diff --git a/tests/auto/utils/asynctask/CMakeLists.txt b/tests/auto/utils/asynctask/CMakeLists.txt deleted file mode 100644 index 8b234dbb02..0000000000 --- a/tests/auto/utils/asynctask/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_qtc_test(tst_utils_asynctask - DEPENDS Utils - SOURCES tst_asynctask.cpp -) diff --git a/tests/auto/utils/asynctask/asynctask.qbs b/tests/auto/utils/asynctask/asynctask.qbs deleted file mode 100644 index 8f478147e8..0000000000 --- a/tests/auto/utils/asynctask/asynctask.qbs +++ /dev/null @@ -1,7 +0,0 @@ -import qbs - -QtcAutotest { - name: "AsyncTask autotest" - Depends { name: "Utils" } - files: "tst_asynctask.cpp" -} diff --git a/tests/auto/utils/utils.qbs b/tests/auto/utils/utils.qbs index ee38d93598..6ed3fd7348 100644 --- a/tests/auto/utils/utils.qbs +++ b/tests/auto/utils/utils.qbs @@ -4,7 +4,7 @@ Project { name: "Utils autotests" references: [ "ansiescapecodehandler/ansiescapecodehandler.qbs", - "asynctask/asynctask.qbs", + "async/async.qbs", "commandline/commandline.qbs", "deviceshell/deviceshell.qbs", "expected/expected.qbs", |