only include integration tests in anonymous namespace because CPPUnit unit tests become ugly otherwise
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@702 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
parent
76491facab
commit
c4c3b72430
|
@ -19,11 +19,6 @@
|
|||
#include "AddressBookSource.h"
|
||||
#include "SyncEvolutionUtil.h"
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static EvolutionSyncSource *createSource(const EvolutionSyncSourceParams ¶ms)
|
||||
{
|
||||
pair <string, string> sourceType = EvolutionSyncSource::getSourceType(params.m_nodes);
|
||||
|
@ -93,6 +88,11 @@ SYNCEVOLUTION_TEST_SUITE_REGISTRATION(EvolutionAddressbookTest);
|
|||
#endif // ENABLE_UNIT_TESTS
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static class VCard21Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
VCard21Test() : RegisterSyncSourceTest("addressbook_vcard21", "vcard21") {}
|
||||
|
@ -112,8 +112,8 @@ public:
|
|||
config.type = "apple-contacts:text/vcard";
|
||||
}
|
||||
} vCard30Test;
|
||||
|
||||
}
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#endif // ENABLE_ADDRESSBOOK
|
||||
|
||||
}
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static EvolutionSyncSource *createSource(const EvolutionSyncSourceParams ¶ms)
|
||||
{
|
||||
pair <string, string> sourceType = EvolutionSyncSource::getSourceType(params.m_nodes);
|
||||
|
@ -302,6 +297,11 @@ SYNCEVOLUTION_TEST_SUITE_REGISTRATION(EvolutionCalendarTest);
|
|||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static class iCal20Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
iCal20Test() : RegisterSyncSourceTest("ical20", "ical20") {}
|
||||
|
@ -371,8 +371,8 @@ public:
|
|||
config.type = "evolution-memos";
|
||||
}
|
||||
} memoTest;
|
||||
|
||||
}
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#endif // ENABLE_ECAL
|
||||
|
||||
}
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
#include "EvolutionContactSource.h"
|
||||
#include "SyncEvolutionUtil.h"
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static EvolutionSyncSource *createSource(const EvolutionSyncSourceParams ¶ms)
|
||||
{
|
||||
pair <string, string> sourceType = EvolutionSyncSource::getSourceType(params.m_nodes);
|
||||
|
@ -142,6 +137,11 @@ SYNCEVOLUTION_TEST_SUITE_REGISTRATION(EvolutionContactTest);
|
|||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* We are using the vcard30 tests because they are
|
||||
* a bit more complete than the vcard21 ones.
|
||||
|
@ -173,8 +173,9 @@ public:
|
|||
config.type = "evolution-contacts:text/vcard";
|
||||
}
|
||||
} vCard30Test;
|
||||
|
||||
}
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#endif // ENABLE_EBOOK
|
||||
|
||||
}
|
||||
|
|
|
@ -18,17 +18,6 @@
|
|||
|
||||
#include "FileSyncSource.h"
|
||||
|
||||
// The anonymous namespace ensures that we don't get
|
||||
// name clashes: although the classes and objects are
|
||||
// only defined in this file, the methods generated
|
||||
// for local classes will clash with other methods
|
||||
// of other classes with the same name if no namespace
|
||||
// is used.
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static EvolutionSyncSource *createSource(const EvolutionSyncSourceParams ¶ms)
|
||||
{
|
||||
pair <string, string> sourceType = EvolutionSyncSource::getSourceType(params.m_nodes);
|
||||
|
@ -104,9 +93,26 @@ SYNCEVOLUTION_TEST_SUITE_REGISTRATION(FileSyncSourceUnitTest);
|
|||
#endif // ENABLE_UNIT_TESTS
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
static class FileSyncSourceVCard21Test : public RegisterSyncSourceTest {
|
||||
|
||||
// The anonymous namespace ensures that we don't get
|
||||
// name clashes: although the classes and objects are
|
||||
// only defined in this file, the methods generated
|
||||
// for local classes will clash with other methods
|
||||
// of other classes with the same name if no namespace
|
||||
// is used.
|
||||
//
|
||||
// The code above is not yet inside the anonymous
|
||||
// name space because it would show up inside
|
||||
// the CPPUnit unit test names. Use a unique class
|
||||
// name there.
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static class VCard21Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
FileSyncSourceVCard21Test() : RegisterSyncSourceTest("file_vcard21", "vcard21") {}
|
||||
VCard21Test() : RegisterSyncSourceTest("file_vcard21", "vcard21") {}
|
||||
|
||||
virtual void updateConfig(ClientTestConfig &config) const
|
||||
{
|
||||
|
@ -114,40 +120,39 @@ public:
|
|||
// and leave everything else at its default
|
||||
config.type = "file:text/x-vcard:2.1";
|
||||
}
|
||||
} FileSyncSourceVCard21Test;
|
||||
} VCard21Test;
|
||||
|
||||
static class FileSyncSourceVCard30Test : public RegisterSyncSourceTest {
|
||||
static class VCard30Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
FileSyncSourceVCard30Test() : RegisterSyncSourceTest("file_vcard30", "vcard30") {}
|
||||
VCard30Test() : RegisterSyncSourceTest("file_vcard30", "vcard30") {}
|
||||
|
||||
virtual void updateConfig(ClientTestConfig &config) const
|
||||
{
|
||||
config.type = "file:text/vcard:3.0";
|
||||
}
|
||||
} FileSyncSourceVCard30Test;
|
||||
} VCard30Test;
|
||||
|
||||
static class FileSyncSourceICal20Test : public RegisterSyncSourceTest {
|
||||
static class ICal20Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
FileSyncSourceICal20Test() : RegisterSyncSourceTest("file_ical20", "ical20") {}
|
||||
ICal20Test() : RegisterSyncSourceTest("file_ical20", "ical20") {}
|
||||
|
||||
virtual void updateConfig(ClientTestConfig &config) const
|
||||
{
|
||||
config.type = "file:text/calendar:2.0";
|
||||
}
|
||||
} FileSyncSourceICal20Test;
|
||||
} ICal20Test;
|
||||
|
||||
static class FileSyncSourceITodo20Test : public RegisterSyncSourceTest {
|
||||
static class ITodo20Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
FileSyncSourceITodo20Test() : RegisterSyncSourceTest("file_itodo20", "itodo20") {}
|
||||
ITodo20Test() : RegisterSyncSourceTest("file_itodo20", "itodo20") {}
|
||||
|
||||
virtual void updateConfig(ClientTestConfig &config) const
|
||||
{
|
||||
config.type = "file:text/calendar:2.0";
|
||||
}
|
||||
} FileSyncSourceITodo20Test;
|
||||
} ITodo20Test;
|
||||
|
||||
}
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#endif // ENABLE_FILE
|
||||
|
||||
}
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
#include "SQLiteContactSource.h"
|
||||
#include "SyncEvolutionUtil.h"
|
||||
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static EvolutionSyncSource *createSource(const EvolutionSyncSourceParams ¶ms)
|
||||
{
|
||||
pair <string, string> sourceType = EvolutionSyncSource::getSourceType(params.m_nodes);
|
||||
|
@ -80,18 +75,23 @@ SYNCEVOLUTION_TEST_SUITE_REGISTRATION(EvolutionSQLiteContactsTest);
|
|||
#endif // ENABLE_UNIT_TESTS
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
static class SQLiteVCard21Test : public RegisterSyncSourceTest {
|
||||
namespace {
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
||||
static class VCard21Test : public RegisterSyncSourceTest {
|
||||
public:
|
||||
SQLiteVCard21Test() : RegisterSyncSourceTest("sqlite_vcard21", "vcard21") {}
|
||||
VCard21Test() : RegisterSyncSourceTest("sqlite_vcard21", "vcard21") {}
|
||||
|
||||
virtual void updateConfig(ClientTestConfig &config) const
|
||||
{
|
||||
config.type = "sqlite-contacts:text/x-vcard";
|
||||
config.testcases = "testcases/sqlite_vcard21.vcf";
|
||||
}
|
||||
} SQLiteVCard21Test;
|
||||
} VCard21Test;
|
||||
|
||||
}
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#endif // ENABLE_SQLITE
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue