#include "atltest.h"
#include <atlbase.h>
#include <atlsimpcoll.h>
Go to the source code of this file.
◆ START_TEST()
Definition at line 44 of file CSimpleArray.cpp.
45{
47
48 ok_int(array1.GetSize(), 0);
49
50 array1.Add(123);
51
52 ok_int(array1.GetSize(), 1);
53 ok_int(array1.GetData()[0], 123);
55
56 array1.Add(456);
57
58 ok_int(array1.GetSize(), 2);
59 ok_int(array1.GetData()[0], 123);
61 ok_int(array1.GetData()[1], 456);
63
64 array1.RemoveAll();
65 ok_int(array1.GetSize(), 0);
66
67 array1.Add(1);
68 array1.Add(1);
69 array1.Add(1);
70 array1.Add(2);
71 array1.Add(2);
72 array1.Add(3);
73 ok_int(array1.GetSize(), 6);
74
75 array1.Remove(2);
76 ok_int(array1.GetSize(), 5);
77
78 array1.Remove(1);
79 ok_int(array1.GetSize(), 4);
80
85
88
90 {
92
95 array2.Add(creature1);
98 array2.Add(creature2);
101 }
104
105 {
109
110 array4 = array2;
113
117
118 array4.Add(creature1);
121
122 array3 = array4;
125
126 array5 = array2;
129
130 array5 = array2;
133 }
136
137 array2.RemoveAll();
140
141 array1.RemoveAll();
142 ok_int(array1.GetSize(), 0);
143 for (
int i = 0;
i < 100; ++
i)
144 {
146 }
147 ok_int(array1.GetSize(), 100);
148
149 array1.RemoveAll();
150 ok_int(array1.GetSize(), 0);
151 array1.Add(123);
152 array1.Add(321);
153 ok(!!array1.RemoveAt(0),
"Expected RemoveAt(0) to succeed\n");
154 ok_int(array1.GetSize(), 1);
155 if (array1.GetSize() == 1)
156 {
158 }
159 ok(!!array1.RemoveAt(0),
"Expected RemoveAt(0) to succeed\n");
160 ok_int(array1.GetSize(), 0);
161}
#define ok_int(expression, result)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i