testStelFileMgr.cpp   testStelFileMgr.cpp 
skipping to change at line 47 skipping to change at line 47
{ {
partialPath1 = "testfilemgr/path1"; partialPath1 = "testfilemgr/path1";
partialPath2 = "testfilemgr/path2"; partialPath2 = "testfilemgr/path2";
workingDir = QDir::tempPath(); workingDir = QDir::tempPath();
workingDir.replace(QRegExp("/+$"), ""); // sometimes the temp path will have / on the end... zap it. workingDir.replace(QRegExp("/+$"), ""); // sometimes the temp path will have / on the end... zap it.
if (!QDir::setCurrent(workingDir)) if (!QDir::setCurrent(workingDir))
{ {
QFAIL(qPrintable("could not set the working directory to: "+ workingDir)); QFAIL(qPrintable("could not set the working directory to: "+ workingDir));
} }
qDebug() << "working directory: " << QDir::currentPath(); qDebug() << "working directory: " << QDir::toNativeSeparators(QDir:: currentPath());
StelFileMgr::init(); StelFileMgr::init();
// set up a directory hierarchy to test on... // set up a directory hierarchy to test on...
testDirs << "testfilemgr" testDirs << "testfilemgr"
<< partialPath1 << partialPath1
<< partialPath1+"/landscapes" << partialPath1+"/landscapes"
<< partialPath1+"/landscapes/ls1" << partialPath1+"/landscapes/ls1"
<< partialPath1+"/landscapes/ls2" << partialPath1+"/landscapes/ls2"
<< partialPath1+"/landscapes/emptydir" << partialPath1+"/landscapes/emptydir"
skipping to change at line 106 skipping to change at line 106
} }
void TestStelFileMgr::cleanupTestCase() void TestStelFileMgr::cleanupTestCase()
{ {
// delete test files // delete test files
foreach(QString p, testFiles) foreach(QString p, testFiles)
{ {
QFile f(p); QFile f(p);
if (!f.remove()) if (!f.remove())
{ {
qWarning() << "could not clean up file:" << workingD ir + "/" + p; qWarning() << "could not clean up file:" << QDir::to NativeSeparators(workingDir + "/" + p);
} }
} }
// remove test directories // remove test directories
// go over dirs in reverse // go over dirs in reverse
for(int i=testDirs.size()-1; i>=0; i--) for(int i=testDirs.size()-1; i>=0; i--)
{ {
if (!QDir().rmdir(testDirs.at(i))) if (!QDir().rmdir(testDirs.at(i)))
{ {
qWarning() << "could not clean up directory:" << wor kingDir + "/" + testDirs.at(i); qWarning() << "could not clean up directory:" << QDi r::toNativeSeparators(workingDir + "/" + testDirs.at(i));
} }
} }
} }
void TestStelFileMgr::testFindFileVanilla() void TestStelFileMgr::testFindFileVanilla()
{ {
QString exists, notExists; QString exists, notExists;
try { exists = StelFileMgr::findFile("landscapes"); } catch (std::ru ntime_error&) {} try { exists = StelFileMgr::findFile("landscapes"); } catch (std::ru ntime_error&) {}
try { notExists = StelFileMgr::findFile("notexists"); } catch (std:: runtime_error&) {} try { notExists = StelFileMgr::findFile("notexists"); } catch (std:: runtime_error&) {}
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/