mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-10 08:24:29 -05:00
25 lines
468 B
C++
25 lines
468 B
C++
|
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
#include "support.h"
|
||
|
#include "serialiser/rstlvkeys.h"
|
||
|
|
||
|
TEST(libretroshare_serialiser, 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);
|
||
|
|
||
|
EXPECT_TRUE(setConfirm == set);
|
||
|
|
||
|
}
|