FreeRDP/winpr/libwinpr/utils/test/TestBipBuffer.c

24 lines
380 B
C
Raw Normal View History

#include <winpr/crt.h>
#include <winpr/collections.h>
int TestBipBuffer(int argc, char* argv[])
{
BYTE* data;
2017-11-14 15:54:26 +03:00
int rc = -1;
wBipBuffer* bb;
bb = BipBuffer_New(1024);
if (!bb)
return -1;
2015-03-14 01:37:48 +03:00
data = BipBuffer_WriteReserve(bb, 1024 * 2);
2017-11-14 15:54:26 +03:00
if (data)
rc = 0;
2017-11-14 15:54:26 +03:00
fprintf(stderr, "BipBuffer_BufferSize: %"PRIuz"\n", BipBuffer_BufferSize(bb));
BipBuffer_Free(bb);
2017-11-14 15:54:26 +03:00
return rc;
}