summaryrefslogtreecommitdiffstats
path: root/src/quicktestlib/quicktestresult_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktestlib/quicktestresult_p.h')
-rw-r--r--src/quicktestlib/quicktestresult_p.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/quicktestlib/quicktestresult_p.h b/src/quicktestlib/quicktestresult_p.h
index 4a283ea..a3c67be 100644
--- a/src/quicktestlib/quicktestresult_p.h
+++ b/src/quicktestlib/quicktestresult_p.h
@@ -54,7 +54,7 @@ class QuickTestResultPrivate;
class Q_QUICK_TEST_EXPORT QuickTestResult : public QObject
{
Q_OBJECT
- Q_ENUMS(FunctionType)
+ Q_ENUMS(FunctionType 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)
@@ -79,6 +79,13 @@ public:
CleanupFunc = 4
};
+ // Values must match QBenchmarkIterationController::RunMode.
+ enum RunMode
+ {
+ RepeatUntilValidMeasurement,
+ RunOnce
+ };
+
QString testCaseName() const;
void setTestCaseName(const QString &name);
@@ -131,6 +138,17 @@ public Q_SLOTS:
void wait(int ms);
void sleep(int ms);
+ void startMeasurement();
+ void beginDataRun();
+ void endDataRun();
+ bool measurementAccepted();
+ bool needsMoreMeasurements();
+
+ void startBenchmark(RunMode runMode, const QString &tag);
+ bool isBenchmarkDone() const;
+ void nextBenchmark();
+ void stopBenchmark();
+
public:
// Helper functions for the C++ main() shell.
static void parseArgs(int argc, char *argv[]);