mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-21 21:34:52 -04:00
updated tests and also fixed a few bugs in using random initialisation routines
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-NewGRouterModel@7839 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e8f5f44318
commit
ac4f51623b
17 changed files with 95 additions and 91 deletions
|
@ -15,18 +15,18 @@ RsSerialType* init_item(RsGxsGrpUpdateItem& i)
|
|||
{
|
||||
i.clear();
|
||||
i.grpUpdateTS = rand()%2424;
|
||||
i.peerId.random();
|
||||
i.peerId = RsPeerId::random();
|
||||
return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM);
|
||||
}
|
||||
|
||||
RsSerialType* init_item(RsGxsMsgUpdateItem& i)
|
||||
{
|
||||
i.clear();
|
||||
i.peerId.random();
|
||||
i.peerId = RsPeerId::random();
|
||||
int numUpdates = rand()%123;
|
||||
|
||||
RsPeerId peer;
|
||||
peer.random();
|
||||
peer = RsPeerId::random();
|
||||
for(int j=0; j < numUpdates; j++)
|
||||
{
|
||||
i.msgUpdateTS.insert(std::make_pair(peer, rand()%45));
|
||||
|
@ -46,7 +46,7 @@ RsSerialType* init_item(RsGxsServerGrpUpdateItem& i)
|
|||
RsSerialType* init_item(RsGxsServerMsgUpdateItem& i)
|
||||
{
|
||||
i.clear();
|
||||
i.grpId.random();
|
||||
i.grpId = RsGxsGroupId::random();
|
||||
i.msgUpdateTS = rand()%4252;
|
||||
return new RsGxsUpdateSerialiser(RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue