ReactOS  0.4.14-dev-552-g2fad488
CAtlArray.cpp File Reference
#include "atltest.h"
#include <atlbase.h>
#include <atlcoll.h>
Include dependency graph for CAtlArray.cpp:

Go to the source code of this file.

Classes

struct  CCreature
 

Functions

 START_TEST (CAtlArray)
 

Function Documentation

◆ START_TEST()

START_TEST ( CAtlArray  )

Definition at line 59 of file CAtlArray.cpp.

60 {
61  {
62  CAtlArray<CCreature> array1;
63 
69 
70  array1.SetCount(2);
71 
77 
78  array1.SetCount(1);
79 
85 
86  CCreature test(111);
87 
93 
94  ok_size_t(array1.GetCount(), 1u);
95  ok_int(array1[0].m_id, 0x123456);
96  ok_int(array1.GetAt(0).m_id, 0x123456);
97 
98  array1.Add(test);
99 
105 
106  ok_size_t(array1.GetCount(), 2u);
107  ok_int(array1[0].m_id, 0x123456);
108  ok_int(array1.GetAt(0).m_id, 0x123456);
109  ok_int(array1[1].m_id, 111);
110  ok_int(array1.GetAt(1).m_id, 111);
111 
112  test.m_id = 222;
113  array1[0] = test;
114 
120 
121  // Default traits does not call anything when relocating objects!
122  array1.SetCount(100);
123 
129 
130  // Does not compile:
131  //CAtlArray<CCreature> array2(array1);
132 
133  // Does not compile:
134  //CAtlArray<CCreature> array2;
135  //array2 = array1;
136  }
137 
138  // Objects are cleaned up when the list goes away
144 }
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 * u
Definition: glfuncs.h:240
bool SetCount(size_t nNewSize, int nGrowBy=- 1)
Definition: atlcoll.h:310
static int s_nOpIsCount
Definition: CAtlArray.cpp:24
#define test
Definition: rosglue.h:37
static int s_nDtorCount
Definition: CAtlArray.cpp:23
size_t GetCount() const
Definition: atlcoll.h:358
E & GetAt(size_t iElement)
Definition: atlcoll.h:380
#define ok_int(expression, result)
Definition: atltest.h:134
size_t Add(INARGTYPE element)
Definition: atlcoll.h:280
static int s_nCtorCount
Definition: CAtlArray.cpp:20
#define ok_size_t(expression, result)
Definition: atltest.h:115
static int s_nCtorCount_Default
Definition: CAtlArray.cpp:21
static int s_nCCtorCount
Definition: CAtlArray.cpp:22