testlib: Improve verbose and XPASS output
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 29 Feb 2012 05:36:21 +0000 (15:36 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Mar 2012 01:02:49 +0000 (02:02 +0100)
Call only the eight-argument version of QTestResult::compare(), as the
four-argument version will soon be removed from the API.

Change-Id: I9e7b95a30b01fb5e084f2954aeb380b492760484
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
src/qmltest/quicktestresult.cpp

index 33c5fef..d33eab4 100644 (file)
@@ -379,18 +379,12 @@ bool QuickTestResult::compare
      const QString &val1, const QString &val2,
      const QUrl &location, int line)
 {
-    if (success) {
-        return QTestResult::compare
-            (success, message.toLocal8Bit().constData(),
-             qtestFixUrl(location).toLatin1().constData(), line);
-    } else {
-        return QTestResult::compare
-            (success, message.toLocal8Bit().constData(),
-             QTest::toString(val1.toLatin1().constData()),
-             QTest::toString(val2.toLatin1().constData()),
-             "", "",
-             qtestFixUrl(location).toLatin1().constData(), line);
-    }
+    return QTestResult::compare
+        (success, message.toLocal8Bit().constData(),
+         QTest::toString(val1.toLatin1().constData()),
+         QTest::toString(val2.toLatin1().constData()),
+         "", "",
+         qtestFixUrl(location).toLatin1().constData(), line);
 }
 
 void QuickTestResult::skip