Remove Q_ASSERT's from xmlpatterns autotest
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 4 May 2011 01:17:49 +0000 (11:17 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 01:04:38 +0000 (11:04 +1000)
Verify initial state in initTestCase() rather than asserting in the
test class's constructor.

Change-Id: Ic7612a5368e35b2abda96828d2a95690baeaf6a9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit edd9d3f64f1532e39a80a2c7a97a2501391b2316)

tests/auto/xmlpatterns/tst_xmlpatterns.cpp

index 4d59f22..45aa8d6 100644 (file)
@@ -107,13 +107,13 @@ tst_XmlPatterns::tst_XmlPatterns() : m_generatedTests(0)
                                    , m_dontRun(false)
 {
     Q_SET_DEFAULT_IAP
-
-    Q_ASSERT(m_normalizeTestName.isValid());
-    Q_ASSERT(m_filenameInStderr.isValid());
 }
 
 void tst_XmlPatterns::initTestCase()
 {
+    QVERIFY(m_normalizeTestName.isValid());
+    QVERIFY(m_filenameInStderr.isValid());
+
     QProcess process;
     process.start(m_command);
 
@@ -121,7 +121,7 @@ void tst_XmlPatterns::initTestCase()
     {
         m_dontRun = true;
         QEXPECT_FAIL("", "The command line tool is not in the path, most likely because Qt "
-                         "has been partically built, such as only the sub-src rule. No tests will be run.", Abort);
+                         "has been partially built, such as only the sub-src rule. No tests will be run.", Abort);
         QVERIFY(false);
     }