summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppuseselections_test.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-12-10 17:03:49 +0100
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-01-14 12:10:39 +0100
commitd9c70f43d97a035a951c9e504e5c56259dfdacdb (patch)
treeda1be0c91b0f05eaa7a06e3d0e07e06015cffeba /src/plugins/cppeditor/cppuseselections_test.cpp
parent71c27ba4cc1806d8c56e92de0aebdc69ae385aa4 (diff)
downloadqt-creator-d9c70f43d97a035a951c9e504e5c56259dfdacdb.tar.gz
CppEditor: Tests: Use QTemporaryDir and avoid writing into creator source tree
This should improve results of CI tests where multiple creator instances execute the plugin tests. Change-Id: I557a0964568655662108df201589ba369096f4bf Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/cppeditor/cppuseselections_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppuseselections_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppuseselections_test.cpp b/src/plugins/cppeditor/cppuseselections_test.cpp
index 872a3a1042..d5ccc1ba89 100644
--- a/src/plugins/cppeditor/cppuseselections_test.cpp
+++ b/src/plugins/cppeditor/cppuseselections_test.cpp
@@ -89,6 +89,10 @@ UseSelectionsTestCase::UseSelectionsTestCase(TestDocument &testFile,
QVERIFY(testFile.hasCursorMarker());
testFile.m_source.remove(testFile.m_cursorPosition, 1);
+
+ CppTools::Tests::TemporaryDir temporaryDir;
+ QVERIFY(temporaryDir.isValid());
+ testFile.setBaseDirectory(temporaryDir.path());
testFile.writeToDisk();
QVERIFY(openCppEditor(testFile.filePath(), &testFile.m_editor, &m_editorWidget));