forked from qt-creator/qt-creator
Provide plugin unit test for gtest code parsing
This test needs environment variable GOOGLETEST_DIR to point to an existing checkout of the googletest repository, or it will be skipped. Change-Id: I1e0ba250da84143b50f70589113ab6d6ea3a5b73 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
committed by
Niels Weber
parent
1abd193bb2
commit
02281ad429
@@ -818,6 +818,24 @@ int TestTreeModel::dataTagsCount() const
|
||||
}
|
||||
return dataTagCount;
|
||||
}
|
||||
|
||||
int TestTreeModel::gtestNamesCount() const
|
||||
{
|
||||
return m_googleTestRootItem ? m_googleTestRootItem->childCount() : 0;
|
||||
}
|
||||
|
||||
QMap<QString, int> TestTreeModel::gtestNamesAndSets() const
|
||||
{
|
||||
QMap<QString, int> result;
|
||||
|
||||
if (m_googleTestRootItem) {
|
||||
for (int row = 0, count = m_googleTestRootItem->childCount(); row < count; ++row) {
|
||||
const TestTreeItem *current = m_googleTestRootItem->childItem(row);
|
||||
result.insert(current->name(), current->childCount());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************** Sort/Filter Model **********************************/
|
||||
|
||||
Reference in New Issue
Block a user