summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 22:20:47 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commit576b7dca4676ba2c1ea63afb6bbc96fd11183048 (patch)
tree5eef4087911e0e74ebcfb4d2026b811f0256cc71 /src/test
parentc97f245c597ebe8f488e72c435960dbee9bf66c6 (diff)
downloadmanaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.gz
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.bz2
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.xz
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.zip
improve dirs usage in Client.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/testlauncher.cpp10
-rw-r--r--src/test/testmain.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index b479ba9a3..1752e4380 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -53,7 +53,7 @@ TestLauncher::TestLauncher(std::string test) :
mTest(test),
file()
{
- file.open((Client::getLocalDataDirectory()
+ file.open((client->getLocalDataDirectory()
+ std::string("/test.log")).c_str(), std::ios::out);
}
@@ -252,9 +252,9 @@ int TestLauncher::testDye()
MSDL_gfxBlitRGBA(image->mSDLSurface, nullptr,
surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
- Client::getTempDirectory() + "/testimage1.png");
+ client->getTempDirectory() + "/testimage1.png");
ImageWriter::writePNG(surface,
- Client::getTempDirectory() + "/testimage2.png");
+ client->getTempDirectory() + "/testimage2.png");
}
rw = PHYSFSRWOPS_openRead(
@@ -271,9 +271,9 @@ int TestLauncher::testDye()
MSDL_gfxBlitRGBA(image->mSDLSurface, nullptr,
surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
- Client::getTempDirectory() + "/testimage3.png");
+ client->getTempDirectory() + "/testimage3.png");
ImageWriter::writePNG(surface,
- Client::getTempDirectory() + "/testimage4.png");
+ client->getTempDirectory() + "/testimage4.png");
}
}
}
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 893b477f9..3d4bdd33d 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -42,7 +42,7 @@ TestMain::TestMain() :
mConfig()
{
fileName = getSelfName();
- log->setLogFile(Client::getLocalDataDirectory()
+ log->setLogFile(client->getLocalDataDirectory()
+ std::string("/manaplustest.log"));
}
@@ -54,7 +54,7 @@ TestMain::~TestMain()
void TestMain::initConfig()
{
- mConfig.init(Client::getConfigDirectory() + "/test.xml");
+ mConfig.init(client->getConfigDirectory() + "/test.xml");
// mConfig.setDefaultValues(getConfigDefaults());
mConfig.setValue("hwaccel", false);
@@ -216,7 +216,7 @@ void TestMain::writeConfig(const int openGLMode, const int rescale,
const int sound, const std::string &info,
const int batchSize A_UNUSED, const int detectMode)
{
- mConfig.init(Client::getConfigDirectory() + "/config.xml");
+ mConfig.init(client->getConfigDirectory() + "/config.xml");
log->log("set mode to %d", openGLMode);
@@ -259,7 +259,7 @@ int TestMain::readValue(const int ver, int def)
std::string tmp;
int var;
std::ifstream file;
- file.open((Client::getLocalDataDirectory()
+ file.open((client->getLocalDataDirectory()
+ std::string("/test.log")).c_str(), std::ios::in);
if (!getline(file, tmp))
{