forked from qt-creator/qt-creator
Clang: Tests: Use global temporary dir to remove test file later
Change-Id: Ic31428db15ebbc3a4fc5d5a24723d3a557b77b58 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -80,6 +80,13 @@ QString qrcPath(const QByteArray relativeFilePath)
|
||||
QString fileName(const QString &filePath)
|
||||
{ return QFileInfo(filePath).fileName(); }
|
||||
|
||||
CppTools::Tests::TemporaryDir *globalTemporaryDir()
|
||||
{
|
||||
static CppTools::Tests::TemporaryDir dir;
|
||||
QTC_CHECK(dir.isValid());
|
||||
return &dir;
|
||||
}
|
||||
|
||||
struct LogOutput
|
||||
{
|
||||
LogOutput(const QString &text) : text(text.toUtf8()) {}
|
||||
@@ -576,7 +583,7 @@ public:
|
||||
CppTools::Tests::TestCase garbageCollectionGlobalSnapshot;
|
||||
QVERIFY(garbageCollectionGlobalSnapshot.succeededSoFar());
|
||||
|
||||
const TestDocument testDocument(testFileName);
|
||||
const TestDocument testDocument(testFileName, globalTemporaryDir());
|
||||
QVERIFY(testDocument.isCreatedAndHasValidCursorPosition());
|
||||
OpenEditorAtCursorPosition openEditor(testDocument);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user