Fix a couple of twtest-only valgrind issues
This commit is contained in:
parent
7a262bf1c1
commit
736a761bff
|
@ -44,9 +44,13 @@ void TestCrypto()
|
||||||
|
|
||||||
const int BUFSIZE = 9000;
|
const int BUFSIZE = 9000;
|
||||||
|
|
||||||
char source[BUFSIZE];
|
std::vector<char> source_buf(BUFSIZE);
|
||||||
char crypt[COUNT + BUFSIZE]; // needs to be able to hold even number of blocks
|
std::vector<char> crypt_buf(COUNT + BUFSIZE); // needs to be able to hold even number of blocks
|
||||||
char dest[COUNT];
|
std::vector<char> dest_buf(COUNT);
|
||||||
|
|
||||||
|
char* source = &source_buf[0];
|
||||||
|
char* crypt = &crypt_buf[0];
|
||||||
|
char* dest = &dest_buf[0];
|
||||||
|
|
||||||
memcpy(source, "I love the smell of the sheep.", 31);
|
memcpy(source, "I love the smell of the sheep.", 31);
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,12 @@ void TestFCOSetImpl()
|
||||||
pFCO3->Release();
|
pFCO3->Release();
|
||||||
|
|
||||||
// let's iterate over the fcos
|
// let's iterate over the fcos
|
||||||
cIterProxy<iFCOIter> pit(set.GetIter());
|
iFCOIter* pIter = set.GetIter();
|
||||||
|
cIterProxy<iFCOIter> pit(pIter);
|
||||||
pit->SeekBegin();
|
pit->SeekBegin();
|
||||||
PrintIter(pit, d);
|
PrintIter(pit, d);
|
||||||
|
|
||||||
|
|
||||||
// lookup a specific fco
|
// lookup a specific fco
|
||||||
cIterProxy<iFCOIter> pit2(set.Lookup(cFCOName(_T("fco2"))));
|
cIterProxy<iFCOIter> pit2(set.Lookup(cFCOName(_T("fco2"))));
|
||||||
if(! (iFCOIter*)pit2)
|
if(! (iFCOIter*)pit2)
|
||||||
|
@ -113,10 +115,14 @@ void TestFCOSetImpl()
|
||||||
// test operator=
|
// test operator=
|
||||||
cFCOSetImpl set2;
|
cFCOSetImpl set2;
|
||||||
set2 = set;
|
set2 = set;
|
||||||
pit = set2.GetIter();
|
|
||||||
|
pIter->DestroyIter();
|
||||||
|
pIter = set2.GetIter();
|
||||||
|
pit = pIter;
|
||||||
d.TraceDebug("Made a new set and set it equal to the first with operator=; printing out...\n");
|
d.TraceDebug("Made a new set and set it equal to the first with operator=; printing out...\n");
|
||||||
PrintIter(pit, d);
|
PrintIter(pit, d);
|
||||||
|
|
||||||
|
|
||||||
// test IsEmpty
|
// test IsEmpty
|
||||||
set.Clear();
|
set.Clear();
|
||||||
TEST(set.IsEmpty());
|
TEST(set.IsEmpty());
|
||||||
|
@ -142,6 +148,7 @@ void TestFCOSetImpl()
|
||||||
pit = set3.GetIter();
|
pit = set3.GetIter();
|
||||||
PrintIter(pit, d);
|
PrintIter(pit, d);
|
||||||
|
|
||||||
|
pIter->DestroyIter();
|
||||||
|
|
||||||
d.TraceDebug("Leaving...\n");
|
d.TraceDebug("Leaving...\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue