fixed compilation if --enable-unit-tests is used without --enable-integration-tests
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14903 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
This commit is contained in:
parent
c20be8c554
commit
b97d0be337
|
@ -20,12 +20,12 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#include "ClientTest.h"
|
||||
#include "base/test.h"
|
||||
#include "base/util/StringBuffer.h"
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
@ -1750,14 +1750,10 @@ private:
|
|||
ClientTest &client;
|
||||
};
|
||||
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
||||
void ClientTest::registerTests()
|
||||
{
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
factory = (void *)new ClientTestFactory(*this);
|
||||
CppUnit::TestFactoryRegistry::getRegistry().registerFactory((CppUnit::TestFactory *)factory);
|
||||
#endif
|
||||
}
|
||||
|
||||
ClientTest::ClientTest(int serverSleepSec, const std::string &serverLog) :
|
||||
|
@ -1770,11 +1766,9 @@ ClientTest::ClientTest(int serverSleepSec, const std::string &serverLog) :
|
|||
ClientTest::~ClientTest()
|
||||
{
|
||||
if(factory) {
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
CppUnit::TestFactoryRegistry::getRegistry().unregisterFactory((CppUnit::TestFactory *)factory);
|
||||
delete (CppUnit::TestFactory *)factory;
|
||||
factory = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2275,3 +2269,5 @@ void CheckSyncReport::check(SyncReport &report) const
|
|||
}
|
||||
LOG.debug("Done with checking sync report.");
|
||||
}
|
||||
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "spds/SyncSource.h"
|
||||
#include "spds/SyncReport.h"
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
/**
|
||||
* This class encapsulates logging and checking of a SyncReport.
|
||||
* When constructed with default parameters, no checking will be done.
|
||||
|
@ -417,4 +419,5 @@ class ClientTest {
|
|||
_expected, \
|
||||
_actual )
|
||||
|
||||
#endif
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
#endif // INCL_TESTSYNCCLIENT
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef ENABLE_INTEGRATION_TESTS
|
||||
|
||||
class TestFileSource : public ClientTest {
|
||||
public:
|
||||
TestFileSource(const std::string &id) :
|
||||
|
@ -304,3 +306,5 @@ public:
|
|||
private:
|
||||
TestFileSource testFileSource;
|
||||
} registerTest;
|
||||
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
|
Loading…
Reference in New Issue