forked from qt-creator/qt-creator
CppEditor: Tests: Move doxygen tests in separate test class
Change-Id: If27b4e11deafaefd95a5815466fc5fdac23ba30a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
4f7eb4e6b8
commit
f0aea93b44
@@ -344,18 +344,32 @@ IAssistProposalScopedPointer::~IAssistProposalScopedPointer()
|
||||
delete d->model();
|
||||
}
|
||||
|
||||
void VerifyCleanCppModelManager::verify()
|
||||
VerifyCleanCppModelManager::VerifyCleanCppModelManager()
|
||||
{
|
||||
QVERIFY(isClean());
|
||||
}
|
||||
|
||||
VerifyCleanCppModelManager::~VerifyCleanCppModelManager() {
|
||||
QVERIFY(isClean());
|
||||
}
|
||||
|
||||
#define RETURN_FALSE_IF_NOT(check) if (!(check)) return false;
|
||||
|
||||
bool VerifyCleanCppModelManager::isClean()
|
||||
{
|
||||
CppModelManager *mm = CppModelManager::instance();
|
||||
QVERIFY(mm);
|
||||
QVERIFY(mm->projectInfos().isEmpty());
|
||||
QVERIFY(mm->headerPaths().isEmpty());
|
||||
QVERIFY(mm->definedMacros().isEmpty());
|
||||
QVERIFY(mm->projectFiles().isEmpty());
|
||||
QVERIFY(mm->snapshot().isEmpty());
|
||||
QCOMPARE(mm->workingCopy().size(), 1);
|
||||
QVERIFY(mm->workingCopy().contains(mm->configurationFileName()));
|
||||
RETURN_FALSE_IF_NOT(mm);
|
||||
RETURN_FALSE_IF_NOT(mm->projectInfos().isEmpty());
|
||||
RETURN_FALSE_IF_NOT(mm->headerPaths().isEmpty());
|
||||
RETURN_FALSE_IF_NOT(mm->definedMacros().isEmpty());
|
||||
RETURN_FALSE_IF_NOT(mm->projectFiles().isEmpty());
|
||||
RETURN_FALSE_IF_NOT(mm->snapshot().isEmpty());
|
||||
RETURN_FALSE_IF_NOT(mm->workingCopy().size() == 1);
|
||||
RETURN_FALSE_IF_NOT(mm->workingCopy().contains(mm->configurationFileName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
#undef RETURN_FALSE_IF_NOT
|
||||
|
||||
} // namespace Tests
|
||||
} // namespace CppTools
|
||||
|
||||
Reference in New Issue
Block a user