aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/testlib/TestCase.qml11
-rw-r--r--src/qmltest/quicktest.cpp2
-rw-r--r--src/qmltest/quicktestresult.cpp11
-rw-r--r--src/qmltest/quicktestresult_p.h17
4 files changed, 1 insertions, 40 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index a1ab85c4cb..02fa095da2 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -481,16 +481,12 @@ Item {
}
function qtest_runFunction(prop, arg) {
- qtest_results.functionType = TestResult.InitFunc
qtest_runInternal("init")
if (!qtest_results.skipped) {
- qtest_results.functionType = TestResult.Func
qtest_runInternal(prop, arg)
qtest_results.finishTestData()
- qtest_results.functionType = TestResult.CleanupFunc
qtest_runInternal("cleanup")
}
- qtest_results.functionType = TestResult.NoWhere
}
function qtest_runBenchmarkFunction(prop, arg) {
@@ -499,13 +495,11 @@ Item {
qtest_results.beginDataRun()
do {
// Run the initialization function.
- qtest_results.functionType = TestResult.InitFunc
qtest_runInternal("init")
if (qtest_results.skipped)
break
// Execute the benchmark function.
- qtest_results.functionType = TestResult.Func
if (prop.indexOf("benchmark_once_") != 0)
qtest_results.startBenchmark(TestResult.RepeatUntilValidMeasurement, qtest_results.dataTag)
else
@@ -520,9 +514,7 @@ Item {
qtest_results.stopBenchmark()
// Run the cleanup function.
- qtest_results.functionType = TestResult.CleanupFunc
qtest_runInternal("cleanup")
- qtest_results.functionType = TestResult.NoWhere
} while (!qtest_results.measurementAccepted())
qtest_results.endDataRun()
} while (qtest_results.needsMoreMeasurements())
@@ -571,7 +563,6 @@ Item {
// Run the initTestCase function.
qtest_results.functionName = "initTestCase"
- qtest_results.functionType = TestResult.InitFunc
var runTests = true
if (!qtest_runInternal("initTestCase"))
runTests = false
@@ -603,7 +594,6 @@ Item {
}
qtest_results.functionName = prop
if (datafunc in testCase) {
- qtest_results.functionType = TestResult.DataFunc
if (qtest_runInternal(datafunc)) {
var table = qtest_testCaseResult
var haveData = false
@@ -637,7 +627,6 @@ Item {
// Run the cleanupTestCase function.
qtest_results.skipped = false
qtest_results.functionName = "cleanupTestCase"
- qtest_results.functionType = TestResult.CleanupFunc
qtest_runInternal("cleanupTestCase")
// Complain about missing functions that we were supposed to run.
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index ed5fa7b3f8..551311cd28 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -142,7 +142,6 @@ template <class View> void handleCompileErrors(const QFileInfo &fi, const View &
results.setTestCaseName(fi.baseName());
results.startLogging();
results.setFunctionName(QLatin1String("compile"));
- results.setFunctionType(QuickTestResult::Func);
// Verbose warning output of all messages and relevant parameters
QString message;
QTextStream str(&message);
@@ -176,7 +175,6 @@ template <class View> void handleCompileErrors(const QFileInfo &fi, const View &
results.finishTestData();
results.finishTestFunction();
results.setFunctionName(QString());
- results.setFunctionType(QuickTestResult::NoWhere);
results.stopLogging();
}
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index c1c5368eeb..ddfa928f96 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -163,17 +163,6 @@ void QuickTestResult::setFunctionName(const QString &name)
emit functionNameChanged();
}
-QuickTestResult::FunctionType QuickTestResult::functionType() const
-{
- return FunctionType(QTestResult::currentTestLocation());
-}
-
-void QuickTestResult::setFunctionType(FunctionType type)
-{
- QTestResult::setCurrentTestLocation(QTestResult::TestLocation(type));
- emit functionTypeChanged();
-}
-
/*!
\qmlproperty string TestResult::dataTag
diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h
index 2c37faba7e..f6f0c3a1b3 100644
--- a/src/qmltest/quicktestresult_p.h
+++ b/src/qmltest/quicktestresult_p.h
@@ -56,10 +56,9 @@ class QuickTestResultPrivate;
class Q_QUICK_TEST_EXPORT QuickTestResult : public QObject
{
Q_OBJECT
- Q_ENUMS(FunctionType RunMode)
+ Q_ENUMS(RunMode)
Q_PROPERTY(QString testCaseName READ testCaseName WRITE setTestCaseName NOTIFY testCaseNameChanged)
Q_PROPERTY(QString functionName READ functionName WRITE setFunctionName NOTIFY functionNameChanged)
- Q_PROPERTY(FunctionType functionType READ functionType WRITE setFunctionType NOTIFY functionTypeChanged)
Q_PROPERTY(QString dataTag READ dataTag WRITE setDataTag NOTIFY dataTagChanged)
Q_PROPERTY(bool failed READ isFailed)
Q_PROPERTY(bool dataFailed READ isDataFailed)
@@ -72,16 +71,6 @@ public:
QuickTestResult(QObject *parent = 0);
~QuickTestResult();
- // Values must match QTestResult::TestLocation.
- enum FunctionType
- {
- NoWhere = 0,
- DataFunc = 1,
- InitFunc = 2,
- Func = 3,
- CleanupFunc = 4
- };
-
// Values must match QBenchmarkIterationController::RunMode.
enum RunMode
{
@@ -95,9 +84,6 @@ public:
QString functionName() const;
void setFunctionName(const QString &name);
- FunctionType functionType() const;
- void setFunctionType(FunctionType type);
-
QString dataTag() const;
void setDataTag(const QString &tag);
@@ -164,7 +150,6 @@ Q_SIGNALS:
void programNameChanged();
void testCaseNameChanged();
void functionNameChanged();
- void functionTypeChanged();
void dataTagChanged();
void skippedChanged();