38 int expected[] = {-123, 12, 34, 56, 78, 90, -44};
44 ok(
index < expected_size,
"Too many items, expected %d, got %d!\n", expected_size, (
index + 1));
46 if (
index < expected_size)
52 ok(0,
"Extra value: %d\n",
value);
56 ok(it ==
NULL,
"it does still point to something!\n");
72#define ok_list(lst, expected) \
75 CStringW _value = to_str(lst); \
76 ok(_value == (expected), "Wrong value for '%s', expected: " #expected " got: \"%S\"\n", #lst, \
77 _value.GetString()); \
94 list.SwapElements(p1, p1);
97 list.SwapElements(p1, p2);
100 p1 =
list.FindIndex(0);
101 p2 =
list.FindIndex(1);
102 list.SwapElements(p1, p2);
105 p1 =
list.FindIndex(1);
106 p2 =
list.FindIndex(2);
107 list.SwapElements(p1, p2);
110 p1 =
list.FindIndex(0);
111 p2 =
list.FindIndex(2);
112 list.SwapElements(p2, p1);
135 ok_list(
list_tail,
"8,1,0,1,2,0,8,1,0,");
157 ok_list(
list_head,
"2,0,0,7,9,8,2,0,0,");
static void test_BasicCases()
static CStringW to_str(const CAtlList< int > &lst)
static void test_SwapElements()
static void test_AppendListToHead()
static void test_AppendListToTail()
#define ok_list(lst, expected)
struct outqueuenode * tail
struct outqueuenode * head
#define ok_size_t(expression, result)
POSITION InsertAfter(_In_ POSITION pos, INARGTYPE element)
POSITION AddHead(INARGTYPE element)
POSITION AddTail(INARGTYPE element)
POSITION GetHeadPosition() const
POSITION InsertBefore(_In_ POSITION pos, INARGTYPE element)
E & GetNext(_Inout_ POSITION &pos)
void __cdecl AppendFormat(UINT nFormatID,...)
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)