blob: 8be3d4dd8101da9419f62026cf875c97da735c78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* Copyright (c) 2010 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include "Swiften/Application/Application.h"
#include "Swiften/Application/Platform/PlatformApplication.h"
using namespace Swift;
class ApplicationTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(ApplicationTest);
CPPUNIT_TEST(testGetSettingsDir);
CPPUNIT_TEST_SUITE_END();
public:
ApplicationTest() {}
void setUp() {
testling_ = new PlatformApplication("SwiftTest");
}
void tearDown() {
delete testling_;
}
void testGetSettingsDir() {
boost::filesystem::path dir = testling_->getSettingsDir();
CPPUNIT_ASSERT(boost::filesystem::exists(dir));
CPPUNIT_ASSERT(boost::filesystem::is_directory(dir));
boost::filesystem::remove(dir);
}
private:
Application* testling_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(ApplicationTest);
|