forked from qt-creator/qt-creator
CppTools: Tests: Allow to check only project relevant state
Needed for ClangCodeModel. If editors are open, the global snapshot and working copy will not be empty. Change-Id: I0d1bab8e082a7f41630c7b1b78febe2da009298b Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -54,8 +54,10 @@ TestProject::~TestProject()
|
||||
{
|
||||
}
|
||||
|
||||
ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) :
|
||||
QObject(parent)
|
||||
ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent,
|
||||
bool testOnlyForCleanedProjects)
|
||||
: QObject(parent)
|
||||
, m_testOnlyForCleanedProjects(testOnlyForCleanedProjects)
|
||||
|
||||
{
|
||||
CppModelManager *mm = CppModelManager::instance();
|
||||
@@ -69,13 +71,13 @@ ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) :
|
||||
this, &ModelManagerTestHelper::gcFinished);
|
||||
|
||||
cleanup();
|
||||
QVERIFY(Tests::VerifyCleanCppModelManager::isClean());
|
||||
QVERIFY(Tests::VerifyCleanCppModelManager::isClean(m_testOnlyForCleanedProjects));
|
||||
}
|
||||
|
||||
ModelManagerTestHelper::~ModelManagerTestHelper()
|
||||
{
|
||||
cleanup();
|
||||
QVERIFY(Tests::VerifyCleanCppModelManager::isClean());
|
||||
QVERIFY(Tests::VerifyCleanCppModelManager::isClean(m_testOnlyForCleanedProjects));
|
||||
}
|
||||
|
||||
void ModelManagerTestHelper::cleanup()
|
||||
|
||||
Reference in New Issue
Block a user