CppTools: Fix test_modelmanager_extraeditorsupport_uiFiles

The test was broken since the QmakeProject was changed to work
asynchronously.

FAIL!  : CppTools::Internal::CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles() Compared values are not the same
   Actual   (workingCopy.size()): 1
   Expected (2)                 : 2

Change-Id: I6f7d05fb70af3def5fc371a9783b606309686e32
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-12-09 17:09:45 +01:00
committed by Erik Verbruggen
parent ef403a4515
commit b94b7b3ee6
7 changed files with 78 additions and 75 deletions

View File

@@ -30,6 +30,7 @@
#include "modelmanagertesthelper.h"
#include "cpptoolstestcase.h"
#include "cppworkingcopy.h"
#include <QtTest>
@@ -68,13 +69,13 @@ ModelManagerTestHelper::ModelManagerTestHelper(QObject *parent) :
connect(mm, SIGNAL(gcFinished()), this, SLOT(gcFinished()));
cleanup();
verifyClean();
Tests::VerifyCleanCppModelManager::verify();
}
ModelManagerTestHelper::~ModelManagerTestHelper()
{
cleanup();
verifyClean();
Tests::VerifyCleanCppModelManager::verify();
}
void ModelManagerTestHelper::cleanup()
@@ -90,20 +91,6 @@ void ModelManagerTestHelper::cleanup()
waitForFinishedGc();
}
void ModelManagerTestHelper::verifyClean()
{
CppModelManager *mm = CppModelManager::instance();
assert(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()));
}
ModelManagerTestHelper::Project *ModelManagerTestHelper::createProject(const QString &name)
{
TestProject *tp = new TestProject(name, this);