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) Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
627f0cb6e0
commit
1fd8ad388d
@ -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"
|
@ -1 +0,0 @@
|
||||
FooBar
|
@ -1,57 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user