ReactOS 0.4.16-dev-88-ga65b6ae
InsertTest Class Reference
Inheritance diagram for InsertTest:
Collaboration diagram for InsertTest:

Protected Member Functions

void insert1 ()
 
void insert2 ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (InsertTest)
 
 CPPUNIT_TEST (insert1)
 
 CPPUNIT_TEST (insert2)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 14 of file insert_test.cpp.

Member Function Documentation

◆ CPPUNIT_TEST() [1/2]

InsertTest::CPPUNIT_TEST ( insert1  )
private

◆ CPPUNIT_TEST() [2/2]

InsertTest::CPPUNIT_TEST ( insert2  )
private

◆ CPPUNIT_TEST_SUITE()

InsertTest::CPPUNIT_TEST_SUITE ( InsertTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

InsertTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ insert1()

void InsertTest::insert1 ( )
protected

Definition at line 31 of file insert_test.cpp.

32{
33 char const* array1 [] = { "laurie", "jennifer", "leisa" };
34 char const* array2 [] = { "amanda", "saskia", "carrie" };
35
36 deque<char const*> names(array1, array1 + 3);
38
40 itd = copy(array2, array2 + 3, insert_iterator<deque <char const*> >(names, i));
41
42 CPPUNIT_ASSERT( !strcmp(names[0], "laurie") );
43 CPPUNIT_ASSERT( !strcmp(names[1], "jennifer") );
44 CPPUNIT_ASSERT( !strcmp(names[2], "amanda") );
45 CPPUNIT_ASSERT( !strcmp(names[3], "saskia") );
46 CPPUNIT_ASSERT( !strcmp(names[4], "carrie") );
47 CPPUNIT_ASSERT( !strcmp(names[5], "leisa") );
48
49 copy(array1, array1 + 3, itd);
50 CPPUNIT_ASSERT( !strcmp(names[5], "laurie") );
51 CPPUNIT_ASSERT( !strcmp(names[6], "jennifer") );
52 CPPUNIT_ASSERT( !strcmp(names[7], "leisa") );
53 CPPUNIT_ASSERT( !strcmp(names[8], "leisa") );
54}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
Definition: _deque.h:404
_Base::iterator iterator
Definition: _deque.h:420
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLuint GLuint * names
Definition: glext.h:11545
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
Definition: glfuncs.h:248

◆ insert2()

void InsertTest::insert2 ( )
protected

Definition at line 55 of file insert_test.cpp.

56{
57 char const* array1 [] = { "laurie", "jennifer", "leisa" };
58 char const* array2 [] = { "amanda", "saskia", "carrie" };
59
60 deque<char const*> names(array1, array1 + 3);
62 copy(array2, array2 + 3, inserter(names, i));
63
64 CPPUNIT_ASSERT( !strcmp(names[0], "laurie") );
65 CPPUNIT_ASSERT( !strcmp(names[1], "jennifer") );
66 CPPUNIT_ASSERT( !strcmp(names[2], "amanda") );
67 CPPUNIT_ASSERT( !strcmp(names[3], "saskia") );
68 CPPUNIT_ASSERT( !strcmp(names[4], "carrie") );
69 CPPUNIT_ASSERT( !strcmp(names[5], "leisa") );
70}
insert_iterator< _Container > _STLP_CALL inserter(_Container &__x, _Iterator __i)
Definition: _iterator.h:250

The documentation for this class was generated from the following file: