summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/selftests')
-rw-r--r--tests/auto/selftests/exceptionthrow/exceptionthrow.pro (renamed from tests/auto/selftests/exception/exception.pro)4
-rw-r--r--tests/auto/selftests/exceptionthrow/tst_exceptionthrow.cpp (renamed from tests/auto/selftests/exception/tst_exception.cpp)2
-rw-r--r--tests/auto/selftests/expected_crashes_3.txt8
-rw-r--r--tests/auto/selftests/expected_exceptionthrow.txt (renamed from tests/auto/selftests/expected_exception.txt)0
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt4
-rw-r--r--tests/auto/selftests/selftests.pro2
-rw-r--r--tests/auto/selftests/selftests.qrc3
-rw-r--r--tests/auto/selftests/tst_selftests.cpp12
-rw-r--r--tests/auto/selftests/xunit/xunit.pro11
9 files changed, 25 insertions, 21 deletions
diff --git a/tests/auto/selftests/exception/exception.pro b/tests/auto/selftests/exceptionthrow/exceptionthrow.pro
index 65705c6..641818c 100644
--- a/tests/auto/selftests/exception/exception.pro
+++ b/tests/auto/selftests/exceptionthrow/exceptionthrow.pro
@@ -1,9 +1,9 @@
load(qttest_p4)
-SOURCES += tst_exception.cpp
+SOURCES += tst_exceptionthrow.cpp
QT = core
mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
-TARGET = exception
+TARGET = exceptionthrow
diff --git a/tests/auto/selftests/exception/tst_exception.cpp b/tests/auto/selftests/exceptionthrow/tst_exceptionthrow.cpp
index a54bfbe..7a65c2d 100644
--- a/tests/auto/selftests/exception/tst_exception.cpp
+++ b/tests/auto/selftests/exceptionthrow/tst_exceptionthrow.cpp
@@ -66,4 +66,4 @@ void tst_Exception::throwException() const
QTEST_MAIN(tst_Exception)
-#include "tst_exception.moc"
+#include "tst_exceptionthrow.moc"
diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt
new file mode 100644
index 0000000..55cd0b4
--- /dev/null
+++ b/tests/auto/selftests/expected_crashes_3.txt
@@ -0,0 +1,8 @@
+********* Start testing of tst_Crashes *********
+Config: Using QTest library 4.6.0, Qt 4.6.0
+PASS : tst_Crashes::initTestCase()
+QFATAL : tst_Crashes::crash() Received signal 11
+FAIL! : tst_Crashes::crash() Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped
+********* Finished testing of tst_Crashes *********
diff --git a/tests/auto/selftests/expected_exception.txt b/tests/auto/selftests/expected_exceptionthrow.txt
index 141ea8b..141ea8b 100644
--- a/tests/auto/selftests/expected_exception.txt
+++ b/tests/auto/selftests/expected_exceptionthrow.txt
diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt
index bb5e54f..8dae5f7 100644
--- a/tests/auto/selftests/expected_maxwarnings.txt
+++ b/tests/auto/selftests/expected_maxwarnings.txt
@@ -1,5 +1,5 @@
********* Start testing of MaxWarnings *********
-Config: Using QTest library 4.1.0, Qt 4.1.0
+Config: Using QTest library 4.6.0, Qt 4.6.0
PASS : MaxWarnings::initTestCase()
QWARN : MaxWarnings::warn() 0
QWARN : MaxWarnings::warn() 1
@@ -2002,7 +2002,7 @@ QWARN : MaxWarnings::warn() 1997
QWARN : MaxWarnings::warn() 1998
QWARN : MaxWarnings::warn() 1999
QWARN : MaxWarnings::warn() 2000
-QSYSTEM: MaxWarnings::warn() Maximum amount of warnings exceeded.
+QSYSTEM: MaxWarnings::warn() Maximum amount of warnings exceeded. Use -maxwarnings to override.
PASS : MaxWarnings::warn()
PASS : MaxWarnings::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro
index ca69afa..45de658 100644
--- a/tests/auto/selftests/selftests.pro
+++ b/tests/auto/selftests/selftests.pro
@@ -3,7 +3,7 @@ TEMPLATE = subdirs
SUBDIRS = subtest test warnings maxwarnings cmptest globaldata skipglobal skip \
strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \
skipinit skipinitdata datetime singleskip assert waitwithoutgui differentexec \
- exception qexecstringlist datatable commandlinedata\
+ exceptionthrow qexecstringlist datatable commandlinedata\
benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \
benchliboptions xunit badxml
diff --git a/tests/auto/selftests/selftests.qrc b/tests/auto/selftests/selftests.qrc
index d57ff29..3d78bf5 100644
--- a/tests/auto/selftests/selftests.qrc
+++ b/tests/auto/selftests/selftests.qrc
@@ -14,6 +14,7 @@
<file>expected_fetchbogus.txt</file>
<file>expected_crashes_1.txt</file>
<file>expected_crashes_2.txt</file>
+ <file>expected_crashes_3.txt</file>
<file>expected_multiexec.txt</file>
<file>expected_failinit.txt</file>
<file>expected_failinitdata.txt</file>
@@ -25,7 +26,7 @@
<file>expected_fatal.txt</file>
<file>expected_waitwithoutgui.txt</file>
<file>expected_differentexec.txt</file>
- <file>expected_exception.txt</file>
+ <file>expected_exceptionthrow.txt</file>
<file>expected_qexecstringlist.txt</file>
<file>expected_datatable.txt</file>
<file>expected_commandlinedata.txt</file>
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index de51f53..8eb7fe1 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -170,7 +170,7 @@ void tst_Selftests::runSubTest_data()
// with a warning that an uncaught exception was thrown.
// This will time out and falsely fail, therefore we disable the test for that platform.
# if !defined(Q_CC_INTEL) || !defined(Q_OS_WIN)
- QTest::newRow("exception") << "exception" << QStringList();
+ QTest::newRow("exceptionthrow") << "exceptionthrow" << QStringList();
# endif
#endif
QTest::newRow("qexecstringlist") << "qexecstringlist" << QStringList();
@@ -207,7 +207,7 @@ void tst_Selftests::doRunSubTest(QString &subdir, QStringList &arguments )
/* Windows-MSVC decide to output an error message when exceptions are thrown,
* so let's not check stderr for those. */
#if defined(Q_OS_WIN)
- if(subdir != QLatin1String("exception") && subdir != QLatin1String("fetchbogus"))
+ if(subdir != QLatin1String("exceptionthrow") && subdir != QLatin1String("fetchbogus"))
#endif
if(subdir != QLatin1String("xunit"))
QVERIFY2(err.isEmpty(), err.constData());
@@ -297,7 +297,9 @@ void tst_Selftests::runSubTest()
void tst_Selftests::initTestCase()
{
- m_checkXMLBlacklist.append("crashes"); // This test crashes
+#ifndef Q_OS_UNIX
+ m_checkXMLBlacklist.append("crashes"); // This test crashes (XML valid on Unix only)
+#endif
m_checkXMLBlacklist.append("waitwithoutgui"); // This test is not a QTestLib test.
/* Output from several tests is broken with the XML output method,
@@ -343,7 +345,7 @@ void tst_Selftests::checkXML() const
* this is what windows platforms says:
* "This application has requested the Runtime to terminate it in an unusual way.
* Please contact the application's support team for more information." */
- if(subdir != QLatin1String("exception") && subdir != QLatin1String("fetchbogus"))
+ if(subdir != QLatin1String("exceptionthrow") && subdir != QLatin1String("fetchbogus"))
QVERIFY2(err.isEmpty(), err.constData());
QXmlStreamReader reader(out);
@@ -385,7 +387,7 @@ void tst_Selftests::checkXunitxml() const
* this is what windows platforms says:
* "This application has requested the Runtime to terminate it in an unusual way.
* Please contact the application's support team for more information." */
- if(subdir != QLatin1String("exception") && subdir != QLatin1String("fetchbogus"))
+ if(subdir != QLatin1String("exceptionthrow") && subdir != QLatin1String("fetchbogus"))
QVERIFY2(err.isEmpty(), err.constData());
QXmlStreamReader reader(out);
diff --git a/tests/auto/selftests/xunit/xunit.pro b/tests/auto/selftests/xunit/xunit.pro
index 81ca157..55aca4a 100644
--- a/tests/auto/selftests/xunit/xunit.pro
+++ b/tests/auto/selftests/xunit/xunit.pro
@@ -1,15 +1,8 @@
load(qttest_p4)
SOURCES += tst_xunit.cpp
-wince*: {
- addImages.sources = images/*
- addImages.path = images
- DEPLOYMENT += addImages
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- contains(QT_CONFIG, qt3support): QT += qt3support
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
+mac:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
TARGET = xunit