#include "atltest.h"
#include <atlbase.h>
#include <atlcoll.h>
#include <atlstr.h>
Go to the source code of this file.
◆ ok_list
Value: do \
{ \
ok(_value == (
expected),
"Wrong value for '%s', expected: " #
expected " got: \"%S\"\n", #lst, \
} while (0)
static CStringW to_str(const CAtlList< int > &lst)
PXSTR GetString() noexcept
Definition at line 72 of file CAtlList.cpp.
◆ START_TEST()
Definition at line 160 of file CAtlList.cpp.
161{
166}
static void test_BasicCases()
static void test_SwapElements()
static void test_AppendListToHead()
static void test_AppendListToTail()
◆ test_AppendListToHead()
static void test_AppendListToHead |
( |
| ) |
|
|
static |
Definition at line 139 of file CAtlList.cpp.
140{
146
152
155
157 ok_list(
list_head,
"2,0,0,7,9,8,2,0,0,");
158}
#define ok_list(lst, expected)
Referenced by START_TEST().
◆ test_AppendListToTail()
static void test_AppendListToTail |
( |
| ) |
|
|
static |
Definition at line 117 of file CAtlList.cpp.
118{
124
130
133
135 ok_list(
list_tail,
"8,1,0,1,2,0,8,1,0,");
136}
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
Referenced by START_TEST().
◆ test_BasicCases()
static void test_BasicCases |
( |
| ) |
|
|
static |
Definition at line 20 of file CAtlList.cpp.
21{
23
31
34
37
38 int expected[] = {-123, 12, 34, 56, 78, 90, -44};
43 {
44 ok(
index < expected_size,
"Too many items, expected %d, got %d!\n", expected_size, (
index + 1));
46 if (
index < expected_size)
47 {
49 }
50 else
51 {
52 ok(0,
"Extra value: %d\n",
value);
53 }
55 }
56 ok(it ==
NULL,
"it does still point to something!\n");
57}
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)
Referenced by START_TEST().
◆ test_SwapElements()
static void test_SwapElements |
( |
| ) |
|
|
static |
Definition at line 82 of file CAtlList.cpp.
83{
88
90
93
94 list.SwapElements(p1, p1);
96
97 list.SwapElements(p1, p2);
99
100 p1 =
list.FindIndex(0);
101 p2 =
list.FindIndex(1);
102 list.SwapElements(p1, p2);
104
105 p1 =
list.FindIndex(1);
106 p2 =
list.FindIndex(2);
107 list.SwapElements(p1, p2);
109
110 p1 =
list.FindIndex(0);
111 p2 =
list.FindIndex(2);
112 list.SwapElements(p2, p1);
114}
Referenced by START_TEST().
◆ to_str()
Definition at line 60 of file CAtlList.cpp.
61{
65 {
68 }
69 return tmp;
70}
void __cdecl AppendFormat(UINT nFormatID,...)