8 #include <QCoreApplication>
29 void CTestProcess::processInfo()
32 QVERIFY2(!invalid.
exists(),
"Invalid process shall not exist");
35 CProcessInfo current2(QCoreApplication::applicationPid());
36 CProcessInfo current3(QCoreApplication::applicationPid(), QCoreApplication::applicationName());
37 QVERIFY2(current1.exists(),
"Current process shall exist");
38 QVERIFY2(current1 == current2,
"Current process equals process with current PID");
39 QVERIFY2(current1 == current3,
"Current process equals process with current PID and name");
46 #include "testprocess.moc"
Value class identifying a process, with a PID and a name.
bool exists() const
True if this object identifies a process that exists.
static CProcessInfo currentProcess()
Return an object identifying the current process.
Free functions in swift::misc.
SWIFTTEST_MAIN(MiscTest::CTestProcess)
main