RetroShare/libretroshare/src/tests/serialiser/tlvkey_test.cc
chrisparker126 19e856c2a8 Added RsTlvKeySignatureSet to rstlvkeys
- added test to test/serialiser 
- Updated all relevant gxs test (ran whole suite, added gxsdata_test, tests meta serilisation, to pro file) 

Updated flag in rsgxsflags to account for authentication and private types 

Changed msgId/grpId generation to sha1 hash

removed photoservice VEG file from pro file




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5630 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-10-01 20:57:56 +00:00

37 lines
597 B
C++

#include "support.h"
#include "serialiser/rstlvkeys.h"
INITTEST();
bool test_RsTlvKeySignatureSet();
int main()
{
test_RsTlvKeySignatureSet(); REPORT("test_RsTlvKeySignatureSet()");
FINALREPORT("RsTlvKey Test");
}
bool test_RsTlvKeySignatureSet()
{
RsTlvKeySignatureSet set;
init_item(set);
char data[set.TlvSize()];
uint32_t offset = 0;
set.SetTlv(data, set.TlvSize(), &offset);
RsTlvKeySignatureSet setConfirm;
offset = 0;
setConfirm.GetTlv(data, set.TlvSize(), &offset);
CHECK(setConfirm == set);
}