2018-11-04 15:17:22 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* unittests/libretroshare/serialiser/rsgxsiditem_test.cc *
|
|
|
|
* *
|
2018-11-11 14:42:48 -05:00
|
|
|
* Copyright 2007-2008 by Cyril Soler <retroshare.project@gmail.com> *
|
2018-11-04 15:17:22 -05:00
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Lesser General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
******************************************************************************/
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
2017-05-04 09:01:25 -04:00
|
|
|
#include "rsitems/rsgxsiditems.h"
|
2014-04-05 03:27:18 -04:00
|
|
|
#include "support.h"
|
|
|
|
|
|
|
|
|
|
|
|
bool operator==(const RsGxsIdGroupItem& it1,const RsGxsIdGroupItem& it2)
|
|
|
|
{
|
2015-12-13 11:22:31 -05:00
|
|
|
if(it1.mPgpIdSign != it2.mPgpIdSign) return false ;
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
return true ;
|
|
|
|
}
|
2017-07-24 06:16:06 -04:00
|
|
|
void init_item(RsGxsIdGroupItem& item)
|
2014-04-05 03:27:18 -04:00
|
|
|
{
|
2015-12-13 11:22:31 -05:00
|
|
|
item.mPgpIdSign = "hello";
|
2014-04-05 03:27:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(libretroshare_serialiser, RsGxsIdItem)
|
|
|
|
{
|
|
|
|
for(uint32_t i=0;i<20;++i)
|
|
|
|
{
|
2017-07-24 06:16:06 -04:00
|
|
|
test_RsItem< RsGxsIdGroupItem,RsGxsIdSerialiser >();
|
2014-04-05 03:27:18 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|