[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdelibs/frameworks] kdeui/tests: create dir first, fixes test
From:       David Faure <faure () kde ! org>
Date:       2012-06-12 13:40:28
Message-ID: 20120612134028.A45E8A60B9 () git ! kde ! org
[Download RAW message or body]

Git commit c97c87b508b435bdb20daa3eaa20297bdefc7ea7 by David Faure.
Committed on 12/06/2012 at 15:40.
Pushed by dfaure into branch 'frameworks'.

create dir first, fixes test

M  +2    -1    kdeui/tests/kxmlgui_unittest.cpp

http://commits.kde.org/kdelibs/c97c87b508b435bdb20daa3eaa20297bdefc7ea7

diff --git a/kdeui/tests/kxmlgui_unittest.cpp b/kdeui/tests/kxmlgui_unittest.cpp
index 4b233ea..5f46bd0 100644
--- a/kdeui/tests/kxmlgui_unittest.cpp
+++ b/kdeui/tests/kxmlgui_unittest.cpp
@@ -169,8 +169,9 @@ void KXmlGui_UnitTest::testVersionHandlerNewVersionNothingKept()
 
     QMap<QString, int> fileToVersionMap; // makes QCOMPARE failures more readable \
than just temp filenames  
+    QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
     QFile fileV2(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + \
                QLatin1Char('/') + "testui.rc");
-    QVERIFY(fileV2.open(QIODevice::WriteOnly));
+    QVERIFY2(fileV2.open(QIODevice::WriteOnly), qPrintable(fileV2.fileName()));
     createXmlFile(fileV2, 2, NoFlags);
     fileToVersionMap.insert(fileV2.fileName(), 2);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic