Add QSystemSemaphore::release() auto-tests
Change-Id: I4c48f9ad8c60307e4b922d6a6b82e03e455f14d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
ed9e954f4b
commit
ad684ff2a7
@ -65,6 +65,7 @@ private slots:
|
||||
|
||||
void basicacquire();
|
||||
void complexacquire();
|
||||
void release();
|
||||
|
||||
#ifndef QT_NO_PROCESS
|
||||
void basicProcesses();
|
||||
@ -163,6 +164,24 @@ void tst_QSystemSemaphore::complexacquire()
|
||||
QCOMPARE(sem.errorString(), QString());
|
||||
}
|
||||
|
||||
void tst_QSystemSemaphore::release()
|
||||
{
|
||||
QSystemSemaphore sem("QSystemSemaphore_release", 0, QSystemSemaphore::Create);
|
||||
QVERIFY(sem.release());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QVERIFY(sem.release());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QVERIFY(sem.acquire());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QVERIFY(sem.acquire());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QVERIFY(sem.release());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QVERIFY(sem.release());
|
||||
QCOMPARE(sem.error(), QSystemSemaphore::NoError);
|
||||
QCOMPARE(sem.errorString(), QString());
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PROCESS
|
||||
void tst_QSystemSemaphore::basicProcesses()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user