CppTools: Remove test file after test

In test_includeGroups_detectIncludeGroupsByIncludeType the test file was
not removed and thus subsequent and isolated executions of this test
failed.

Change-Id: I5eeb4f004f5b146ac794ca913b4092629131fca3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-06-13 12:59:24 -04:00
parent 9acdb0bd35
commit cfe3c0be34
4 changed files with 42 additions and 6 deletions

View File

@@ -509,10 +509,12 @@ using CppTools::Internal::CppToolsPlugin;
static QList<Include> includesForSource(const QByteArray &source)
{
const QString fileName = TestIncludePaths::testFilePath();
CppTools::Tests::TestCase::writeFile(fileName, source);
FileWriterAndRemover scopedFile(fileName, source);
if (!scopedFile.writtenSuccessfully())
return QList<Include>();
using namespace CppTools::Internal;
CppModelManager *cmm = CppModelManager::instance();
cmm->GC();
CppSourceProcessor sourceProcessor((QPointer<CppModelManager>(cmm)));