e.fileName, e.lineNumber)
}
}
- return !qtest_results.dataFailed
+ return !qtest_results.failed
}
function qtest_runFunction(prop, arg) {
qtest_runInternal(prop, arg)
qtest_results.finishTestData()
qtest_runInternal("cleanup")
+ qtest_results.finishTestDataCleanup()
}
}
// Run the cleanup function.
qtest_runInternal("cleanup")
+ qtest_results.finishTestDataCleanup()
} while (!qtest_results.measurementAccepted())
qtest_results.endDataRun()
} while (qtest_results.needsMoreMeasurements())
var runTests = true
if (!qtest_runInternal("initTestCase"))
runTests = false
+ qtest_results.finishTestData()
+ qtest_results.finishTestDataCleanup()
qtest_results.finishTestFunction()
// Run the test methods.
// Clean up and exit.
running = false
completed = true
+ qtest_results.finishTestData()
+ qtest_results.finishTestDataCleanup()
qtest_results.finishTestFunction()
qtest_results.functionName = ""
results.fail(errors.at(0).description(),
errors.at(0).url(), errors.at(0).line());
results.finishTestData();
+ results.finishTestDataCleanup();
results.finishTestFunction();
results.setFunctionName(QString());
results.stopLogging();
/*!
\qmlproperty bool TestResult::failed
- This property returns true if the current test function has
- failed; false otherwise. The fail state is reset when
- functionName is changed or finishTestFunction() is called.
+ This property returns true if the current test function (or
+ current test data row for a data-driven test) has failed;
+ false otherwise. The fail state is reset when functionName
+ is changed or finishTestDataCleanup() is called.
- \sa skipped, dataFailed
+ \sa skipped
*/
bool QuickTestResult::isFailed() const
{
- return QTestResult::testFailed();
-}
-
-/*!
- \qmlproperty bool TestResult::dataFailed
-
- This property returns true if the current data function has
- failed; false otherwise. The fail state is reset when
- functionName is changed or finishTestFunction() is called.
-
- \sa failed
-*/
-bool QuickTestResult::isDataFailed() const
-{
return QTestResult::currentTestFailed();
}
QTestResult::finishedCurrentTestData();
}
+void QuickTestResult::finishTestDataCleanup()
+{
+ QTestResult::finishedCurrentTestDataCleanup();
+}
+
void QuickTestResult::finishTestFunction()
{
QTestResult::finishedCurrentTestFunction();
Q_PROPERTY(QString functionName READ functionName WRITE setFunctionName NOTIFY functionNameChanged)
Q_PROPERTY(QString dataTag READ dataTag WRITE setDataTag NOTIFY dataTagChanged)
Q_PROPERTY(bool failed READ isFailed)
- Q_PROPERTY(bool dataFailed READ isDataFailed)
Q_PROPERTY(bool skipped READ isSkipped WRITE setSkipped NOTIFY skippedChanged)
Q_PROPERTY(int passCount READ passCount)
Q_PROPERTY(int failCount READ failCount)
void setDataTag(const QString &tag);
bool isFailed() const;
- bool isDataFailed() const;
bool isSkipped() const;
void setSkipped(bool skip);
void clearTestTable();
void finishTestData();
+ void finishTestDataCleanup();
void finishTestFunction();
void fail(const QString &message, const QUrl &location, int line);