void-packages/srcpkgs/gpgme/patches/0001-tests-log-error.patch

52 lines
1.8 KiB
Diff
Raw Normal View History

From 81d4b7f2d7077297d76af5728949d8f2bdff8cd5 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
Date: Wed, 17 Aug 2022 14:56:13 +0200
Subject: [PATCH] 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
---
lang/qt/tests/t-addexistingsubkey.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lang/qt/tests/t-addexistingsubkey.cpp b/lang/qt/tests/t-addexistingsubkey.cpp
index 589c90bf..2e654cec 100644
--- a/lang/qt/tests/t-addexistingsubkey.cpp
+++ b/lang/qt/tests/t-addexistingsubkey.cpp
@@ -168,7 +168,7 @@ private Q_SLOTS:
QSignalSpy spy (this, SIGNAL(asyncDone()));
QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
- QVERIFY(result.code() == GPG_ERR_NO_ERROR);
+ QCOMPARE(result.code(), static_cast<int>(GPG_ERR_NO_ERROR));
key.update();
QCOMPARE(key.numSubkeys(), 3u);
}
@@ -190,7 +190,7 @@ private Q_SLOTS:
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();
QCOMPARE(key.numSubkeys(), 3u);
QCOMPARE(key.subkey(2).expirationTime(), 0);
@@ -213,7 +213,7 @@ private Q_SLOTS:
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();
QCOMPARE(key.numSubkeys(), 3u);
--
2.11.0