summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-09-10 20:23:14 +0200
committerLinus Jahn <lnj@kaidan.im>2022-09-12 20:47:24 +0200
commitcd37a773ca0ceb3718875295bd244fb462893a0d (patch)
treed5ebdcee44c409c45a3aae282a3eda47aada8076 /tests/auto/corelib
parent358248b4950131711ae408da9aa30d41c5143e4f (diff)
QCryptographicHash: Add getter for algorithm()
This can be helpful when you calculate multiple hashes, store them in a vector and you want to know which result belongs to which algorithm. [ChangeLog][QtCore][QCryptographicHash] Added getter algorithm(). Change-Id: Ifcf78536f215619a6e2e3035a95598327d0ed733 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 5445963be8..2151c69323 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -51,6 +51,8 @@ void tst_QCryptographicHash::repeated_result()
QCryptographicHash::Algorithm _algo = QCryptographicHash::Algorithm(algo);
QCryptographicHash hash(_algo);
+ QCOMPARE_EQ(hash.algorithm(), _algo);
+
QFETCH(QByteArray, first);
hash.addData(first);