#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)
Definition at line 72 of file CAtlList.cpp.
◆ START_TEST()
Definition at line 117 of file CAtlList.cpp.
118{
121}
static void test_BasicCases()
static void test_SwapElements()
◆ 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}
#define ok_list(lst, expected)
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,...)