diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-10-21 22:23:04 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-11-14 13:47:02 +0000 |
commit | 4e49bc70cacabe49908d60f1de87e454ac1861a4 (patch) | |
tree | 5956da904cd6a60bcb45c853b1f2cde51dfa6789 /tests | |
parent | be9dfb58d36bedd7a2b1ce93ad1276811f787dfc (diff) |
Android: delete dead code for tst_android under tests/auto/other/android
This amends 23780891a50ba678714f7e0a4cf43a0f8164b440 which moved the.txt
test to tets/auto/corelib/platform/android and kept the old location
mistakenly.
Change-Id: If58422f9a94cfe4d6a941cc5453d8f0506057dcb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit c7b93d471d763b5e7986305deb4d0d83d7b69068)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/android/CMakeLists.txt | 21 | ||||
-rw-r--r-- | tests/auto/other/android/testdata/assets/test.txt | 1 | ||||
-rw-r--r-- | tests/auto/other/android/tst_android.cpp | 82 |
3 files changed, 0 insertions, 104 deletions
diff --git a/tests/auto/other/android/CMakeLists.txt b/tests/auto/other/android/CMakeLists.txt deleted file mode 100644 index c2749825ac..0000000000 --- a/tests/auto/other/android/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Generated from android.pro. - -##################################################################### -## tst_android Test: -##################################################################### - -qt_internal_add_test(tst_android - SOURCES - tst_android.cpp -) - -if(ANDROID) - set_property(TARGET tst_android APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR - ${CMAKE_CURRENT_SOURCE_DIR}/testdata - ) - # QTBUG-88840 # special case - qt_android_generate_deployment_settings(tst_android) # special case -endif() - -#### Keys ignored in scope 1:.:.:android.pro:<TRUE>: -# DISTFILES = "testdata/assets/test.txt" diff --git a/tests/auto/other/android/testdata/assets/test.txt b/tests/auto/other/android/testdata/assets/test.txt deleted file mode 100644 index 61e2c47c25..0000000000 --- a/tests/auto/other/android/testdata/assets/test.txt +++ /dev/null @@ -1 +0,0 @@ -FooBar
\ No newline at end of file diff --git a/tests/auto/other/android/tst_android.cpp b/tests/auto/other/android/tst_android.cpp deleted file mode 100644 index 3a00d9414b..0000000000 --- a/tests/auto/other/android/tst_android.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <jni.h> - -#include <QTest> -#include <QtCore/qnativeinterface.h> -#include <QtCore/qjniobject.h> - -class tst_Android : public QObject -{ -Q_OBJECT -private slots: - void assetsRead(); - void assetsNotWritable(); - void testAndroidSdkVersion(); - void testAndroidActivity(); -}; - -void tst_Android::assetsRead() -{ - { - QFile file(QStringLiteral("assets:/test.txt")); - QVERIFY(file.open(QIODevice::ReadOnly)); - QCOMPARE(file.readAll(), QByteArray("FooBar")); - } - - { - QFile file(QStringLiteral("assets:/test.txt")); - QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); - QCOMPARE(file.readAll(), QByteArray("FooBar")); - } -} - -void tst_Android::assetsNotWritable() -{ - QFile file(QStringLiteral("assets:/test.txt")); - QVERIFY(!file.open(QIODevice::WriteOnly)); - QVERIFY(!file.open(QIODevice::ReadWrite)); - QVERIFY(!file.open(QIODevice::Append)); -} - -void tst_Android::testAndroidSdkVersion() -{ - QVERIFY(QNativeInterface::QAndroidApplication::sdkVersion() > 0); -} - -void tst_Android::testAndroidActivity() -{ - QJniObject activity = QNativeInterface::QAndroidApplication::context(); - QVERIFY(activity.isValid()); - QVERIFY(activity.callMethod<jboolean>("isTaskRoot")); -} - -QTEST_MAIN(tst_Android) -#include "tst_android.moc" - |