diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-11-19 17:01:37 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-20 18:05:27 +0000 |
commit | 6298c2678920821afbc7d9138898b1c69e5140de (patch) | |
tree | edce24d157358cc779d5c0e23d81e0f35f95718b /tests/auto/network/ssl/qsslcipher | |
parent | 0eac6af035d703d862f8d9391788d27a0660502a (diff) |
QSslCipher - improve its code coverage and auto-tests
tst_qsslcipher was quite useless - now we test that default constructed
QSslCipher reports expected values. Test the non-default from the
different auto-test, where we are sure we have really useful
ciphersuites (with different parameters obtained from a TLS backend,
where it's possible).
Change-Id: Iff14a0580fed889cf9e0873bee01d968773626db
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 1a2e2921d268f09b6cb5ca91c85614192b8e2e0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/network/ssl/qsslcipher')
-rw-r--r-- | tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp index 9ffba1ec94..8114d1a064 100644 --- a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp +++ b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp @@ -30,9 +30,6 @@ #include <QtTest/QtTest> #include <qsslcipher.h> -#include <QtNetwork/qhostaddress.h> -#include <QtNetwork/qnetworkproxy.h> - class tst_QSslCipher : public QObject { Q_OBJECT @@ -50,6 +47,15 @@ private slots: void tst_QSslCipher::constructing() { QSslCipher cipher; + + QVERIFY(cipher.isNull()); + QCOMPARE(cipher.name(), QString()); + QCOMPARE(cipher.supportedBits(), 0); + QCOMPARE(cipher.usedBits(), 0); + QCOMPARE(cipher.keyExchangeMethod(), QString()); + QCOMPARE(cipher.authenticationMethod(), QString()); + QCOMPARE(cipher.protocolString(), QString()); + QCOMPARE(cipher.protocol(), QSsl::UnknownProtocol); } #endif // QT_NO_SSL |