Files
qt-creator/tests/auto/solutions/qprocesstask/tst_qprocesstask.cpp
Jarek Kobus 62ad0014f1 TaskTree test: Simplify subprocess name
Fix the qbs build.

Amends 63bfeba87f

Change-Id: I271e5059ba8becf4aade8ce21ff9f40201f3734b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-15 15:00:26 +00:00

35 lines
725 B
C++

// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <tasking/qprocesstask.h>
#include <QtTest>
using namespace Tasking;
class tst_QProcessTask : public QObject
{
Q_OBJECT
private slots:
void qProcessTask();
};
void tst_QProcessTask::qProcessTask()
{
const auto setupProcess = [](QProcess &process) {
process.setProgram(QLatin1String(PROCESS_TESTAPP));
};
{
TaskTree taskTree({QProcessTask(setupProcess)});
taskTree.start();
QTRY_VERIFY(taskTree.isRunning());
}
QProcessDeleter::deleteAll();
}
QTEST_GUILESS_MAIN(tst_QProcessTask)
#include "tst_qprocesstask.moc"