mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 03:06:31 -04:00
Fix UnitTests and run it in windows too.
This commit is contained in:
parent
8ccfee20bb
commit
3152ecaa9b
19 changed files with 261 additions and 155 deletions
|
@ -58,7 +58,6 @@ void randString(const uint32_t, std::wstring&);
|
|||
|
||||
/* for testing compound tlv items */
|
||||
|
||||
void init_item(RsTlvPublicRSAKey&);
|
||||
void init_item(RsTlvSecurityKeySet&);
|
||||
void init_item(RsTlvKeySignature&);
|
||||
void init_item(RsTlvKeySignatureSet&);
|
||||
|
@ -112,7 +111,7 @@ template<class T> int test_RsItem()
|
|||
RsSerialType *rsfis = init_item(rsfi) ;
|
||||
|
||||
/* attempt to serialise it before we add it to the serialiser */
|
||||
|
||||
std::cerr << "### These errors are expected." << std::endl;
|
||||
EXPECT_TRUE(0 == srl.size(&rsfi));
|
||||
|
||||
static const uint32_t MAX_BUFSIZE = 22000 ;
|
||||
|
@ -120,6 +119,7 @@ template<class T> int test_RsItem()
|
|||
char *buffer = new char[MAX_BUFSIZE];
|
||||
uint32_t sersize = MAX_BUFSIZE;
|
||||
|
||||
std::cerr << "### These errors are expected." << std::endl;
|
||||
EXPECT_TRUE(false == srl.serialise(&rsfi, (void *) buffer, &sersize));
|
||||
|
||||
/* now add to serialiser */
|
||||
|
@ -133,7 +133,7 @@ template<class T> int test_RsItem()
|
|||
std::cerr << "test_Item() done: " << done << std::endl;
|
||||
std::cerr << "test_Item() sersize: " << sersize << std::endl;
|
||||
|
||||
std::cerr << "test_Item() serialised:" << std::endl;
|
||||
//std::cerr << "test_Item() serialised:" << std::endl;
|
||||
//displayRawPacket(std::cerr, (void *) buffer, sersize);
|
||||
|
||||
EXPECT_TRUE(done == true);
|
||||
|
@ -192,7 +192,7 @@ template<class T> int test_RsItem(uint16_t servtype)
|
|||
RsSerialType *rsfis = init_item(rsfi) ; // deleted on destruction of srl
|
||||
|
||||
/* attempt to serialise it before we add it to the serialiser */
|
||||
|
||||
std::cerr << "### These errors are expected." << std::endl;
|
||||
EXPECT_TRUE(0 == srl.size(&rsfi));
|
||||
|
||||
static const uint32_t MAX_BUFSIZE = 22000 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue