qt,tests: Log the actual error code if the assertion fails
* lang/qt/tests/t-addexistingsubkey.cpp ( AddExistingSubkeyJobTest::testAddExistingSubkeyAsync, AddExistingSubkeyJobTest::testAddExistingSubkeySync, AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration): Use QCOMPARE instead of QVERIFY for asserting equality. -- GnuPG-bug-id: 6137
This commit is contained in:
parent
c977424a1d
commit
81d4b7f2d7
@ -168,7 +168,7 @@ private Q_SLOTS:
|
|||||||
QSignalSpy spy (this, SIGNAL(asyncDone()));
|
QSignalSpy spy (this, SIGNAL(asyncDone()));
|
||||||
QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
|
QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
|
||||||
|
|
||||||
QVERIFY(result.code() == GPG_ERR_NO_ERROR);
|
QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
|
||||||
key.update();
|
key.update();
|
||||||
QCOMPARE(key.numSubkeys(), 3u);
|
QCOMPARE(key.numSubkeys(), 3u);
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
const auto result = job->exec(key, sourceSubkey);
|
const auto result = job->exec(key, sourceSubkey);
|
||||||
|
|
||||||
QVERIFY(result.code() == GPG_ERR_NO_ERROR);
|
QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
|
||||||
key.update();
|
key.update();
|
||||||
QCOMPARE(key.numSubkeys(), 3u);
|
QCOMPARE(key.numSubkeys(), 3u);
|
||||||
QCOMPARE(key.subkey(2).expirationTime(), 0);
|
QCOMPARE(key.subkey(2).expirationTime(), 0);
|
||||||
@ -213,7 +213,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
const auto result = job->exec(key, sourceSubkey);
|
const auto result = job->exec(key, sourceSubkey);
|
||||||
|
|
||||||
QVERIFY(result.code() == GPG_ERR_NO_ERROR);
|
QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
|
||||||
key.update();
|
key.update();
|
||||||
QCOMPARE(key.numSubkeys(), 3u);
|
QCOMPARE(key.numSubkeys(), 3u);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user