Skip to content
Snippets Groups Projects
Commit 207686b1 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-11960 Create testing infrastructure for x86_64

parent 6158ab6e
No related branches found
No related tags found
1 merge request!43QDS-11960 Create testing infrastructure for x86_64
Pipeline #68427 passed
File moved
File added
set(TARGET_NAME ${PROJECT_NAME}_test)
find_package(Qt6 REQUIRED COMPONENTS Test Core Quick Gui)
enable_testing(true)
qt_add_executable(${TARGET_NAME}
unit/tst_qtuiviewer.cpp
unit/tst_qtuiviewer.h
)
add_test(NAME ${TARGET_NAME} COMMAND qtuiviewer_test)
target_link_libraries(${TARGET_NAME} PRIVATE Qt::Test Qt::Core Qt::Quick Qt::Gui)
set_property(TARGET ${TARGET_NAME}
APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android
)
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.qt.qtuiviewer.test"
android:installLocation="auto" android:versionCode="1" android:versionName="1">
<!-- %%INSERT_PERMISSIONS -->
<!-- %%INSERT_FEATURES -->
<supports-screens android:anyDensity="true" android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true" />
<application android:icon="@mipmap/app_icon" android:debuggable="true"
android:name="org.qtproject.qt.android.bindings.QtApplication"
android:extractNativeLibs="true"
android:hardwareAccelerated="true" android:label="Qt UI Viewer Test"
android:requestLegacyExternalStorage="true" android:allowNativeHeapPointerTagging="false">
<profileable android:shell="true" android:enabled="true" />
<activity android:name="org.qtproject.qt.android.bindings.QtActivity"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:label="Qt UI Viewer Test" android:launchMode="singleTask"
android:screenOrientation="unspecified" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.lib_name"
android:value="-- %%INSERT_APP_LIB_NAME%% --" />
<meta-data android:name="android.app.arguments"
android:value="-- %%INSERT_APP_ARGUMENTS%% --" />
<meta-data android:name="android.app.extract_android_style" android:value="minimal" />
</activity>
</application>
</manifest>
tests/android/res/mipmap-hdpi/app_icon.png

4.36 KiB

tests/android/res/mipmap-ldpi/app_icon.png

798 B

tests/android/res/mipmap-mdpi/app_icon.png

1.72 KiB

tests/android/res/mipmap-xhdpi/app_icon.png

6.22 KiB

tests/android/res/mipmap-xxhdpi/app_icon.png

13 KiB

tests/android/res/mipmap-xxxhdpi/app_icon.png

30 KiB

#include "tst_qtuiviewer.h"
void TestQString::toUpper()
{
qDebug("TestQString::toUpper");
QString str = "Hello";
QVERIFY(str.toUpper() == "HELLO");
}
void TestQString::toLower()
{
qDebug("TestQString::toLower");
QString str = "Hello";
QCOMPARE(str.toLower(), "hell");
}
QTEST_MAIN(TestQString)
#pragma once
#include <QtTest/QTest>
class TestQString : public QObject
{
Q_OBJECT
private slots:
void toUpper();
void toLower();
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment