mirror of
https://github.com/izzy2lost/android_openssl.git
synced 2026-06-19 01:20:12 -07:00
Add test to check the libs are working properly
It's a simple check at runtime to see if ssl is supported using the included libs.
This commit is contained in:
committed by
Assam Boudjelthia
parent
7ccc0bcede
commit
970e2742b0
@@ -1,2 +1,3 @@
|
||||
build/
|
||||
.DS_Store
|
||||
*.user
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(tst_openssl LANGUAGES CXX)
|
||||
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
|
||||
endif()
|
||||
|
||||
qt_internal_add_test(tst_openssl
|
||||
SOURCES
|
||||
tst_openssl.cpp
|
||||
LIBRARIES
|
||||
Qt::Network
|
||||
)
|
||||
|
||||
if (ANDROID)
|
||||
include(../android_openssl.cmake)
|
||||
add_android_openssl_libraries(tst_openssl)
|
||||
endif()
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <QtTest>
|
||||
#include <QSslSocket>
|
||||
|
||||
class tst_OpenSsl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void supportsSsl();
|
||||
};
|
||||
|
||||
void tst_OpenSsl::supportsSsl() {
|
||||
QVERIFY(QSslSocket::supportsSsl());
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_OpenSsl)
|
||||
|
||||
#include "tst_openssl.moc"
|
||||
@@ -0,0 +1,9 @@
|
||||
QT += testlib gui network
|
||||
|
||||
CONFIG += qt warn_on depend_includepath testcase
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += tst_openssl.cpp
|
||||
|
||||
android: include(../openssl.pri)
|
||||
Reference in New Issue
Block a user