mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
Fix UnitTest compilation
But running failed.
This commit is contained in:
parent
cac335e7f6
commit
1c2b43b7e0
@ -156,6 +156,19 @@ void RsNxsGrp::clear()
|
|||||||
meta.TlvClear();
|
meta.TlvClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RsNxsGrp* RsNxsGrp::clone() const {
|
||||||
|
RsNxsGrp* grp = new RsNxsGrp(this->grp.tlvtype);
|
||||||
|
*grp = *this;
|
||||||
|
|
||||||
|
if(this->metaData)
|
||||||
|
{
|
||||||
|
grp->metaData = new RsGxsGrpMetaData();
|
||||||
|
*(grp->metaData) = *(this->metaData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return grp;
|
||||||
|
}
|
||||||
|
|
||||||
void RsNxsSyncGrpReqItem::clear()
|
void RsNxsSyncGrpReqItem::clear()
|
||||||
{
|
{
|
||||||
flag = 0;
|
flag = 0;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "retroshare/rsids.h"
|
#include "retroshare/rsids.h"
|
||||||
|
#include "rsitems/rsitem.h"
|
||||||
#include "serialiser/rsserial.h"
|
#include "serialiser/rsserial.h"
|
||||||
|
|
||||||
#include "testing/IsolatedServiceTester.h"
|
#include "testing/IsolatedServiceTester.h"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
#include "SetFilter.h"
|
#include "SetFilter.h"
|
||||||
|
|
||||||
|
#include "rsitems/rsitem.h"
|
||||||
|
|
||||||
bool SetFilter::filter(const SetPacket &pkt)
|
bool SetFilter::filter(const SetPacket &pkt)
|
||||||
{
|
{
|
||||||
switch(mFilterMode)
|
switch(mFilterMode)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "retroshare/rsids.h"
|
#include "retroshare/rsids.h"
|
||||||
|
#include "rsitems/rsitem.h"
|
||||||
#include "pqi/p3linkmgr.h"
|
#include "pqi/p3linkmgr.h"
|
||||||
|
|
||||||
#include "SetPacket.h"
|
#include "SetPacket.h"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
#include "gxs/rsgxsdata.h"
|
#include "gxs/rsgxsdata.h"
|
||||||
|
|
||||||
#define RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM 0x012
|
#define RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM 0x012
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define RSDATASERVICE_TEST_H
|
#define RSDATASERVICE_TEST_H
|
||||||
|
|
||||||
#include "util/rsthreads.h"
|
#include "util/rsthreads.h"
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
#include "gxs/rsgds.h"
|
#include "gxs/rsgds.h"
|
||||||
|
|
||||||
void test_messageStoresAndRetrieve();
|
void test_messageStoresAndRetrieve();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "gxs/rsnxs.h"
|
#include "gxs/rsnxs.h"
|
||||||
#include "gxs/rsgixs.h"
|
#include "gxs/rsgixs.h"
|
||||||
#include "serialiser/rsgxsitems.h"
|
#include "rsitems/rsgxsitems.h"
|
||||||
|
|
||||||
class RsDummyNetService: public RsNetworkExchangeService
|
class RsDummyNetService: public RsNetworkExchangeService
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "serialiser/rsgxsiditems.h"
|
#include "rsitems/rsgxsiditems.h"
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
#include "serialiser/rsgxsupdateitems.h"
|
#include "rsitems/rsgxsupdateitems.h"
|
||||||
#define RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM 0x0010
|
#define RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM 0x0010
|
||||||
|
|
||||||
RsSerialType* init_item(RsGxsGrpUpdateItem& i)
|
RsSerialType* init_item(RsGxsGrpUpdateItem& i)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "util/rsrandom.h"
|
#include "util/rsrandom.h"
|
||||||
#include "serialiser/rsmsgitems.h"
|
#include "rsitems/rsmsgitems.h"
|
||||||
#include "chat/rschatitems.h"
|
#include "chat/rschatitems.h"
|
||||||
|
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
@ -141,7 +141,7 @@ RsSerialType* init_item(RsMsgItem& mi)
|
|||||||
mi.sendTime = mi.recvTime;
|
mi.sendTime = mi.recvTime;
|
||||||
mi.msgFlags = mi.recvTime;
|
mi.msgFlags = mi.recvTime;
|
||||||
|
|
||||||
return new RsMsgSerialiser(true);
|
return new RsMsgSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
RsSerialType* init_item(RsMsgTagType& mtt)
|
RsSerialType* init_item(RsMsgTagType& mtt)
|
||||||
@ -150,7 +150,7 @@ RsSerialType* init_item(RsMsgTagType& mtt)
|
|||||||
mtt.tagId = rand()%24242;
|
mtt.tagId = rand()%24242;
|
||||||
randString(SHORT_STR, mtt.text);
|
randString(SHORT_STR, mtt.text);
|
||||||
|
|
||||||
return new RsMsgSerialiser();
|
return new RsMsgSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ RsSerialType* init_item(RsMsgTags& mt)
|
|||||||
mt.tagIds.push_back(rand()%21341);
|
mt.tagIds.push_back(rand()%21341);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RsMsgSerialiser();
|
return new RsMsgSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
RsSerialType* init_item(RsMsgSrcId& ms)
|
RsSerialType* init_item(RsMsgSrcId& ms)
|
||||||
@ -171,7 +171,7 @@ RsSerialType* init_item(RsMsgSrcId& ms)
|
|||||||
ms.msgId = rand()%434;
|
ms.msgId = rand()%434;
|
||||||
ms.srcId = RsPeerId::random();
|
ms.srcId = RsPeerId::random();
|
||||||
|
|
||||||
return new RsMsgSerialiser();
|
return new RsMsgSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
RsSerialType* init_item(RsMsgParentId& ms)
|
RsSerialType* init_item(RsMsgParentId& ms)
|
||||||
@ -179,7 +179,7 @@ RsSerialType* init_item(RsMsgParentId& ms)
|
|||||||
ms.msgId = rand()%354;
|
ms.msgId = rand()%354;
|
||||||
ms.msgParentId = rand()%476;
|
ms.msgParentId = rand()%476;
|
||||||
|
|
||||||
return new RsMsgSerialiser();
|
return new RsMsgSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator ==(const struct VisibleChatLobbyInfo& l, const struct VisibleChatLobbyInfo& r)
|
bool operator ==(const struct VisibleChatLobbyInfo& l, const struct VisibleChatLobbyInfo& r)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
#include "libretroshare/gxs/common/data_support.h"
|
#include "libretroshare/gxs/common/data_support.h"
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
|
|
||||||
|
|
||||||
#define NUM_BIN_OBJECTS 5
|
#define NUM_BIN_OBJECTS 5
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
#include "serialiser/rsstatusitems.h"
|
#include "rsitems/rsstatusitems.h"
|
||||||
|
|
||||||
RsSerialType* init_item(RsStatusItem& rsi)
|
RsSerialType* init_item(RsStatusItem& rsi)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// from libretroshare
|
// from libretroshare
|
||||||
#include "services/p3statusservice.h"
|
#include "services/p3statusservice.h"
|
||||||
#include "serialiser/rsstatusitems.h"
|
#include "rsitems/rsstatusitems.h"
|
||||||
#include "gxs/rsgixs.h"
|
#include "gxs/rsgixs.h"
|
||||||
#include "gxs/rsdataservice.h"
|
#include "gxs/rsdataservice.h"
|
||||||
#include "gxs/rsgxsnetservice.h"
|
#include "gxs/rsgxsnetservice.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "gxstestservice.h"
|
#include "gxstestservice.h"
|
||||||
|
|
||||||
// libretroshare
|
// libretroshare
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
|
|
||||||
GxsPairServiceTester::GxsPairServiceTester(const RsPeerId &peerId1, const RsPeerId &peerId2, int testMode, bool useIdentityService)
|
GxsPairServiceTester::GxsPairServiceTester(const RsPeerId &peerId1, const RsPeerId &peerId2, int testMode, bool useIdentityService)
|
||||||
:SetServiceTester()
|
:SetServiceTester()
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// from librssimulator
|
// from librssimulator
|
||||||
|
|
||||||
// from libretroshare
|
// from libretroshare
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
|
|
||||||
// local
|
// local
|
||||||
#include "GxsPairServiceTester.h"
|
#include "GxsPairServiceTester.h"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
//#include "gxs/rsgixs.h"
|
//#include "gxs/rsgixs.h"
|
||||||
//#include "gxs/rsdataservice.h"
|
//#include "gxs/rsdataservice.h"
|
||||||
//#include "gxs/rsgxsnetservice.h"
|
//#include "gxs/rsgxsnetservice.h"
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
|
|
||||||
// local
|
// local
|
||||||
#include "GxsIsolatedServiceTester.h"
|
#include "GxsIsolatedServiceTester.h"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// from librssimulator
|
// from librssimulator
|
||||||
|
|
||||||
// from libretroshare
|
// from libretroshare
|
||||||
#include "serialiser/rsnxsitems.h"
|
#include "rsitems/rsnxsitems.h"
|
||||||
|
|
||||||
// local
|
// local
|
||||||
#include "GxsPairServiceTester.h"
|
#include "GxsPairServiceTester.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "rsitems/rsserviceids.h"
|
#include "rsitems/rsserviceids.h"
|
||||||
#include "serialiser/rsserial.h"
|
#include "serialiser/rsserial.h"
|
||||||
|
|
||||||
#include "serialiser/rsgxsitems.h"
|
#include "rsitems/rsgxsitems.h"
|
||||||
#include "gxstestservice.h"
|
#include "gxstestservice.h"
|
||||||
|
|
||||||
const uint8_t RS_PKT_SUBTYPE_TEST_GROUP_ITEM = 0x02;
|
const uint8_t RS_PKT_SUBTYPE_TEST_GROUP_ITEM = 0x02;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// from libretroshare
|
// from libretroshare
|
||||||
#include "services/p3statusservice.h"
|
#include "services/p3statusservice.h"
|
||||||
#include "serialiser/rsstatusitems.h"
|
#include "rsitems/rsstatusitems.h"
|
||||||
|
|
||||||
#define N_PEERS 10
|
#define N_PEERS 10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user