summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cmake/CMakeLists.txt2
-rw-r--r--tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt4
-rw-r--r--tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp8
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp16
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp4
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp2
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp6
10 files changed, 30 insertions, 22 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index b2639f5e0b..677e6a6330 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -64,7 +64,7 @@ expect_pass("test(needsquoting)dirname")
expect_pass(test_platform_defs_include)
expect_pass(test_qtmainwin_library)
-# If QtDBus has been installed then run the tests for its macros.
+# If Qt D-Bus has been installed then run the tests for its macros.
find_package(Qt5DBus QUIET)
if (Qt5DBus_FOUND AND NOT APPLE)
expect_pass(test_dbus_module)
diff --git a/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt b/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
index aa93d73fec..571fadcfb6 100644
--- a/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
@@ -31,10 +31,10 @@ qt5_generate_moc("${main_file}" "${moc_file}")
# The core_test is expected to fail to build because
# QT_GUI_LIB is defined, which affects the contents of
-# QtTest and the definition of QTEST_MAIN.
+# Qt Test and the definition of QTEST_MAIN.
# If running this test manually (ctest -V -R no_link_gui from
# the tests/auto/cmake/build directory), the core_test is
-# expected to fail to link because of missing symbols from QtGui.
+# expected to fail to link because of missing symbols from Qt GUI.
# The gui_test is expected to build successfully (though it may
# be necessary to comment out the core_test and re-run cmake)
add_executable(core_test "${main_file}" "${moc_file}")
diff --git a/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt b/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
index 9b120ecba0..8c025d65cd 100644
--- a/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
@@ -34,8 +34,8 @@ qt5_generate_moc("${main_file}" "${moc_file}")
# QtTest and the definition of QTEST_MAIN.
# If running this test manually (ctest -V -R no_link_widgets from
# the tests/auto/cmake/build directory), the core_test is
-# expected to fail to link because of missing symbols from QtGui
-# and QtWidgets.
+# expected to fail to link because of missing symbols from Qt GUI
+# and Qt Widgets.
# The widgets_test is expected to build successfully (though it may
# be necessary to comment out the core_test and re-run cmake)
add_executable(core_test "${main_file}" "${moc_file}")
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 7799d40de7..d44ef167b5 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1344,6 +1344,14 @@ void tst_QDir::homePath()
#ifdef Q_OS_UNIX
if (strHome.length() > 1) // root dir = "/"
QVERIFY(!strHome.endsWith('/'));
+
+ QByteArray envHome = qgetenv("HOME");
+#if !defined(_WRS_KERNEL) // unsetenv is not available on VxWorks DKM mode
+ unsetenv("HOME");
+#endif
+ QCOMPARE(QDir::homePath(), QDir::rootPath());
+ qputenv("HOME", envHome);
+
#elif defined(Q_OS_WIN)
if (strHome.length() > 3) // root dir = "c:/"; "//" is not really valid...
QVERIFY(!strHome.endsWith('/'));
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index fcd763f60f..c902d421ed 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -2409,7 +2409,7 @@ void tst_QString::remove_uint_uint()
s1.remove( (uint) index, (uint) len );
QTEST( s1, "result" );
} else
- QCOMPARE( 0, 0 ); // shut QtTest
+ QCOMPARE( 0, 0 ); // shut Qt Test
}
void tst_QString::remove_string()
@@ -2448,7 +2448,7 @@ void tst_QString::remove_string()
s5.replace( QRegExp(before, cs, QRegExp::FixedString), after );
QTEST( s5, "result" );
} else {
- QCOMPARE( 0, 0 ); // shut QtTest
+ QCOMPARE( 0, 0 ); // shut Qt Test
}
}
@@ -2467,7 +2467,7 @@ void tst_QString::remove_regexp()
s2.remove( QRegularExpression(regexp) );
QTEST( s2, "result" );
} else {
- QCOMPARE( 0, 0 ); // shut QtTest
+ QCOMPARE( 0, 0 ); // shut Qt Test
}
}
@@ -3778,7 +3778,7 @@ void tst_QString::fromLatin1Roundtrip()
QFETCH(QByteArray, latin1);
QFETCH(QString, unicode);
- // QtTest safety check:
+ // Qt Test safety check:
QCOMPARE(latin1.isNull(), unicode.isNull());
QCOMPARE(latin1.isEmpty(), unicode.isEmpty());
QCOMPARE(latin1.length(), unicode.length());
@@ -3833,7 +3833,7 @@ void tst_QString::toLatin1Roundtrip()
QFETCH(QString, unicodesrc);
QFETCH(QString, unicodedst);
- // QtTest safety check:
+ // Qt Test safety check:
QCOMPARE(latin1.isNull(), unicodesrc.isNull());
QCOMPARE(latin1.isEmpty(), unicodesrc.isEmpty());
QCOMPARE(latin1.length(), unicodesrc.length());
@@ -3868,7 +3868,7 @@ void tst_QString::stringRef_toLatin1Roundtrip()
QFETCH(QString, unicodesrc);
QFETCH(QString, unicodedst);
- // QtTest safety check:
+ // Qt Test safety check:
QCOMPARE(latin1.isNull(), unicodesrc.isNull());
QCOMPARE(latin1.isEmpty(), unicodesrc.isEmpty());
QCOMPARE(latin1.length(), unicodesrc.length());
@@ -3934,8 +3934,8 @@ void tst_QString::fromAscii()
void tst_QString::arg()
{
/*
- Warning: If any of these test fails, the warning given by QtTest
- is all messed up, because QtTest itself uses QString::arg().
+ Warning: If any of these test fails, the warning given by Qt Test
+ is all messed up, because Qt Test itself uses QString::arg().
*/
QLocale::setDefault(QString("de_DE"));
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index c87b3297ee..1da7f8a92a 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -1055,11 +1055,11 @@ signals:
void tst_QDBusConnection::serviceRegistrationRaceCondition()
{
// There was a race condition in the updating of list of name owners in
- // QtDBus. When the user connects to a signal coming from a given
+ // Qt D-Bus. When the user connects to a signal coming from a given
// service, we must listen for NameOwnerChanged signals relevant to that
// name and update when the owner changes. However, it's possible that we
// receive in one chunk from the server both the NameOwnerChanged signal
- // about the service and the signal we're interested in. Since QtDBus
+ // about the service and the signal we're interested in. Since Qt D-Bus
// posts events in order to handle the incoming signals, the update
// happens too late.
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index f155e820ec..cddec5b6e7 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -228,7 +228,7 @@ void tst_QFontMetrics::bypassShaping()
int charsWidth = 0;
for (int i = 0; i < text.size(); ++i)
charsWidth += fm.width(text[i]);
- // This assertion is needed in QtWebKit's WebCore::Font::offsetForPositionForSimpleText
+ // This assertion is needed in Qt WebKit's WebCore::Font::offsetForPositionForSimpleText
QCOMPARE(textWidth, charsWidth);
}
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 0e6dba2132..6c5c90d737 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -1597,8 +1597,8 @@ void tst_QGL::fboFormat()
void tst_QGL::testDontCrashOnDanglingResources()
{
- // We have a number of Q_GLOBAL_STATICS inside the QtOpenGL
- // library. This test is verify that we don't crash as a result of
+ // We have a number of Q_GLOBAL_STATICS inside the Qt OpenGL
+ // module. This test is verify that we don't crash as a result of
// them calling into libgl on application shutdown.
QWidget *widget = new UnclippedWidget();
widget->show();
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 9e055a3d0e..441254c126 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -501,7 +501,7 @@ static inline QProcessEnvironment processEnvironment()
{
QProcessEnvironment result;
insertEnvironmentVariable(QStringLiteral("PATH"), result);
- // Preserve DISPLAY for X11 as some tests use QtGui.
+ // Preserve DISPLAY for X11 as some tests use Qt GUI.
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
insertEnvironmentVariable(QStringLiteral("DISPLAY"), result);
#endif
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index fee06f2477..adb3c26dce 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -1244,17 +1244,17 @@ void tst_QAbstractSlider::setRepeatAction()
QCOMPARE(slider->value(), 55);
waitUntilTimeElapsed(t, 550);
- QCOMPARE(spy.count(), 1);
+ QTRY_COMPARE(spy.count(), 1);
QCOMPARE(slider->value(), 65);
QCOMPARE(spy.at(0).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
waitUntilTimeElapsed(t, 790);
- QCOMPARE(spy.count(), 2);
+ QTRY_COMPARE(spy.count(), 2);
QCOMPARE(slider->value(), 75);
QCOMPARE(spy.at(1).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
waitUntilTimeElapsed(t, 1790);
- QCOMPARE(spy.count(), 6);
+ QTRY_COMPARE(spy.count(), 6);
QCOMPARE(slider->value(), 115);
QCOMPARE(spy.at(4).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);
QCOMPARE(spy.at(5).at(0).toUInt(), (uint)QAbstractSlider::SliderPageStepAdd);