summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/test.pro8
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp11
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp4
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp5
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp5
-rw-r--r--tests/auto/corelib/tools/qpointf/tst_qpointf.cpp3
-rw-r--r--tests/auto/gui/painting/qbrush/tst_qbrush.cpp3
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp6
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp3
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp3
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp6
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp2
13 files changed, 59 insertions, 4 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
index 9338f4ecc9..5e4d65a49f 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
@@ -20,3 +20,11 @@ win32 {
!qtConfig(library) {
LIBS += -L ../bin/ -lplugin1 -lplugin2
}
+
+android {
+ libs.prefix = android_test_data
+ libs.base = $$OUT_PWD/..
+ libs.files += $$OUT_PWD/../bin
+
+ RESOURCES += libs
+}
diff --git a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
index 34dc103672..9fa61804b3 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
+++ b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
@@ -42,6 +42,11 @@ Q_IMPORT_PLUGIN(Plugin2)
class tst_QFactoryLoader : public QObject
{
Q_OBJECT
+
+#ifdef Q_OS_ANDROID
+ QSharedPointer<QTemporaryDir> directory;
+#endif
+
public slots:
void initTestCase();
@@ -53,6 +58,12 @@ static const char binFolderC[] = "bin";
void tst_QFactoryLoader::initTestCase()
{
+#ifdef Q_OS_ANDROID
+ directory = QEXTRACTTESTDATA("android_test_data");
+ QVERIFY(directory);
+ QVERIFY(directory->isValid());
+ QVERIFY2(QDir::setCurrent(directory->path()), qPrintable("Could not chdir to " + directory->path()));
+#endif
const QString binFolder = QFINDTESTDATA(binFolderC);
QVERIFY2(!binFolder.isEmpty(), "Unable to locate 'bin' folder");
#if QT_CONFIG(library)
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index 499d276ef8..a496ed318b 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -345,8 +345,8 @@ void tst_QPluginLoader::loadMachO()
QVERIFY(f.open(QIODevice::ReadOnly));
QByteArray data = f.readAll();
- long pos;
- ulong len;
+ qsizetype pos;
+ qsizetype len;
QString errorString;
int r = QMachOParser::parse(data.constData(), data.size(), f.fileName(), &errorString, &pos, &len);
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 10856a4d57..d460beafde 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -2723,12 +2723,15 @@ void tst_QDateTime::timeZoneAbbreviation()
#endif
QCOMPARE(dt5.timeZoneAbbreviation(), QStringLiteral("CEST"));
} else {
- QSKIP("You must test using Central European (CET/CEST) time zone, e.g. TZ=Europe/Oslo");
+ qDebug("(Skipped some CET-only tests)");
}
#ifdef Q_OS_ANDROID // Only reports (general) zones as offsets (QTBUG-68837)
const QString cet(QStringLiteral("GMT+01:00"));
const QString cest(QStringLiteral("GMT+02:00"));
+#elif defined Q_OS_DARWIN
+ const QString cet(QStringLiteral("GMT+1"));
+ const QString cest(QStringLiteral("GMT+2"));
#else
const QString cet(QStringLiteral("CET"));
const QString cest(QStringLiteral("CEST"));
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 06706e7ee8..b76851a0ec 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1582,12 +1582,15 @@ void tst_QLocale::formatTimeZone()
#endif // Q_OS_WIN
QCOMPARE(enUS.toString(dt5, "t"), QLatin1String("CEST"));
} else {
- QSKIP("You must test using Central European (CET/CEST) time zone, e.g. TZ=Europe/Oslo");
+ qDebug("(Skipped some CET-only tests)");
}
#ifdef Q_OS_ANDROID // Only reports (general) zones as offsets (QTBUG-68837)
const QString cet(QStringLiteral("GMT+01:00"));
const QString cest(QStringLiteral("GMT+02:00"));
+#elif defined Q_OS_DARWIN
+ const QString cet(QStringLiteral("GMT+1"));
+ const QString cest(QStringLiteral("GMT+2"));
#else
const QString cet(QStringLiteral("CET"));
const QString cest(QStringLiteral("CEST"));
diff --git a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
index 579991a912..d4ccdf7ba6 100644
--- a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
+++ b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
@@ -450,6 +450,9 @@ void tst_QPointF::compare()
p3 -= QPointF(0.1, 0.1);
QVERIFY(p3 == QPointF());
+
+ // Test we can compare one dimension with hard zero
+ QVERIFY(QPointF(1.9543e-14, -32.0) == QPointF(0.0, -32.0));
}
QTEST_MAIN(tst_QPointF)
diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
index 8cb1d92568..e4b43f2912 100644
--- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
+++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
@@ -460,6 +460,9 @@ void tst_QBrush::textureBrushStream()
QCOMPARE(loadedBrush1.style(), Qt::TexturePattern);
QCOMPARE(loadedBrush2.style(), Qt::TexturePattern);
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69193", Continue);
+#endif
QCOMPARE(loadedBrush1.texture(), pixmap_source);
QCOMPARE(loadedBrush2.textureImage(), image_source);
}
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 7d230d3bb3..8090f38a2c 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -300,6 +300,9 @@ void tst_QFont::resetFont()
child->setFont(QFont()); // reset font
QCOMPARE(child->font().resolve(), uint(0));
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69214", Continue);
+#endif
QCOMPARE(child->font().pointSize(), parent.font().pointSize());
QVERIFY(parent.font().resolve() != 0);
}
@@ -539,6 +542,9 @@ void tst_QFont::defaultFamily()
}
}
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("serif", "QTBUG-69215", Continue);
+#endif
QVERIFY2(isAcceptable, msgNotAcceptableFont(familyForHint, acceptableFamilies));
}
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index 9f247a90e2..da2f100c0b 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -359,6 +359,9 @@ void tst_QFontDatabase::condensedFontMatching()
QEXPECT_FAIL("","No matching of sub-family by stretch on Windows", Continue);
#endif
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69216", Continue);
+#endif
QCOMPARE(QFontMetrics(tfcByStretch).horizontalAdvance(testString()),
QFontMetrics(tfcByStyleName).horizontalAdvance(testString()));
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index 373ad7fef9..a32fb1d25b 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -1039,6 +1039,9 @@ void tst_QRawFont::fallbackFontsOrder()
QList<QGlyphRun> glyphRuns = layout.glyphRuns();
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69217", Continue);
+#endif
// Since QtBidiTestFont does not support Arabic nor the space, both should map to
// the same font. If this fails, it is an indication that the list of fallbacks fonts
// is not sorted by writing system support.
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index beaec04238..d00dc251d8 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -465,6 +465,9 @@ void tst_QStaticText::rotatedPainter()
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69218", Continue);
+#endif
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -622,6 +625,9 @@ void tst_QStaticText::transformationChanged()
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69220", Continue);
+#endif
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index ebdb5a56af..3f602f5aae 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -619,7 +619,11 @@ void tst_QTextDocument::task240325()
QCOMPARE(doc->blockCount(), 1);
for (QTextBlock block = doc->begin() ; block!=doc->end() ; block = block.next()) {
QTextLayout *layout = block.layout();
+#ifdef Q_OS_ANDROID
+ QEXPECT_FAIL("", "QTBUG-69242", Abort);
+#endif
QCOMPARE(layout->lineCount(), 4);
+
for (int lineIdx=0;lineIdx<layout->lineCount();++lineIdx) {
QTextLine line = layout->lineAt(lineIdx);
diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
index b73ed8eaec..0c7ba99be5 100644
--- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -283,6 +283,8 @@ void tst_QNetworkInterface::interfaceFromXXX_data()
QTest::addColumn<QNetworkInterface>("iface");
QList<QNetworkInterface> allInterfaces = QNetworkInterface::allInterfaces();
+ if (allInterfaces.count() == 0)
+ QSKIP("No interfaces to test!");
foreach (QNetworkInterface iface, allInterfaces)
QTest::newRow(iface.name().toLocal8Bit()) << iface;
}