summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppdoxygen_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/cppdoxygen_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/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index fbc5443d71..d57e2b5114 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -73,9 +73,13 @@ public:
{
QVERIFY(succeededSoFar());
+ // Write files to disk
+ CppTools::Tests::TemporaryDir temporaryDir;
+ QVERIFY(temporaryDir.isValid());
TestDocument testDocument("file.cpp", original, '|');
QVERIFY(testDocument.hasCursorMarker());
testDocument.m_source.remove(testDocument.m_cursorPosition, 1);
+ testDocument.setBaseDirectory(temporaryDir.path());
QVERIFY(testDocument.writeToDisk());
// Update Code Model