Fix UnitTest Compilation

This commit is contained in:
Phenom 2016-06-18 23:10:12 +02:00
parent 07bda26192
commit 43f618fedd
5 changed files with 18 additions and 18 deletions

View file

@ -67,10 +67,10 @@ void init_item(RsTlvSecurityKeySet& ks)
randString(SHORT_STR, ks.groupId);
for(int i=1; i<n; i++)
{
RsGxsId a_str;
a_str = RsGxsId::random();
RsGxsId a_str;
a_str = RsGxsId::random();
RsTlvSecurityKey_deprecated& a_key = ks.keys[a_str];
RsTlvPublicRSAKey& a_key = ks.public_keys[a_str];
init_item(a_key);
a_key.keyId = a_str;
}
@ -81,10 +81,10 @@ bool operator==(const RsTlvSecurityKeySet& l, const RsTlvSecurityKeySet& r)
if(l.groupId != r.groupId) return false;
std::map<RsGxsId, RsTlvSecurityKey_deprecated>::const_iterator l_cit = l.keys.begin(),
r_cit = r.keys.begin();
std::map<RsGxsId, RsTlvPublicRSAKey>::const_iterator l_cit = l.public_keys.begin(),
r_cit = r.public_keys.begin();
for(; l_cit != l.keys.end(); l_cit++, r_cit++){
for(; l_cit != l.public_keys.end(); l_cit++, r_cit++){
if(l_cit->first != r_cit->first) return false;
if(!(l_cit->second == r_cit->second)) return false;
}
@ -94,7 +94,7 @@ bool operator==(const RsTlvSecurityKeySet& l, const RsTlvSecurityKeySet& r)
bool operator==(const RsTlvSecurityKey_deprecated& sk1, const RsTlvSecurityKey_deprecated& sk2)
bool operator==(const RsTlvPublicRSAKey& sk1, const RsTlvPublicRSAKey& sk2)
{
if(sk1.startTS != sk2.startTS) return false;
@ -183,14 +183,14 @@ bool operator==(const RsTlvBinaryData& bd1, const RsTlvBinaryData& bd2)
}
void init_item(RsTlvSecurityKey_deprecated& sk)
void init_item(RsTlvPublicRSAKey& sk)
{
int randnum = rand()%313131;
sk.endTS = randnum;
sk.keyFlags = randnum;
sk.startTS = randnum;
sk.keyId = RsGxsId::random();
sk.keyId = RsGxsId::random();
std::string randomStr;
randString(LARGE_STR, randomStr);