forked from qt-creator/qt-creator
AutoTest: Unify test parse result implementations
This is also necessary for a uniform handling while adding or updating test tree items, which in turn makes it possible to separate model and items once more. Change-Id: I84ff558d23490c8734b22062f00e03e8c06d6720 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -47,12 +47,15 @@ class TestParseResult
|
||||
{
|
||||
public:
|
||||
explicit TestParseResult(TestTreeModel::Type t = TestTreeModel::Invalid) : type(t) {}
|
||||
virtual ~TestParseResult() {}
|
||||
virtual ~TestParseResult() { qDeleteAll(children); }
|
||||
|
||||
QVector<TestParseResult *> children;
|
||||
TestTreeModel::Type type;
|
||||
TestTreeItem::Type itemType = TestTreeItem::Root;
|
||||
QString displayName;
|
||||
QString fileName;
|
||||
QString proFile;
|
||||
QString testCaseName;
|
||||
QString name;
|
||||
unsigned line = 0;
|
||||
unsigned column = 0;
|
||||
};
|
||||
@@ -60,26 +63,22 @@ public:
|
||||
class QtTestParseResult : public TestParseResult
|
||||
{
|
||||
public:
|
||||
QtTestParseResult(TestTreeModel::Type t = TestTreeModel::Invalid) : TestParseResult(t) {}
|
||||
QMap<QString, TestCodeLocationAndType> functions;
|
||||
QMap<QString, TestCodeLocationList> dataTags;
|
||||
explicit QtTestParseResult() : TestParseResult(TestTreeModel::AutoTest) {}
|
||||
};
|
||||
|
||||
class QuickTestParseResult : public TestParseResult
|
||||
{
|
||||
public:
|
||||
QuickTestParseResult(TestTreeModel::Type t = TestTreeModel::Invalid) : TestParseResult(t) {}
|
||||
QMap<QString, TestCodeLocationAndType> functions;
|
||||
explicit QuickTestParseResult() : TestParseResult(TestTreeModel::QuickTest) {}
|
||||
};
|
||||
|
||||
class GoogleTestParseResult : public TestParseResult
|
||||
{
|
||||
public:
|
||||
GoogleTestParseResult(TestTreeModel::Type t = TestTreeModel::Invalid) : TestParseResult(t) {}
|
||||
explicit GoogleTestParseResult() : TestParseResult(TestTreeModel::GoogleTest) {}
|
||||
bool parameterized = false;
|
||||
bool typed = false;
|
||||
bool disabled = false;
|
||||
TestCodeLocationList testSets;
|
||||
};
|
||||
|
||||
using TestParseResultPtr = QSharedPointer<TestParseResult>;
|
||||
|
||||
Reference in New Issue
Block a user