3 #include <winpr/tchar.h>
4 #include <winpr/collections.h>
6 int TestQueue(
int argc,
char* argv[])
15 queue = Queue_New(TRUE, -1, -1);
19 for (
size_t index = 1; index <= 10; index++)
21 Queue_Enqueue(queue, (
void*)index);
24 count = Queue_Count(queue);
25 printf(
"queue count: %" PRIuz
"\n", count);
27 for (
size_t index = 1; index <= 10; index++)
29 item = (size_t)Queue_Dequeue(queue);
35 count = Queue_Count(queue);
36 printf(
"queue count: %" PRIuz
"\n", count);
38 Queue_Enqueue(queue, (
void*)(
size_t)1);
39 Queue_Enqueue(queue, (
void*)(
size_t)2);
40 Queue_Enqueue(queue, (
void*)(
size_t)3);
45 Queue_Enqueue(queue, (
void*)(
size_t)4);
46 Queue_Enqueue(queue, (
void*)(
size_t)5);
47 Queue_Enqueue(queue, (
void*)(
size_t)6);