summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-10-07 17:47:13 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-10-18 14:13:26 +0200
commitc10132888e1c158eb799316ccde82706c8a82b2d (patch)
tree71b8446faec45b0803b44e1d5086452f04942780 /tests/auto/corelib/tools
parent0448d57c076311df3f36fcbe6b18219c7abcc54c (diff)
tst_QCryptographicHash: avoid duplicate data tags
Use key(i) rather than valueToKey(value) as the Sha3_* alias Kekkak_* or RealSha3_*. This way, we still test all members of the enum, without duplicating row keys (albeit the aliases duplicate values). Change-Id: I6acba5ffdf5b68294031d609a76b37ca8fad9d94 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index c2e8b0194f..00f7afc876 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -393,7 +393,7 @@ void tst_QCryptographicHash::hashLength_data()
auto metaEnum = QMetaEnum::fromType<QCryptographicHash::Algorithm>();
for (int i = 0, value = metaEnum.value(i); value != -1; value = metaEnum.value(++i)) {
auto algorithm = QCryptographicHash::Algorithm(value);
- QTest::addRow("%s", metaEnum.valueToKey(value)) << algorithm;
+ QTest::addRow("%s", metaEnum.key(i)) << algorithm;
}
}