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

28 lines
426 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;
2021-07-29 11:18:52 +03:00
WINPR_UNUSED(argc);
WINPR_UNUSED(argv);
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;
2019-11-06 17:24:51 +03:00
fprintf(stderr, "BipBuffer_BufferSize: %" PRIuz "\n", BipBuffer_BufferSize(bb));
BipBuffer_Free(bb);
2017-11-14 15:54:26 +03:00
return rc;
}