mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
37 lines
597 B
C++
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);
|
||
|
|
||
|
}
|