summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp14
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp3
2 files changed, 6 insertions, 11 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index a6eabbbed6..e9af29494b 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -186,18 +186,12 @@ void tst_qstandardpaths::testDataLocation()
{
// On all platforms, DataLocation should be GenericDataLocation / organization name / app name
// This allows one app to access the data of another app.
- {
- const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
- const QString app = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
- QCOMPARE(base, app);
- }
+ const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
+ QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/tst_qstandardpaths");
QCoreApplication::instance()->setOrganizationName("Qt");
+ QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/tst_qstandardpaths");
QCoreApplication::instance()->setApplicationName("QtTest");
- {
- const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
- const QString app = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
- QCOMPARE(app, base + "/Qt/QtTest");
- }
+ QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/QtTest");
#ifdef Q_XDG_PLATFORM
setDefaultLocations();
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index 84d723ca61..f4aefb2726 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -121,7 +121,8 @@ void tst_QCoreApplication::qAppName()
int argc = 1;
char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
- QVERIFY(!::qAppName().isEmpty());
+ QCOMPARE(::qAppName(), QString::fromLatin1("tst_qcoreapplication"));
+ QCOMPARE(QCoreApplication::applicationName(), QString::fromLatin1("tst_qcoreapplication"));
}
void tst_QCoreApplication::argc()