aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/followsymbol_switchmethoddecldef_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/followsymbol_switchmethoddecldef_test.cpp
parent71c27ba4cc1806d8c56e92de0aebdc69ae385aa4 (diff)
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/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r--src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
index 685febfe69..1087106c1f 100644
--- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
+++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
@@ -270,8 +270,13 @@ F2TestCase::F2TestCase(CppEditorAction action,
"No test file with target cursor marker is provided.");
// Write files to disk
- foreach (TestDocumentPtr testFile, testFiles)
+ CppTools::Tests::TemporaryDir temporaryDir;
+ QVERIFY(temporaryDir.isValid());
+ foreach (TestDocumentPtr testFile, testFiles) {
+ QVERIFY(testFile->baseDirectory().isEmpty());
+ testFile->setBaseDirectory(temporaryDir.path());
QVERIFY(testFile->writeToDisk());
+ }
// Update Code Model
QSet<QString> filePaths;