AutoTest: Unify handling of run modes

Move used enums more central to avoid duplicating
information and unify their usages.

Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Christian Stenger
2017-09-05 13:57:22 +02:00
parent f885785564
commit 8288eadac6
13 changed files with 54 additions and 55 deletions

View File

@@ -50,13 +50,12 @@ class TestRunConfiguration;
using TestResultPtr = QSharedPointer<TestResult>;
class TestConfiguration
{
public:
explicit TestConfiguration();
virtual ~TestConfiguration();
void completeTestInformation(int runMode);
void completeTestInformation(TestRunMode runMode);
void setTestCases(const QStringList &testCases);
void setTestCaseCount(int count);
@@ -104,21 +103,15 @@ private:
class DebuggableTestConfiguration : public TestConfiguration
{
public:
enum RunMode
{
Run,
Debug
};
explicit DebuggableTestConfiguration(RunMode runMode = Run) : m_runMode(runMode) {}
explicit DebuggableTestConfiguration(TestRunMode runMode = TestRunMode::Run)
: m_runMode(runMode) {}
~DebuggableTestConfiguration() {}
void setRunMode(RunMode mode) { m_runMode = mode; }
RunMode runMode() const { return m_runMode; }
void setRunMode(TestRunMode mode) { m_runMode = mode; }
TestRunMode runMode() const { return m_runMode; }
bool isDebugRunMode() const;
private:
RunMode m_runMode;
TestRunMode m_runMode;
};
} // namespace Internal