mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 05:14:21 -04:00
fixed unit tests
This commit is contained in:
parent
1b8b9d4e56
commit
ebf54d1340
11 changed files with 47 additions and 36 deletions
|
@ -176,21 +176,21 @@ RsSerialType* init_item(RsNxsMsg& nxm)
|
|||
return new RsNxsSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM);
|
||||
}
|
||||
|
||||
RsSerialType* init_item(RsNxsSyncGrp& rsg)
|
||||
RsSerialType* init_item(RsNxsSyncGrpReqItem& rsg)
|
||||
{
|
||||
rsg.clear();
|
||||
rsg.flag = RsNxsSyncGrp::FLAG_USE_SYNC_HASH;
|
||||
rsg.flag = RsNxsSyncGrpItem::FLAG_USE_SYNC_HASH;
|
||||
rsg.createdSince = rand()%2423;
|
||||
randString(3124,rsg.syncHash);
|
||||
|
||||
return new RsNxsSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM);
|
||||
}
|
||||
|
||||
RsSerialType* init_item(RsNxsSyncMsg& rsgm)
|
||||
RsSerialType* init_item(RsNxsSyncMsgReqItem& rsgm)
|
||||
{
|
||||
rsgm.clear();
|
||||
|
||||
rsgm.flag = RsNxsSyncMsg::FLAG_USE_SYNC_HASH;
|
||||
rsgm.flag = RsNxsSyncMsgItem::FLAG_USE_SYNC_HASH;
|
||||
rsgm.createdSince = rand()%24232;
|
||||
rsgm.transactionNumber = rand()%23;
|
||||
init_random(rsgm.grpId) ;
|
||||
|
@ -223,7 +223,7 @@ RsSerialType* init_item(RsNxsSyncMsgItem& rsgml)
|
|||
return new RsNxsSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM);
|
||||
}
|
||||
|
||||
RsSerialType* init_item(RsNxsTransac& rstx){
|
||||
RsSerialType* init_item(RsNxsTransacItem &rstx){
|
||||
|
||||
rstx.clear();
|
||||
|
||||
|
@ -236,7 +236,7 @@ RsSerialType* init_item(RsNxsTransac& rstx){
|
|||
}
|
||||
|
||||
|
||||
bool operator==(const RsNxsSyncGrp& l, const RsNxsSyncGrp& r)
|
||||
bool operator==(const RsNxsSyncGrpReqItem& l, const RsNxsSyncGrpReqItem& r)
|
||||
{
|
||||
|
||||
if(l.syncHash != r.syncHash) return false;
|
||||
|
@ -247,7 +247,7 @@ bool operator==(const RsNxsSyncGrp& l, const RsNxsSyncGrp& r)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const RsNxsSyncMsg& l, const RsNxsSyncMsg& r)
|
||||
bool operator==(const RsNxsSyncMsgReqItem& l, const RsNxsSyncMsgReqItem& r)
|
||||
{
|
||||
|
||||
if(l.flag != r.flag) return false;
|
||||
|
@ -279,7 +279,7 @@ bool operator==(const RsNxsSyncMsgItem& l, const RsNxsSyncMsgItem& r)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const RsNxsTransac& l, const RsNxsTransac& r){
|
||||
bool operator==(const RsNxsTransacItem& l, const RsNxsTransacItem& r){
|
||||
|
||||
if(l.transactFlag != r.transactFlag) return false;
|
||||
if(l.transactionNumber != r.transactionNumber) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue