mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-26 03:10:58 -04:00
Added new test structure for libretroshare
ported some of the tests across. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7233 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3eb79bbcba
commit
2a5854188e
52 changed files with 7923 additions and 0 deletions
24
tests/unittests/libretroshare/serialiser/tlvkey_test.cc
Normal file
24
tests/unittests/libretroshare/serialiser/tlvkey_test.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
#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);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue